MarkerManager

open class MarkerManager : MapObjectManager<O, C> , GoogleMap.OnInfoWindowClickListener, GoogleMap.OnMarkerClickListener, GoogleMap.OnMarkerDragListener, GoogleMap.InfoWindowAdapter, GoogleMap.OnInfoWindowLongClickListener

Keeps track of collections of markers on the map. Delegates all Marker-related events to each collection's individually managed listeners.

All marker operations (adds and removes) should occur via its collection class. That is, don't add a marker via a collection, then remove it via Marker.remove()

Constructors

Link copied to clipboard
constructor(map: GoogleMap)

Types

Link copied to clipboard
open inner class Collection : MapObjectManager.Collection

Functions

Link copied to clipboard
open fun getCollection(id: String): C
Gets a named collection that was created by newCollection
Link copied to clipboard
open fun getInfoContents(@NonNull marker: Marker): View
Link copied to clipboard
open fun getInfoWindow(@NonNull marker: Marker): View
Link copied to clipboard
open fun newCollection(id: String): C
Create a new named collection, which can later be looked up by getCollection
Link copied to clipboard
open fun onInfoWindowClick(@NonNull marker: Marker)
Link copied to clipboard
open fun onInfoWindowLongClick(@NonNull marker: Marker)
Link copied to clipboard
open fun onMarkerClick(@NonNull marker: Marker): Boolean
Link copied to clipboard
open fun onMarkerDrag(@NonNull marker: Marker)
Link copied to clipboard
open fun onMarkerDragEnd(@NonNull marker: Marker)
Link copied to clipboard
open fun onMarkerDragStart(@NonNull marker: Marker)
Link copied to clipboard
open fun remove(object: O): Boolean
Removes an object from its collection.