interface TomtomMap : RouteExtension, MarkerExtension, MapManipulationExtension, MapInfoExtension, MapCallbacksExtension, MapViewExtension, MarkersCallbackExtension, OverlaysCallbackExtension, RouteCallbackExtension, LocationSourceExtension, OnRequestPermissionsResultCallback, CameraCallbacksExtension
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
.
abstract fun asMatchingDataProvider(): MatchingDataProvider!
Convert tomtomMap to a matching data provider representation. Road network is obtained in real time from map tiles, according to the current GPS position. |
|
abstract fun clear(): Unit
Clear from map all annotation, like markers, polyline, polygon's, routes or chevrons. |
|
abstract fun collectLogsToFile(fileName: String!): Unit
Collect logs from logcat to file. Set log level by |
|
abstract fun getDisplaySettings(): DisplaySettings!
Advanced settings for displayed map components (e.g., get rendered features). |
|
abstract fun getDrivingSettings(): DrivingSettings!
Advanced settings for driving options manipulation. |
|
abstract fun getGesturesConfiguration(): GesturesConfiguration
Obtains the |
|
abstract fun
Obtains the gestures detection settings object. |
|
abstract fun
GPS Position icon indicator. Visible only when my location is enabled. |
|
abstract fun getMarkerSettings(): MarkerSettings!
Advanced settings for markers manipulation. |
|
abstract fun getOverlaySettings(): OverlaySettings!
Overlay is shape or polyline or polygon. |
|
abstract fun getPoiSettings(): PoiSettings!
Advanced settings for a POI manipulation (e.g., hide categories). |
|
abstract fun getRouteSettings(): RouteSettings!
Advanced settings for displaying route on map. |
|
abstract fun getStyleSettings(): StyleSettings!
Advanced settings for style manipulation (e.g. get layer info or add source in runtime). |
|
abstract fun getTrafficSettings(): TrafficSettings!
Settings for manipulating traffic settings. |
|
abstract fun getUiSettings(): UiSettings!
Settings for manipulating map settings related to the UI (e.g., styling). |
|
abstract fun isMyLocationEnabled(): Boolean
Gets the status of the my-location layer. |
|
abstract fun latLngForPixel(position: PointF): LatLng!
Convert point on the screen to map position. |
|
abstract fun moveMapBy(offsetX: Double, offsetY: Double, duration: Long): Unit
Moves the map toward x,y vector in specified time. |
|
abstract fun pixelForLatLng(latLng: LatLng): PointF!
Convert map position on the map to screen position. |
|
abstract fun setGeopoliticalView(geoView: String): Unit
Set geopolitical view for vector and raster tiles. By default, international view is used. |
|
abstract fun setGpsPositionIndicator(gpsPositionIndicator: GpsIndicator): Unit
Set the GPS position indicator. |
|
abstract fun setLanguage(language: String): Unit
Set language for vector tiles as IETF language tag. By default, Neutral Ground Truth (NGT) is used. |
|
abstract fun setMyLocationEnabled(enabled: Boolean): Unit
Enables or disables the my-location layer. While enabled and the location is available, the my-location layer continuously draws an indication of a user's current location and bearing, and displays UI controls that allow a user to interact with their location (for example, to enable or disable camera tracking of their location and bearing). In order to use the my-location-layer feature, the SDK request permission for either |
|
abstract fun updateGesturesConfiguration(gesturesConfiguration: GesturesConfiguration): Unit
Updates the current gestures configuration. It allows to enable/disable particular gestures such as: rotation, zooming, panning and tilt. |
|
abstract fun
Updates the current gestures detection settings. It allows to enable/disable particular gestures: rotation, zooming, and panning. |
abstract fun activateProgressAlongRoute(routeId: Long, progressStyle: RouteLayerStyle!): Unit
Activate the progress displaying along the route. NOTE: This method itself will not display anything. |
|
abstract fun addLocationUpdateListener(locationUpdateListener: LocationUpdateListener): Unit
Add location update listener. When using this method, you shoud remember to unregister using |
|
abstract fun addMarker(markerBuilder: MarkerBuilder!): Marker
Add marker to map. |
|
abstract fun addOnCameraChangedListener(listener: TomtomMapCallback.OnCameraChangedListener): Unit
Adds a listener that is executed when the camera has changed. For example, it happens when a map is panned or zoomed. |
|
abstract fun addOnCameraMoveCanceledListener(listener: TomtomMapCallback.OnCameraMoveCanceledListener): Unit
Registers a listener that will be executed when the camera move is canceled. |
|
abstract fun addOnCameraMoveFinishedListener(listener: TomtomMapCallback.OnCameraMoveFinishedListener): Unit
Registers a listener that will be executed when the camera move is completed. |
|
abstract fun addOnCameraMoveListener(listener: TomtomMapCallback.OnCameraMoveListener): Unit
Registers a listener that will be executed when the camera move is in progress. |
|
abstract fun addOnCameraMoveStartedListener(listener: TomtomMapCallback.OnCameraMoveStartedListener): Unit
Registers a listener that will be executed when the camera starts moving. |
|
abstract fun addOnCircleClickListener(listener: TomtomMapCallback.OnCircleClickListener!): Unit
Called to add a listener for circle clicks. |
|
abstract fun addOnMapChangedListener(onMapChangedListener: TomtomMapCallback.OnMapChangedListener!): Unit
Sets a callback interface that is executed when the map status is changed. |
|
abstract fun addOnMapClickListener(listener: TomtomMapCallback.OnMapClickListener!): Unit
Sets a callback interface that is executed when the user clicks on the map. |
|
abstract fun addOnMapDoubleClickListener(listener: TomtomMapCallback.OnMapDoubleClickListener!): Unit
Set callback interface that is executed when the user performs a double-click on the map. |
|
abstract fun addOnMapLongClickListener(listener: TomtomMapCallback.OnMapLongClickListener!): Unit
Set callback interface that is executed when the user long click on the map. |
|
abstract fun addOnMapPanningListener(onMapPanningListener: TomtomMapCallback.OnMapPanningListener!): Unit
Sets a callback interface that is executed when the map panning is executed. |
|
abstract fun addOnMapRotateListener(listener: TomtomMapCallback.OnMapRotateListener!): Unit
Sets a callback interface that is executed when the user rotates the map. |
|
abstract fun
Sets a callback interface that is executed when the map view port is changed. For example, it happens when a map is panned or zoomed. Use |
|
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 addOnPolygonClickListener(listener: TomtomMapCallback.OnPolygonClickListener!): Unit
Called to add a listener for polygon clicks. |
|
abstract fun addOnPolylineClickListener(listener: TomtomMapCallback.OnPolylineClickListener!): Unit
Called to add a listener for polygon clicks. |
|
abstract fun addOnRouteClickListener(listener: TomtomMapCallback.OnRouteClickListener!): Unit
Called to add a listener for route clicks. |
|
abstract fun addRoute(routeBuilder: RouteBuilder!): Route!
Display a route and prepare the map to navigate on that route. |
|
abstract fun bringRouteToFront(routeId: Long): Unit
Bring the specific route to the front. As a result, it will be drawn on top of other routes. |
|
abstract fun centerOn(cameraPosition: CameraPosition): Unit
Center a map by using the given camera position options. The required parameters for camera position are latitude and longitude (set in degrees minutes seconds format). Zoom, bearing, and pitch are not mandatory, and will be used once they are set. abstract fun centerOn(cameraFocusArea: CameraFocusArea): Unit abstract fun centerOn(cameraFocusArea: CameraFocusArea, callback: OnMapCenteredCallback!): Unit
Centers a map on the area determined by the abstract fun centerOn(cameraFocusArea: CameraFocusArea, animationDuration: AnimationDuration!): Unit abstract fun centerOn(cameraFocusArea: CameraFocusArea, animationDuration: AnimationDuration!, callback: OnMapCenteredCallback!): Unit
Centers a map on the area determined by the abstract fun centerOn(cameraPosition: CameraPosition, callback: OnMapCenteredCallback!): Unit
Center the map when using the given camera position options. The required parameters for camera position are latitude and longitude (set in the degrees minutes seconds format). Zoom, bearing, and pitch are not mandatory and will be used once they are set. |
|
abstract fun centerOnMyLocation(): Unit
Center map on current location. The current location is obtained using |
|
abstract fun centerOnMyLocationWithNorthUp(): Unit
Center map on current location and set map orientation to north. No action is executed when last location is null. |
|
abstract fun clearRoute(): Unit
Erase route from map. |
|
abstract fun deactivateProgressAlongRoute(routeId: Long): Unit
Deactivate the progress displaying along the route. |
|
abstract fun displayRouteOverview(id: Long): Unit
Display route overview using its id. No action when route not found. |
|
abstract fun displayRoutesOverview(): Unit
Display route overview. All added routes will be visible. |
|
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 findRouteByID(id: Long): Optional<Route!>!
Find route using its id. |
|
abstract fun getCenterOfMap(): LatLng
Latitude and longitude of map center. |
|
abstract fun getCurrentBounds(): BoundingBox!
Gets the current region bounds. |
|
abstract fun getDefaultLocationSource(): LocationSource
Default location source implementation. This method creates a new instance that can be used by user. |
|
abstract fun getDefaultZoomLevel(): Double
Default zoom level for map. See {@value MapConstants#DEFAULT_ZOOM_LEVEL}. |
|
abstract fun getLocationSource(): LocationSource
Location source provide information about map location. LocationSource is registered in onResume and unregister in onPause method. |
|
abstract fun getMarkers(): MutableList<Marker!>
Get list of all markers added to map. Even marker which already not visible on map. |
|
abstract fun getRoutes(): MutableList<Route!>!
Get list of all routs added to the map. |
|
abstract fun getUserLocation(): Location?
If location is enabled for map, returns user's location (the same as indicated by GPS dot). If GPS position is not available, this method returns null. It is possible to observe location events using |
|
abstract fun getZoomLevel(): Double
getZoomLevel. |
|
abstract fun getZoomLevelForBounds(topLeft: LatLng, bottomRight: LatLng): Double
Gets zoom for the minimum region which contains both coordinates. |
|
abstract fun hideTrafficFromRoute(routeId: Long): Unit
Hide traffic on the route. |
|
abstract fun is2D(): Boolean
True if 2D mode is set, false otherwise. |
|
abstract fun isUserLocationInMapBoundingBox(): Boolean
Checks whether user location is inside current map bounding box. |
|
abstract fun layers(): MapLayers
Get settings that allow to manipulate map layers options. |
|
abstract fun removeLocationUpdateListener(locationUpdateListener: LocationUpdateListener): Unit
Remove location update listener. |
|
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 removeOnCameraChangedListener(listener: TomtomMapCallback.OnCameraChangedListener): Unit
Removes the previously added listener. |
|
abstract fun removeOnCameraMoveCanceledListener(listener: TomtomMapCallback.OnCameraMoveCanceledListener): Unit
Unregisters the TomtomMapCallback.OnCameraMoveCanceledListener. |
|
abstract fun removeOnCameraMoveFinishedListener(listener: TomtomMapCallback.OnCameraMoveFinishedListener): Unit
Unregisters the TomtomMapCallback.OnCameraMoveFinishedListener. |
|
abstract fun removeOnCameraMoveListener(listener: TomtomMapCallback.OnCameraMoveListener): Unit
Unregisters the TomtomMapCallback.OnCameraMoveListener. |
|
abstract fun removeOnCameraMoveStartedListener(listener: TomtomMapCallback.OnCameraMoveStartedListener): Unit
Unregisters the TomtomMapCallback.OnCameraMoveStartedListener. |
|
abstract fun removeOnCircleClickListener(listener: TomtomMapCallback.OnCircleClickListener!): Unit
Called to remove a listener for circle clicks. |
|
abstract fun removeOnCircleClickListeners(): Unit
Remove all registered circle click listeners. |
|
abstract fun removeOnMapChangedListener(listener: TomtomMapCallback.OnMapChangedListener!): Unit
Unregister the map changed listener. |
|
abstract fun removeOnMapClickListener(listener: TomtomMapCallback.OnMapClickListener!): Unit
Unregister the map click listener given as the parameter. |
|
abstract fun removeOnMapDoubleClickListener(listener: TomtomMapCallback.OnMapDoubleClickListener!): Unit
Unregister the map double-click listener given as the parameter. |
|
abstract fun removeOnMapLongClickListener(listener: TomtomMapCallback.OnMapLongClickListener!): Unit
Unregister the map long listener given as the parameter. |
|
abstract fun removeOnMapPanningListener(listener: TomtomMapCallback.OnMapPanningListener!): Unit
Unregister the map panning listener. |
|
abstract fun removeOnMapRotateListener(listener: TomtomMapCallback.OnMapRotateListener!): Unit
Unregister the map rotate listener given as the parameter. |
|
abstract fun
Unregister the map view port changes listener. Use |
|
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 removeOnPolygonClickListener(listener: TomtomMapCallback.OnPolygonClickListener!): Unit
Called to remove a listener for polygon clicks. |
|
abstract fun removeOnPolygonClickListeners(): Unit
Remove all registered polygon click listeners. |
|
abstract fun removeOnPolylineClickListener(listener: TomtomMapCallback.OnPolylineClickListener!): Unit
Called to remove a listener for polyline clicks. |
|
abstract fun removeOnPolylineClickListeners(): Unit
Remove all registered polyline click listeners. |
|
abstract fun removeOnRouteClickListener(listener: TomtomMapCallback.OnRouteClickListener!): Unit
Called to remove a listener for route clicks. |
|
abstract fun removeOnRouteClickListeners(): Unit
Remove all registered route click listeners. |
|
abstract fun removeRoute(id: Long): Unit
Removes the route with a given ID from the map. |
|
abstract fun set25DMode(): Unit
Set 2.5 mode for map. |
|
abstract fun set2DMode(): Unit
Set 2d mode for map. |
|
abstract fun set3DMode(): Unit
Because our map don't support 3d mode yet, 2.5 mode is set. |
|
abstract fun
Sets the current region as the minimum region which contains both coordinates. abstract fun setCurrentBounds(coordinates: MutableList<LatLng!>): Unit
Sets the current region as the minimum region which contains the provided coordinates. |
|
abstract fun setLocationSource(locationSource: LocationSource): Unit
Set for map location source. Map take from location source information about location of chevron. |
|
abstract fun setPadding(top: Double, left: Double, bottom: Double, right: Double): Unit
Sets padding for the map in pixels. Changing map padding does not have an immediate effect on the map. It will be applied with the next map operation. abstract fun setPadding(mapPadding: MapPadding!): Unit
Sets padding for the map in pixels using the |
|
abstract fun showTrafficOnRoute(routeId: Long, trafficStyle: MutableMap<RouteLayerStyle!, MutableList<TrafficData!>!>!): Unit
Draw the traffic on the route. |
|
abstract fun tiles(): MapTiles
Get settings that allow to manipulate map tiles options. |
|
abstract fun trafficFlow(): TrafficFlowStep
Get settings that allow to manipulate traffic options. |
|
abstract fun trafficFlowAndIncidents(): TrafficFlowAndIncidentStep
Get settings that allow to manipulate traffic incident and flow options simultaneously. |
|
abstract fun trafficIncidents(): TrafficIncidentsStep
Get settings that allow to manipulate traffic incidents options. |
|
abstract fun trafficOff(): Unit
Turn off traffic layer. Incidents and flow. (Vector and raster type) |
|
abstract fun updateProgressAlongRoute(routeId: Long, location: Location!): Unit
Update the state of progress along the specified route. NOTE: |
|
abstract fun updateRouteStyle(routeId: Long, routeStyle: RouteStyle!): Unit
Updates the style of the specific route in terms of route's properties like: width, fillColor and outlineColor. |
|
abstract fun zoomIn(): Unit
Zoom map by one level |
|
abstract fun zoomOut(): Unit
Zoom out by one level |
|
abstract fun zoomTo(zoomLevel: Double): Unit
Zoom the map to a requested level. Zoom levels are in the range of [0, 20]. 0 is the whole world. 20 is the highest zoom level. |
|
abstract fun zoomToAllMarkers(): Unit
Zoom map to level where all markers are visible. |