MapOptions

class MapOptions(val mapKey: String, val cameraOptions: CameraOptions? = null, val padding: Padding = Padding(), val mapStyle: StyleDescriptor? = null, val styleMode: StyleMode = StyleMode.MAIN, val onlineCachePolicy: OnlineCachePolicy = OnlineCachePolicy.Default, val renderToTexture: Boolean = false) : Parcelable

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

Link copied to clipboard
constructor(mapKey: String, cameraOptions: CameraOptions? = null, padding: Padding = Padding(), mapStyle: StyleDescriptor? = null, styleMode: StyleMode = StyleMode.MAIN, onlineCachePolicy: OnlineCachePolicy = OnlineCachePolicy.Default, renderToTexture: Boolean = false)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Provides CameraOptions associated with the current MapOptions.

Link copied to clipboard

Provides Maps API key.

Link copied to clipboard

Provides custom StyleDescriptor with style that will be used as initial style.

Link copied to clipboard

Defines OnlineCachePolicy that will be used for the HTTP caching.

Link copied to clipboard

Provides Padding of the map view. By default, padding is set to 0 for all sides.

Link copied to clipboard

If set to true render to texture view rather than surface view.

Link copied to clipboard

Defines StyleMode that will be used during the initialization.

Functions

Link copied to clipboard
operator fun component1(): String
Link copied to clipboard
operator fun component2(): CameraOptions?
Link copied to clipboard
operator fun component3(): Padding
Link copied to clipboard
operator fun component4(): StyleDescriptor?
Link copied to clipboard
operator fun component5(): StyleMode
Link copied to clipboard
Link copied to clipboard
operator fun component7(): Boolean
Link copied to clipboard
fun copy(mapKey: String = this.mapKey, cameraOptions: CameraOptions? = this.cameraOptions, padding: Padding = this.padding, mapStyle: StyleDescriptor? = this.mapStyle, styleMode: StyleMode = this.styleMode, onlineCachePolicy: OnlineCachePolicy = this.onlineCachePolicy, renderToTexture: Boolean = this.renderToTexture): MapOptions
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String

Inherited functions

Link copied to clipboard
abstract fun describeContents(): Int
Link copied to clipboard
abstract fun writeToParcel(p0: Parcel, p1: Int)