MapOptions
The MapOptions class configures initial behavior and visual style of the map. It enables setting the default zoom level, the map language, style and more. The MapOptions is used as an argument for MapFragment.newInstance, which instantiates MapFragment object.
val mapOptions = MapOptions(mapKey = "YOUR_TOMTOM_API_KEY")
val mapFragment = MapFragment.newInstance(mapOptions)Constructors
The MapOptions class configures initial behavior and visual style of the map. It enables setting the default zoom level, the map language, style and more. The MapOptions is used as an argument for MapFragment.newInstance, which instantiates MapFragment object.
Types
Properties
Provides CameraOptions associated with the current MapOptions.
Provides custom StyleDescriptor with style that will be used as initial style. If no StyleDescriptor or null is provided, the default TomTom online style is used as the initial style. The map will not complete initialization until the initial style is successfully loaded. If the initial style fails to load on the first attempt (regardless if it is a custom StyleDescriptor or the default TomTom style), the system performs internal retries automatically until the style loads successfully. This can delay map initialization in flaky-network scenarios, so provide a custom StyleDescriptor that is stored locally on the device for reliable startup in those scenarios. Always provide a custom local StyleDescriptor for pure offline scenarios, otherwise the map initialization will never finish (as it will keep retrying to load the default online style indefinitely).
Defines OnlineCachePolicy that will be used for the HTTP caching.
If set to true render to texture view rather than surface view.