1

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:

L.tileLayer('http://{s}.{base}.maps.cit.api.here.com/maptile/2.1/{type}/{mapID}/hybrid.day/{z}/{x}/{y}/{size}/{format}?app_id={app_id}&app_code={app_code}&lg={language}'

How do I swap out this code??

asked Oct 1, 2016 at 5:22

1 Answer 1

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

answered Oct 1, 2016 at 11:56

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.