0

I've created a map on the CartoDB site and now wish to add some interactivity using CartoDB.js.

I'd like the interactive map to have the same basemap as on the CartoDB site, Nokia Hybrid Day.

The createVis method automatically loads the CartoDB basemap. But I need to use the createLayer method, which does not.

Could you please tell me how I can load the basemap I'm using on the CartoDB site for use with the createLayer method?

asked May 13, 2015 at 23:31

2 Answers 2

1

I've got the same problem. I resolved it add a googlemap Layer to my map and not nokia map.

var map // create google maps map var mapOptions = { zoom: 15, center: new google.maps.LatLng(43.44, 11.9), mapTypeId: google.maps.MapTypeId.HYBRID

 };
 map = new google.maps.Map(document.getElementById('map'), mapOptions);
 var sublayers;
 // Add other data layer to your map..........
answered May 14, 2015 at 11:24
1
  • Thank you for your suggestion. Could you please provide the code you use to add the CartoDB layers to a Google map object. The code I'm using cartodb.createLayer(map, vizjson).addTo(map) works with a Leaflet object, but is throwing an error when given a Google object. Commented May 16, 2015 at 2:29
0

Check on this website on examples of layers to add to leaflet. Searching HERE you'll find different basemaps that you can add to your blank leaflet map and after that, call createLayer.

Remember that in order to use HERE basemaps you need to register as a developer and get an app-id and app_code.

Additionally, you can also use the leaflet-providers plugin to instantiate those basemaps more easily.

answered Jun 5, 2016 at 21:52

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.