I am using leaflet on an Angular componenent and I am showing a marker when user click on map from esri-leaflet reverse geocoding, I want to remove previous markers added when user click.
this is my code:
    map.on('click', <LeafletMouseEvent>(e) => {
  geocodeService.reverse().latlng(e.latlng).run( (error, result) => {
    if (error) {
      return;
    }
    L.marker(result.latlng).addTo(map).bindPopup(result.address.Match_addr).openPopup();
  });
});
 
    