I'm desperately trying to swap out my basemap in cartodb.js.

Here's the snippet of code, the part I switched out successfully with some basemaps is in bold: L.tileLayer('https://dnv9my2eseobd.cloudfront.net/v3/cartodb.map-4xtxp73f/{z}/{x}/{y}.png'

When I inspect element or go here, I get a wide variety of options, like so: http://leaflet-extras.github.io/leaflet-providers/preview/

For example, this works: L.tileLayer('http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}'

But this doesn't:


How do I swap out this code??

1 Answer 1


The basemap that doesn't work, is one from here.com. It is not accessible without registration so you first need to create an account at here.com and then register an app. Then you get an specific app_id and app_code with which you can replace the place holders in the template url.

Find general information regarding this topic at the Here.com FAQ

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.