New answers tagged

0

Mapbox has a product called Mapbox Studio, which you can upload a GeoTIFF. They will process and host your GeoTIFF as a layer/source that you can add to any map using Mapbox GL JS. Code example below: map.addLayer({ id: `raster-layer-RGB-${tilesetId}`, type: 'raster', ...


0

When you add a layer to L.control, you add an object by reference. Instead of remove the layer, you can modify the object : let baseMaps = { "Grayscale": grayscale, "Streets": streets }; L.control.layers(baseMaps, overlayMaps).addTo(map); baseMaps = { "Streets": streets }; I did this with overlayMaps. Each time I ...


0

For the most recent version correct answer is: map.addControl(new mapboxgl.NavigationControl(), 'top-left');


1

I am still not an expert, but your interpolate inside of the "icon-rotate" might be the problem. I am not positive. I can show you how I did mine, which works great using an external JSON. Hopefully it will work for you as well (or you can edit my code to work for you) : In my JS code, it is : map.addLayer({ id: "direction_layer", ...


Top 50 recent answers are included