I have created a marker as below in my activity.
public async void OnMapReady(GoogleMap googleMap)
{
MarkerList = new List<Marker>();
LatLng latLng = new LatLng(16.022,40.3033);
CameraUpdate cameraUpdate = CameraUpdateFactory.NewLatLngZoom(latLng, 10);
googleMap.MoveCamera(cameraUpdate);
MarkerOptions markerOptions = new MarkerOptions();
markerOptions.Draggable(false);
markerOptions.SetPosition(latLng);
googleMap.AddMarker(markerOptions);
Marker M = googleMap.AddMarker(markerOptions);
MarkerList.Add(M);
googleMap.MarkerDragEnd += GoogleMap_MarkerDragEnd;
// googleMap.SetInfoWindowAdapter(this);
// googleMap.UiSettings.ZoomControlsEnabled = true;
// googleMap.UiSettings.CompassEnabled = true;
googleMap.MoveCamera(CameraUpdateFactory.ZoomTo(150));
}
And on other event I need to remove those markers for that i coded like as below.
foreach(Marker marker in MarkerList)
{
marker.Remove();
marker.Visible=false;//this is also not working
}
But there is no change on map. How to remove those markers on map?