MapInitOptions

Defines configuration MapInitOptions for a MapboxMap. These options can be used when adding a map to your application programmatically (as opposed to via XML). If you are using a MapFragment, you can pass these options in using the static factory method newInstance(MapboxMapOptions). If you are using a MapView, you can pass these options in using the constructor MapView(Context, MapboxMapOptions). If you add a map using XML, then you can apply these options using custom XML tags.

data class MapInitOptions @JvmOverloads() constructor(context: Context, resourceOptions: ResourceOptions, mapOptions: MapOptions, plugins: List<Plugin>, cameraOptions: CameraOptions?, textureView: Boolean, styleUri: String?, attrs: AttributeSet?)

Constructors

MapInitOptions
Link copied to clipboard
fun MapInitOptions(context: Context, resourceOptions: ResourceOptions, mapOptions: MapOptions, plugins: List<Plugin>, cameraOptions: CameraOptions?, textureView: Boolean, styleUri: String?, attrs: AttributeSet?)

Types

Companion
Link copied to clipboard

Static methods

object Companion

Functions

component1
Link copied to clipboard
operator fun component1(): Context
component2
Link copied to clipboard
operator fun component2(): ResourceOptions
component3
Link copied to clipboard
operator fun component3(): MapOptions
component4
Link copied to clipboard
operator fun component4(): List<Plugin>
component5
Link copied to clipboard
operator fun component5(): CameraOptions?
component6
Link copied to clipboard
operator fun component6(): Boolean
component7
Link copied to clipboard
operator fun component7(): String?
component8
Link copied to clipboard
operator fun component8(): AttributeSet?
copy
Link copied to clipboard
fun copy(context: Context, resourceOptions: ResourceOptions, mapOptions: MapOptions, plugins: List<Plugin>, cameraOptions: CameraOptions?, textureView: Boolean, styleUri: String?, attrs: AttributeSet?): MapInitOptions
equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
open override fun hashCode(): Int
toString
Link copied to clipboard
open override fun toString(): String

Properties

attrs
Link copied to clipboard

The AttributeSet object that init the MapView.

var attrs: AttributeSet?
cameraOptions
Link copied to clipboard

The Initial Camera options when creating a MapView.

var cameraOptions: CameraOptions?
context
Link copied to clipboard

The context of the MapView.

val context: Context
mapOptions
Link copied to clipboard

Describes the map options value when using a MapView.

var mapOptions: MapOptions
plugins
Link copied to clipboard

The plugins, a list of strings representing class names, that will be loaded as part of MapView initialisation,

var plugins: List<Plugin>
resourceOptions
Link copied to clipboard

Resource options when using a MapView. Access token required when using a Mapbox service. Please see https://www.mapbox.com/help/create-api-access-token/ to learn how to create one.More information in this guide https://www.mapbox.com/help/first-steps-android-sdk/#access-tokens.

var resourceOptions: ResourceOptions
styleUri
Link copied to clipboard

The styleUri will applied for the MapView in the onStart lifecycle event if no style is set. Default is Style.MAPBOX_STREETS. If set to null, then there is no default style will be loaded.

val styleUri: String?
textureView
Link copied to clipboard

Flag indicating to use a TextureView as render surface for the MapView. Default is false.

var textureView: Boolean