Builder

class Builder

Constructors

Builder
Link copied to clipboard
open fun Builder()

Functions

build
Link copied to clipboard
open fun build(): MapOptions
constrainMode
Link copied to clipboard

The map constrain mode. This can be used to limit the map to wrap around the globe horizontally. By default, it is set to `HeightOnly`.

open fun constrainMode(constrainMode: ConstrainMode): MapOptions.Builder
contextMode
Link copied to clipboard

The map context mode. This can be used to optimizations if we know that the drawing context is not shared with other code.

open fun contextMode(contextMode: ContextMode): MapOptions.Builder
crossSourceCollisions
Link copied to clipboard

Specify whether to enable cross-source symbol collision detection or not. By default, it is set to `true`.

open fun crossSourceCollisions(crossSourceCollisions: Boolean): MapOptions.Builder
glyphsRasterizationOptions
Link copied to clipboard

Glyphs rasterization options to use for client-side text rendering.

open fun glyphsRasterizationOptions(glyphsRasterizationOptions: GlyphsRasterizationOptions): MapOptions.Builder
optimizeForTerrain
Link copied to clipboard

With terrain on, if `true`, the map will render for performance priority, which may lead to layer reordering allowing to maximize performance (layers that are draped over terrain will be drawn first, including fill, line, background, hillshade and raster). Any layers that are positioned after symbols are draped last, over symbols. Otherwise, if set to `false`, the map will always be drawn for layer order priority. By default, it is set to `true`.

open fun optimizeForTerrain(optimizeForTerrain: Boolean): MapOptions.Builder
orientation
Link copied to clipboard

The orientation of the Map. By default, it is set to `Upwards`.

open fun orientation(orientation: NorthOrientation): MapOptions.Builder
pixelRatio
Link copied to clipboard

The custom pixel ratio. By default, it is set to 1.0

open fun pixelRatio(pixelRatio: Float): MapOptions.Builder
size
Link copied to clipboard

The size to resize the map object and renderer backend. The size is given in `platform pixel` units. macOS and iOS platforms use device-independent pixel units, while other platforms, such as Android, use screen pixel units.

open fun size(size: Size): MapOptions.Builder
viewportMode
Link copied to clipboard

The viewport mode. This can be used to flip the vertical orientation of the map as some devices may use inverted orientation.

open fun viewportMode(viewportMode: ViewportMode): MapOptions.Builder

Extensions

applyDefaultParams
Link copied to clipboard

Get a default MapOptions.Builder with reasterization mode GlyphsRasterizationMode#ALL_GLYPHS_RASTERIZED_LOCALLY

fun MapOptions.Builder.applyDefaultParams(context: Context): MapOptions.Builder