MapInitOptions

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

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.

Constructors

MapInitOptions
Link copied to clipboard
fun MapInitOptions(context: Context, resourceOptions: ResourceOptions = getDefaultResourceOptions(context), mapOptions: MapOptions = getDefaultMapOptions(context), plugins: List<Plugin> = defaultPluginList, cameraOptions: CameraOptions? = null, textureView: Boolean = false, styleUri: String? = Style.MAPBOX_STREETS, attrs: AttributeSet? = null, antialiasingSampleCount: Int = DEFAULT_ANTIALIASING_SAMPLE_COUNT)

Types

Companion
Link copied to clipboard
object Companion
Static methods

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?
component9
Link copied to clipboard
operator fun component9(): Int
copy
Link copied to clipboard
fun copy(context: Context, resourceOptions: ResourceOptions = getDefaultResourceOptions(context), mapOptions: MapOptions = getDefaultMapOptions(context), plugins: List<Plugin> = defaultPluginList, cameraOptions: CameraOptions? = null, textureView: Boolean = false, styleUri: String? = Style.MAPBOX_STREETS, attrs: AttributeSet? = null, antialiasingSampleCount: Int = DEFAULT_ANTIALIASING_SAMPLE_COUNT): 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

antialiasingSampleCount
Link copied to clipboard
var antialiasingSampleCount: Int
sample count to control multisample anti-aliasing (MSAA) option for rendering.
attrs
Link copied to clipboard
var attrs: AttributeSet? = null
The AttributeSet object that init the MapView.
cameraOptions
Link copied to clipboard
var cameraOptions: CameraOptions? = null
The Initial Camera options when creating a MapView.
context
Link copied to clipboard
val context: Context
The context of the MapView.
mapOptions
Link copied to clipboard
var mapOptions: MapOptions
Describes the map options value when using a MapView.
plugins
Link copied to clipboard
var plugins: List<Plugin>
The plugins, a list of strings representing class names, that will be loaded as part of MapView initialisation,
resourceOptions
Link copied to clipboard
var resourceOptions: ResourceOptions
Resource options when using a MapView.
styleUri
Link copied to clipboard
val styleUri: String?
The styleUri will applied for the MapView in the onStart lifecycle event if no style is set.
textureView
Link copied to clipboard
var textureView: Boolean = false
Flag indicating to use a TextureView as render surface for the MapView.