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

TrafficSettings

interface TrafficSettings : TrafficExtensions, TomtomMapCallback.OnMapTapListener, Persistable, TomtomMapCallback.OnMapChangedListener

Settings for manipulating traffic settings related to traffic (e.g. flows). To obtain this interface, call TomtomMap#getTrafficSettings()

Functions

dismissTrafficBalloon

abstract fun dismissTrafficBalloon(): Unit

Dismiss map balloon with traffic information.

setMarginAroundTouchedPointPx

abstract fun setMarginAroundTouchedPointPx(marginAroundTouchedPointPx: Int): Unit

When user touch a map, information about traffic are collected from point and from all points around in the radius of the distance.

setOnTrafficFlowClickListener

abstract fun setOnTrafficFlowClickListener(listener: OnTrafficFlowClickListener!): Unit

Set callback interface that is executed when the user click on the map traffic flow.

setOnTrafficIncidentsClickListener

abstract fun setOnTrafficIncidentsClickListener(listener: OnTrafficIncidentsClickListener!): Unit

Set callback interface that is executed when the user click on the map traffic incidents.

setTrafficFlowBalloonViewAdapter

abstract fun setTrafficFlowBalloonViewAdapter(trafficFlowBalloonAdapter: MapBalloonViewAdapter<TrafficFlowMapBalloon!>!): Unit

View adapter of traffic flow balloon view. Implement abstract class MapBalloonViewAdapter to inflate traffic balloon model.

setTrafficIncidentsBalloonViewAdapter

abstract fun setTrafficIncidentsBalloonViewAdapter(trafficIncidentsBalloonViewAdapter: MapBalloonViewAdapter<TrafficIncidentsMapBalloon!>!): Unit

View adapter of traffic incidents balloon view. Implement abstract class MapBalloonViewAdapter to inflate traffic balloon model.

showTrafficFlowBalloon

abstract fun showTrafficFlowBalloon(mapPoint: MapPoint!, model: TrafficFlowMapBalloon!): Unit

Show map balloon with traffic flow information.

showTrafficIncidentBalloon

abstract fun showTrafficIncidentBalloon(mapPoint: MapPoint!, model: TrafficIncidentsMapBalloon!): Unit

Show map balloon with traffic incident information.

Inherited Functions

getTrafficRasterFlowStyle

abstract fun getTrafficRasterFlowStyle(): TrafficFlowType.RasterTrafficFlowType!

Get information about current traffic vector flow style settings.

getTrafficVectorFlowStyle

abstract fun getTrafficVectorFlowStyle(): TrafficFlowType.VectorTrafficFlowType!

Get information about current traffic vector flow style settings.

isTrafficFlowEnabled

abstract fun isTrafficFlowEnabled(): Boolean

Get information about current traffic flow settings.

isTrafficIncidentsEnabled

abstract fun isTrafficIncidentsEnabled(): Boolean

Get information about current traffic incidents settings.

isTrafficRasterFlowEnabled

abstract fun isTrafficRasterFlowEnabled(): Boolean

Get information about current traffic raster flow settings.

isTrafficVectorFlowEnabled

abstract fun isTrafficVectorFlowEnabled(): Boolean

Get information about current traffic vector flow settings.

onCameraDidChange

abstract fun onCameraDidChange(): Unit

Called when the new camera parameters are loaded.

onCameraIsChanging

abstract fun onCameraIsChanging(): Unit

Called when the map camera is changing.

onCameraWillChange

abstract fun onCameraWillChange(): Unit

Called when the map is about to change the camera parameters.

onDidFailLoadingMap

abstract fun onDidFailLoadingMap(): Unit

Called when the map style has failed to load.

onDidFinishInitializingMap

abstract fun onDidFinishInitializingMap(): Unit

Called when the map has been loaded and is ready to use.

onDidFinishLoadingMap

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.

onDidFinishLoadingStyle

abstract fun onDidFinishLoadingStyle(): Unit

Called when the map style has been loaded. This event triggers an OnMapReady callback.

onDidFinishRenderingFrame

abstract fun onDidFinishRenderingFrame(): Unit

Called when the map frame has been rendered.

onDidFinishRenderingMap

abstract fun onDidFinishRenderingMap(): Unit

Called when the map has been rendered.

onMapLongTap

abstract fun onMapLongTap(x: Float!, y: Float!): Unit

TomtomMapCallback.OnMapLongClickListener#onMapLongClick(LatLng)

onMapTap

abstract fun onMapTap(x: Float!, y: Float!): Unit

TomtomMapCallback.OnMapClickListener#onMapClick(LatLng)

onSourceChanged

abstract fun onSourceChanged(): Unit

Called when the source for the map style has been changed.

onViewStateRestored

abstract fun onViewStateRestored(savedState: MapState!): Unit

Called internally to restore state, e.g., when the app is resumed from the background.

onViewStateSave

abstract fun onViewStateSave(outState: MapState!): Unit

Called internally to save state, e.g., when the app is going to the background.

onWillStartLoadingMap

abstract fun onWillStartLoadingMap(): Unit

Called when the map is about to load a new style.

onWillStartRenderingFrame

abstract fun onWillStartRenderingFrame(): Unit

Called when the map is about to render a new frame.

onWillStartRenderingMap

abstract fun onWillStartRenderingMap(): Unit

Called when the map is about to render.

turnOffTraffic

abstract fun turnOffTraffic(): Unit

Turn off information about traffic.

turnOffTrafficFlowTiles

abstract fun turnOffTrafficFlowTiles(): Unit

Turn off traffic flow tiles.

turnOffTrafficIncidents

abstract fun turnOffTrafficIncidents(): Unit

Turn off all traffic incidents.

turnOnRasterTrafficFlowTiles

abstract fun turnOnRasterTrafficFlowTiles(): Unit

Set traffic tiles to raster. Default traffic style is RelativeTrafficFlowStyle.

abstract fun turnOnRasterTrafficFlowTiles(trafficFlowTilesStyle: TrafficFlowType.RasterTrafficFlowType!): Unit

Set traffic tiles flow to raster. The default and recommended method is VectorTrafficFlowType. Specify the style by AbsoluteTrafficFlowStyle, RelativeTrafficFlowStyle, RelativeDelayTrafficFlowStyle

turnOnRasterTrafficIncidents

abstract fun turnOnRasterTrafficIncidents(): Unit

Turn on raster incidents.

turnOnTrafficFlowTiles

abstract fun turnOnTrafficFlowTiles(): Unit

Turn on traffic flow tiles.

turnOnTrafficIncidents

abstract fun turnOnTrafficIncidents(): Unit

Turn on all traffic incidents.

turnOnVectorTrafficFlowTiles

abstract fun turnOnVectorTrafficFlowTiles(): Unit

Set traffic tiles to vector. Default traffic style is RelativeTrafficFlowStyle.

abstract fun turnOnVectorTrafficFlowTiles(trafficFlowTilesStyle: TrafficFlowType.VectorTrafficFlowType!): Unit

Set traffic tiles to vector. This is the default and recommended value. Specify the style by: AbsoluteTrafficFlowStyle RelativeTrafficFlowStyle, RelativeDelayTrafficFlowStyle ReducedSensitivityTrafficFlowStyle

turnOnVectorTrafficIncidents

abstract fun turnOnVectorTrafficIncidents(): Unit

Turn on vector incidents.