Openlayers 3 - Add CartoDB basemap

المشرف العام

Administrator
طاقم الإدارة
I'm trying to add a CartoDB basemap to my OpenLayers map but I can't get it to work. Here is the code I use to declare the basemap variable:

var carto = new ol.layer.Tile({ source: new ol.source.XYZ({ url:'http://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png', })});Any idea where the problem comes from?



أكثر...
 
أعلى