MapOptions

data class MapOptions @JvmOverloads constructor(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_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.

Inherited functions

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