removeMarkerById method

void removeMarkerById(
  1. int? id
)

Remove a Marker from the map by its id.

Implementation

void removeMarkerById(int? id){
  if(_markers.containsKey(id)){

    final Marker marker=_markers.remove(id)!;
    _sendData('removeMarker', {'id':id});
    marker._id=null;
  }
}