openstreetmapleafletcloudmade

OpenstreetMap + Leaflet and CloudMade


I use in my project OpenstreetMap and Leaflet. Add a layer:

 L.tileLayer("http://{s}.tile.cloudmade.com/{my_key}/997/256/{z}/{x}/{y}.png",
 attribution: "Map data &copy; <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

But today I received a letter from CloudMade.....

As of May 1st we’ll be stopping service to your API key. This means that CloudMade services like Map Tiles, Geocoding and Routing that you maybe using in your apps or websites will stop working.

And how to add the map without this API?


Solution

  • Cloudmade have decided to revoke access to their non-enterprise customers from May 2014. Other tilesets available are listed on OSM's wiki page here.

    For instance, you can use the default OSM tileset as follows:

    L.tileLayer(
        "http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
        ....
    ).addTo('map');