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
.
abstract fun asMatchingDataProvider(): MatchingDataProvider!
Convert tomtomMap to matching data provider representation. Road network is obtained in real-time from map tiles, according to 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 getGestureDetector(): MapGestureDetector!
Get current gesture detector implementation. |
|
abstract fun getGesturesDetectionSettings(): GesturesDetectionSettings
Obtains the gestures detection settings object. |
|
abstract fun
GPS Position icon indicator. Visible only when my location is enabled. |
|
abstract fun getLogoSettings(): LogoSettings!
Settings for manipulating logo and copyrights text view. |
|
abstract fun getMarkerSettings(): MarkerSettings!
Advanced settings for markers manipulation. |
|
abstract fun getOverlaySettings(): OverlaySettings!
Overlay is shape or polyline or polygon. |
|
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 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 setGestureDetector(mapGestureDetector: MapGestureDetector): Unit
Set custom gesture detector. Once the default implementation is overridden, the user can provide their own interpretation of gestures, like tilt, rotate etc. |
|
abstract fun setGpsPositionIndicator(gpsPositionIndicator: GpsIndicator): Unit
Set 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 updateGesturesDetectionSettings(gesturesDetectionSettings: GesturesDetectionSettings): Unit
Updates the current gestures detection settings. It allows to enable/disable particular gestures: rotation, zooming and panning. |
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 addOnCircleClickListener(listener: TomtomMapCallback.OnCircleClickListener!): Unit
Called to add a listener for circle clicks. |
|
abstract fun addOnMapChangedListener(onMapChangedListener: TomtomMapCallback.OnMapChangedListener!): Unit
Set callback interface that is executed when the map status is changed. |
|
abstract fun addOnMapClickListener(listener: TomtomMapCallback.OnMapClickListener!): Unit
Set callback interface that is executed when the user click 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
Set callback interface that is executed when the map panning is executed. |
|
abstract fun addOnMapRotateListener(listener: TomtomMapCallback.OnMapRotateListener!): Unit
Set callback interface that is executed when the user rotates the map. |
|
abstract fun addOnMapViewPortChangedListener(onMapViewPortChangedListener: TomtomMapCallback.OnMapViewPortChanged!): Unit
Set callback interface that is executed when the map view port is changed. It happens when e.g., a map is panned or zoomed. |
|
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 route and prepare map to navigate on that route. |
|
abstract fun bringRouteToFront(routeId: Long): Unit
Bring the specific route to front. As a result, it will be drawn on top of other routes. |
|
abstract fun
Center map on given coordinates/ abstract fun
Center map on given coordinates and with given zoom level. When zoom level is out of range, the minimum zoom level will be set. Zoom levels are in range [0, 20] abstract fun
Center map on given latitude and longitude. Latitude and longitude is set in degrees minutes seconds format. abstract fun
Center map on given latitude and longitude with a given zoom level. When zoom level is out of range, the minimum zoom level will be set. Zoom levels are in range [0, 20], where 0 is the whole world and 20 is the highest zoom level. Latitude and longitude is set in degrees minutes seconds format. abstract fun
Center map on given latitude and longitude with a given zoom level and yaw angle (map rotation). When zoom level is out of range, the minimum zoom level will be set. Zoom levels are in range [0, 20], where 0 is the whole world and 20 is the highest zoom level. Yaw angle is in range [0, 360], where 0 is north, 90 is east, 180 is south, and 270 is west. Latitude and longitude is set in degrees minutes seconds format. abstract fun centerOn(cameraPosition: CameraPosition): Unit
Center map on using 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, will be used once they are set. abstract fun centerOn(cameraFocusArea: CameraFocusArea): Unit
Centers a map on the area determined by the abstract fun centerOn(cameraFocusArea: CameraFocusArea, animationDuration: AnimationDuration!): Unit
Centers a map on the area determined by the |
|
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
Center map on given latitude and longitude with default zoom level {@value MapConstants#DEFAULT_ZOOM_LEVEL}. Latitude and longitude is set in degrees minutes seconds format. |
|
abstract fun clearRoute(): Unit
Erase route from map. |
|
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 getOnMapChangedListener(): CallbackContainer<TomtomMapCallback.OnMapChangedListener!>!
Returns a container of the assigned map changed listener. If no listener had been assigned then the returned container is empty. |
|
abstract fun getOnMapClickListener(): CallbackContainer<TomtomMapCallback.OnMapClickListener!>!
Returns a container of the assigned map click listener. If no listener had been assigned then the returned container is empty. |
|
abstract fun getOnMapDoubleClickListener(): CallbackContainer<TomtomMapCallback.OnMapDoubleClickListener!>!
Returns a container of the assigned map double-click listener. If no listener had been assigned then the returned container is empty. |
|
abstract fun getOnMapLongClickListener(): CallbackContainer<TomtomMapCallback.OnMapLongClickListener!>!
Returns a container of the assigned map long click listener. If no listener had been assigned then the returned container is empty. |
|
abstract fun getOnMapPanningListener(): CallbackContainer<TomtomMapCallback.OnMapPanningListener!>!
Returns a container of the assigned map panning listener. If no listener had been assigned then the returned container is empty. |
|
abstract fun getOnMapRotateListener(): CallbackContainer<TomtomMapCallback.OnMapRotateListener!>!
Returns a container of the assigned map rotate listener. If no listener had been assigned then the returned container is empty. |
|
abstract fun getOnMapViewPortChangedListener(): CallbackContainer<TomtomMapCallback.OnMapViewPortChanged!>!
Returns a container of the assigned map ViewPort changes listener. If no listener had been assigned then the returned container is empty. |
|
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 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 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 removeOnMapViewPortChangedListener(listener: TomtomMapCallback.OnMapViewPortChanged!): Unit
Unregister the map view port changes listener. |
|
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 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 current region as the minimum region which contains both coordinates. abstract fun setCurrentBounds(coordinates: MutableList<LatLng!>): Unit
Sets 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 |
|
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 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. |