Layer : removelayer

12 views
Skip to first unread message

Jm d

unread,
Oct 4, 2022, 6:12:49 PM10/4/22
to Leaflet
Hello everyone

For my little project, I've created a map with 100 markers.

Each marker must be displayable / or not visible individually according to its boolean parameters thanks to five checkboxes.

I try to go through the layers by creating as many layers as markers.


Lmarker.push(marker);
LayerMarker = new L.featureGroup(Lmarker);
LayerMarker.addTo(Rmap); Layers.push(LayerMarker);
Lmarker = [];

So I got an array of 100 records for Layers
Then I was thinking of doing: Rcarte.removeLayer(Layers[10])

But it didn't work.
Does anyone have a small track to advise me for my problem: each layer or each marker must be individualized.

With many thanks

Jean Michel
Reply all
Reply to author
Forward
0 new messages