MapInitOptions

data class MapInitOptions @JvmOverloads constructor(val context: Context, var mapOptions: MapOptions = getDefaultMapOptions(context), var plugins: List<Plugin> = defaultPluginList, var cameraOptions: CameraOptions? = null, var textureView: Boolean = false, val styleUri: String? = Style.STANDARD, var attrs: AttributeSet? = null, var antialiasingSampleCount: Int = DEFAULT_ANTIALIASING_SAMPLE_COUNT, var mapName: String = "")

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

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

Types

Link copied to clipboard
object Companion

Static methods

Properties

Link copied to clipboard

Sample count to control multisample anti-aliasing (MSAA) option for rendering. E.g. passing 4 enables MSAA x4 if it is supported. Default is 1 (MSAA turned off).

Link copied to clipboard
var attrs: AttributeSet? = null

The AttributeSet object that init the MapView.

Link copied to clipboard

The Initial Camera options when creating a MapView.

Link copied to clipboard

The context of the MapView.

Link copied to clipboard

Custom name which will be appended to map render related logs. May be useful when using several MapViews. Defaults to an empty string.

Link copied to clipboard

Describes the map options value when using a MapView.

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard
var textureView: Boolean = false

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