interface MarkerSettings : MarkerExtension, MarkersCallbackExtension, Persistable, TomtomMapCallback.OnMapTapListener, TomtomMapCallback.OnMapChangedListener
Advanced settings for markers manipulation. To obtain this interface, call TomtomMap.getMarkerSettings
abstract val defaultOnMapDragListener: TomtomMapCallback.OnMapDragListener |
|
abstract var markerBalloonViewAdapter: BalloonViewAdapter<out MarkerBalloon?, Marker?>?
Set adapter for marker balloons. Override BalloonViewAdapter.onCreateView to inflate balloon view. Override BalloonViewAdapter.getBalloonView to bind view with marker view model. |
|
abstract val selectedMarker: Collection<Marker>
Get list of selected markers. In default implementation list should be empty or with one element |
abstract fun areMarkersActive(): Boolean
Indicates whether any markers are added on the map or not. |
|
abstract fun moveMarker(marker: Marker, newPosition: LatLng): Unit
Move marker to new position. |
|
abstract fun setDefaultBehaviorWhenSelected(defaultBehaviorWhenSelected: OnMarkerSelectedListener): Unit
Marker can be selected and deselected by user by touch events or programmatically. Marker is selected when user tap on marker icon, other markers then are deselected. Markers are deselected when user tap on map. Default implementation shows popup when marker is selected. |
|
abstract fun setDefaultIconWhenNotDefinedByUser(defaultIcon: Icon): Unit
Set default marker icon for application. |
|
abstract fun setMarkersClustering(enabled: Boolean): Unit
Turn on / off markers clustering. By default, clustering is not enabled. abstract fun setMarkersClustering(enabled: Boolean, radius: Int, maxZoom: Int): Unit
Turn on / off markers clustering and provide custom parameters to customize the algorithm. By default, clustering is not enabled, maximum zoom level is set to 16 and radius is set to 50. |
|
abstract fun updateMarkerIcon(marker: Marker, icon: Icon): Unit
Update marker icon with a new one. |
|
abstract fun zoomToMarkers(markers: List<Marker>): Unit
Zoom to map markers. Map bounding box is calculated in a way that all markers are visible. |
abstract fun addMarker(markerBuilder: MarkerBuilder!): Marker
Add marker to map. |
|
abstract fun addOnMarkerClickListener(listener: TomtomMapCallback.OnMarkerClickListener!): Unit
Called to add a listener for marker clicks. |
|
abstract fun addOnMarkerDragListener(listener: TomtomMapCallback.OnMarkerDragListener!): Unit
Called to add a listener for marker dragging. |
|
abstract fun findMarkerByID(id: Long): Optional<Marker!>
Find marker using its id. |
|
abstract fun findMarkerByPosition(location: LatLng!): Optional<Marker!>
Find marker using its location (latitude, longitude). |
|
abstract fun findMarkerByTag(tag: Serializable): Optional<Marker!>
Find marker using its tag. |
|
abstract fun getMarkers(): MutableList<Marker!>
Get list of all markers added to map. Even marker which already not visible on map. |
|
abstract fun
Called when the new camera parameters are loaded. |
|
abstract fun
Called when the map camera is changing. |
|
abstract fun
Called when the map is about to change the camera parameters. |
|
abstract fun onDidFailLoadingMap(): Unit
Called when the map style has failed to load. |
|
abstract fun onDidFinishInitializingMap(): Unit
Called when the map has been loaded and is ready to use. |
|
abstract fun onDidFinishLoadingMap(): Unit
Called when the map has been loaded, including tiles. However, in Offline mode when tiles are not loaded, the load event is not triggered. |
|
abstract fun onDidFinishLoadingStyle(): Unit
Called when the map style has been loaded. This event triggers an OnMapReady callback. |
|
abstract fun onDidFinishRenderingFrame(): Unit
Called when the map frame has been rendered. |
|
abstract fun onDidFinishRenderingMap(): Unit
Called when the map has been rendered. |
|
abstract fun onMapLongTap(x: Float!, y: Float!): Unit
|
|
abstract fun onMapTap(x: Float!, y: Float!): Unit
|
|
abstract fun onSourceChanged(): Unit
Called when the source for the map style has been changed. |
|
abstract fun onViewStateRestored(savedState: MapState!): Unit
Called internally to restore state, e.g., when the app is resumed from the background. |
|
abstract fun onViewStateSave(outState: MapState!): Unit
Called internally to save state, e.g., when the app is going to the background. |
|
abstract fun onWillStartLoadingMap(): Unit
Called when the map is about to load a new style. |
|
abstract fun onWillStartRenderingFrame(): Unit
Called when the map is about to render a new frame. |
|
abstract fun onWillStartRenderingMap(): Unit
Called when the map is about to render. |
|
abstract fun removeMarker(marker: Marker!): Unit
Remove selected marker, if added to the map. |
|
abstract fun removeMarkerByID(id: Long): Unit
Remove marker by marker id. Because id is unique, method should remove one marker. |
|
abstract fun removeMarkerByTag(tag: Serializable!): Unit
Remove all markers with tag. |
|
abstract fun removeMarkers(): Unit
Remove all markers from the map. |
|
abstract fun removeOnMarkerClickListener(listener: TomtomMapCallback.OnMarkerClickListener!): Unit
Called to remove a listener for marker clicks. |
|
abstract fun removeOnMarkerClickListeners(): Unit
Remove all registered marker click listeners. |
|
abstract fun removeOnMarkerDragListener(listener: TomtomMapCallback.OnMarkerDragListener!): Unit
Called to remove a listener for marker dragging. |
|
abstract fun removeOnMarkerDragListeners(): Unit
Remove all registered marker drag listeners. |
|
abstract fun zoomToAllMarkers(): Unit
Zoom map to level where all markers are visible. |