removeMarkerWithItem method

void removeMarkerWithItem(
  1. dynamic item
)

remove the marker with the given item. Do not forget to call setRepaint()

Implementation

void removeMarkerWithItem(var item) {
  Marker? oldMarker = getMarkerWithItem(item);
  if (oldMarker != null) {
    _markers.remove(item);
    oldMarker.dispose();
    _previousMarkers.remove(oldMarker);
  }
}