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

UiSettings

interface UiSettings : UIMapSettings, Persistable

Settings for manipulating map settings related to UI (e.g. styling). To obtain this interface, call TomtomMap#getUiSettings()

Functions

centerOn

abstract fun centerOn(cameraFocusArea: CameraFocusArea!, animationDuration: AnimationDuration!): Unit

Centers the map camera on the area determined by the BoundingBox defined in the CameraFocusArea. Using that, you can also rotate the map, change the map pitch, and adjust the animation duration.

getCameraPosition

abstract fun getCameraPosition(): CameraPosition!

Get current camera position of the map.

getCompassView

abstract fun getCompassView(): CompassView!

The CompassView component. It can be used to manage the Compass visibility on the map. Moreover it can be a proxy to obtain the ImageView used by the CompassView.

getCopyrightsViewAdapter

abstract fun getCopyrightsViewAdapter(): CopyrightsViewAdapter!

The CopyrightsViewAdapter object. It can be used to manage the copyrights view component.

getCurrentLocationView

abstract fun getCurrentLocationView(): CurrentLocationView!

The CenterOnCurrentLocationView component. It can be used to manage the CenterOnCurrentLocation button visibility on the map. Moreover it can be a proxy to obtain the ImageView used by the CenterOnCurrentLocationView.

getLogoView

abstract fun getLogoView(): LogoView!

The LogoView component. It can be used to manage TomTom logo component visible on the map.

getMapLayersType

abstract fun getMapLayersType(): MapLayersType!

Get information about current map layer settings.

getMapModeType

abstract fun getMapModeType(): MapModeType!

Get current map mode type.

getMapTilesType

abstract fun getMapTilesType(): MapTilesType!

Get information about current map tiles settings.

getPanningControlsView

abstract fun getPanningControlsView(): PanningControlsView!

The PanningControlsView component. It can be used to manage the PanningControlsView component visibility on the map. Moreover it can be a proxy to obtain the ArrowButtonsGroup view used by the PanningControlsView.

getZoomingControlsView

abstract fun getZoomingControlsView(): ZoomingControlsView!

The ZoomingControlsView component. It can be used to manage the ZoomingControlsView component visibility on the map. Moreover it can be a proxy to obtain the ZoomButtonsGroup view used by the ZoomingControlsView.

getZoomLevel

abstract fun getZoomLevel(): Double

Get current zoom level.

is2D

abstract fun is2D(): Boolean

True the map is in 2D Mode, otherwise false.

isMyLocationEnabled

abstract fun isMyLocationEnabled(): Boolean

Verify whether location is enabled or not. Use TomtomMap#isMyLocationEnabled().

setCameraPosition

abstract fun setCameraPosition(cameraPosition: CameraPosition!): Unit

Sets the map camera position. Using that, you can center the map on a specified position, zoom to a certain zoom, and rotate map.

setCopyrightsViewAdapter

abstract fun setCopyrightsViewAdapter(adapter: CopyrightsViewAdapter!): Unit

Set CopyrightsViewAdapter to manage the copyrights view component.

setMapLayersType

abstract fun setMapLayersType(mapLayerType: MapLayersType!): Unit

Set map layers. Default value is set to MapLayersType#BASIC. When MapTilesType is set to MapTilesType#NONE, this method does nothing.

setMapModeType

abstract fun setMapModeType(mapModeType: MapModeType!): Unit

Set map mode to 2D or 2.5D. Default value is set to MapModeType#MODE_2D.

setMapTilesType

abstract fun setMapTilesType(mapTilesType: MapTilesType!): Unit

Set map tiles to RASTER or VECTOR. Default value is set to MapTilesType#VECTOR.

Inherited Functions

loadDefaultStyle

abstract fun loadDefaultStyle(): Unit

Loads the style with the default URL based on MapStyleSource.

onViewStateRestored

abstract fun onViewStateRestored(savedState: MapState!): Unit

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

setStyleJson

abstract fun setStyleJson(styleJson: String!): Unit

Sets the JSON content of the style used to display the map and reloads the style asynchronously. NOTE: This is an asynchronous operation. The user of this API needs to ensure that no methods of the StyleSettings interface are called before the style is reloaded. TomtomMapCallback.OnMapChangedListener.onDidFinishLoadingStyle is called when reloading the style is finished. An OnMapChangedListener can be registered using TomTomMap.addOnMapChangedListener.

abstract fun setStyleJson(styleJson: String!, layerSetConfiguration: LayerSetConfiguration!): Unit

Sets the JSON content of the style used to display the map and reloads the style asynchronously with the custom LayerSetConfiguration. Custom LayerSetConfiguration can only be used for Vector Tiles, Vector Traffic Flow, and Vector Traffic Incident Tiles. NOTE: This is an asynchronous operation. The user of this API needs to ensure that no methods of the StyleSettings interface are called before the style is reloaded. TomtomMapCallback.OnMapChangedListener.onDidFinishLoadingStyle is called when reloading the style is finished. An OnMapChangedListener can be registered using TomTomMap.addOnMapChangedListener.

setStyleUrl

abstract fun setStyleUrl(styleUrl: String!): Unit

Sets the URL to the style used to display the map and reloads the style asynchronously. NOTE: This is an asynchronous operation. The user of this API needs to ensure that no methods of the StyleSettings interface are called before the style is reloaded. TomtomMapCallback.OnMapChangedListener.onDidFinishLoadingStyle is called when reloading the style is finished. An OnMapChangedListener can be registered using TomTomMap.addOnMapChangedListener.

abstract fun setStyleUrl(styleUrl: String!, layerSetConfiguration: LayerSetConfiguration!): Unit

Sets the URL to the style used to display the map and reloads the style asynchronously with a custom LayerSetConfiguration. Custom LayerSetConfiguration can only be used for Vector Tiles, Vector Traffic Flow, and Vector Traffic Incident Tiles. NOTE: This is an asynchronous operation. The user of this API needs to ensure that no methods of the StyleSettings interface are called before the style is reloaded. TomtomMapCallback.OnMapChangedListener.onDidFinishLoadingStyle is called when reloading the style is finished. An OnMapChangedListener can be registered using TomTomMap.addOnMapChangedListener.