Mapbox gl repeat marker

530 views Asked by At

I try to repeat a marker at the same coordinates when I am moving the map to infinity, in the same way that layers.

example : https://www.mapbox.com/mapbox-gl-js/example/geojson-polygon/

Has anyone found how to do that please?

If it's not possible, conversely is it possible to not repeat layers when you moving the map ?

Thank you

1

There are 1 answers

0
amichaelr On

The Link example you provided is not using Markers to render the shaded area. It is using a feature, in this case a polygon, included in a layer (a layer can have many features).

In MapBox the rendered map is made up of any number of layers (including the tile data) which is rendered whenever you scroll or drag to a particular area of the map. For example as you keep dragging to the right in the map it will just keep rendering in the relevant layers and tiles.

The Marker functionality has a different purpose which is as a one off selected point which is useful for a user click or hover interaction.