non*_*one 3 openstreetmap cloudmade leaflet
我在我的项目OpenstreetMap和Leaflet中使用.添加图层:
L.tileLayer("http://{s}.tile.cloudmade.com/{my_key}/997/256/{z}/{x}/{y}.png",
attribution: "Map data © <a href=\"http://openstreetmap.org\">OpenStreetMap</a> contributors, <a href=\"http://creativecommons.org/licenses/by-sa/2.0/\">CC-BY-SA</a>, Imagery © <a href=\"http://cloudmade.com\">CloudMade</a>"
).addTo map
Run Code Online (Sandbox Code Playgroud)
但是今天我收到了CloudMade的一封信......
从5月1日起,我们将停止为您的API密钥提供服务.这意味着您可能在应用或网站中使用的地图平铺,地理编码和路由等CloudMade服务将停止工作.
如何在没有此API的情况下添加地图?
Cloudmade已经决定撤消2014年5月可上市OSM的wiki页面上的其他tilesets访问他们的非企业客户在这里.
例如,您可以使用默认的OSM tileset,如下所示:
L.tileLayer(
"http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
....
).addTo('map');
Run Code Online (Sandbox Code Playgroud)