Hi all again,
I have two types of marker that I put on map.
I have inserted in two different array: ArrayM and ArrayPOI.
I whant to remove from map and then delete the ArrayPOI.
This is my code to add point to map and then add it to array.
var LMarker = L.marker(markerPos,{icon:image})
.bindPopup(info,{maxWidth: "auto"})
.on("mouseover", function (e) {
Popup = L.popup()
.setLatLng(markerPos)
.setContent(marker.veicolo)
.openOn(mymap);
})
.addTo(mymap)
.openPopup;
ArrayM.push(LMarker);
Is to intend that I use the same code to add data to the ArraiPOI replacing it to the ArrayM variable.
How can I do this?
Best regards,
Sergio
3 posts - 2 participants
Ce sujet de discussion accompagne la publication sur https://community.openstreetmap.org/t/delete-marker-from-osm-and-remove-from-array/100110