sdk-maps / com.tomtom.online.sdk.map / MarkerExtension

MarkerExtension

interface MarkerExtension

Basic settings for markers manipulation.

Functions

addMarker

abstract fun addMarker(markerBuilder: MarkerBuilder!): Marker

Add marker to map.

findMarkerByID

abstract fun findMarkerByID(id: Long): Optional<Marker!>

Find marker using its id.

findMarkerByPosition

abstract fun findMarkerByPosition(location: LatLng!): Optional<Marker!>

Find marker using its location (latitude, longitude).

findMarkerByTag

abstract fun findMarkerByTag(tag: Serializable): Optional<Marker!>

Find marker using its tag.

getMarkers

abstract fun getMarkers(): MutableList<Marker!>

Get list of all markers added to map. Even marker which already not visible on map.

removeMarker

abstract fun removeMarker(marker: Marker!): Unit

Remove selected marker, if added to the map.

removeMarkerByID

abstract fun removeMarkerByID(id: Long): Unit

Remove marker by marker id. Because id is unique, method should remove one marker.

removeMarkerByTag

abstract fun removeMarkerByTag(tag: Serializable!): Unit

Remove all markers with tag.

removeMarkers

abstract fun removeMarkers(): Unit

Remove all markers from the map.

zoomToAllMarkers

abstract fun zoomToAllMarkers(): Unit

Zoom map to level where all markers are visible.

Inheritors

MarkerSettings

interface MarkerSettings : MarkerExtension, MarkersCallbackExtension, Persistable, OnMapTapListener, TomtomMapCallback.OnMapChangedListener

Advanced settings for markers manipulation. To obtain this interface, call TomtomMap.getMarkerSettings

TomtomMap

interface TomtomMap : RouteExtension, MarkerExtension, MapManipulationExtension, MapInfoExtension, MapCallbacksExtension, MapViewExtension, MarkersCallbackExtension, OverlaysCallbackExtension, RouteCallbackExtension, LocationSourceExtension, OnRequestPermissionsResultCallback

Interface that is the main entry point for all methods related to the map. TomtomMap is obtained using the MapFragment#getAsyncMap(OnMapReadyCallback) method on a MapFragment.