I need to remove markers from my map. I am looking to create a function that will specifically clear a marker based on its ID.
I am utilizing Leaflet for the map implementation.
Here is my function:
public clearMarkers(): void {
for (var id in this.markers) {
//Considered next steps for this.markers[id]
}
this.markers = {}
}