New answers tagged

0

Figured out! Here's how I solved it. Added a class to each marker using their names: for (var j = 0; j < markers.resources[i].coords.length; j++) { var x = markers.resources[i].coords[j].x; var y = markers.resources[i].coords[j].y; marker = L.marker([y, x], ...


1

It is indeed the sprites. Your Mapbox Studio style probably contains the default sprite set, or none at all if you started with an empty map . If you are using Mapbox Studio, you will use prebuilt sprites provided by Mapbox, or you can upload custom SVG images to build your own sprite. (source) To view or change your sprites you can go to the editor ...


2

The basic idea is to listen for the geocoder.input and to create a point based on the result. geocoder.on('geocoder.input', function(ev) { map.getSource('single-point').setData(ev.result.geometry); }); Here's an example demonstrating it: https://www.mapbox.com/mapbox-gl-js/example/point-from-geocoder-result/



Top 50 recent answers are included