Markers/marker overlays can't be removed from the shim
Using marker.setVisible(false)
will also hide its overlay from the map (as long asresetMarker
or resetAllMarkers
is called after the change is made). This is the best current way to remove the marker overlay from the map.
I can't think of a lot of use cases where someone would want to remove the marker entirely, but I'm sure it's possible. We need to figure out how to support this without causing issues with array reindexing (in the shim's internal memory).