Map(androidJvm)

Map class provides map rendering functionality.

class Map(androidJvm) : CameraManager, MapInterface

Constructors

Map
Link copied to clipboard

Initializes the map object.

open fun Map(client: MapClient, mapOptions: MapOptions, resourceOptions: ResourceOptions)

Functions

addPersistentStyleCustomLayer
Link copied to clipboard

Adds a new [style custom layer](https://docs.mapbox.com/mapbox-gl-js/style-spec/#layers). Note: This is an experimental API and is a subject to change. Whenever a new style is being parsed and currently used style has persistent layers, an engine will try to do following: - keep the persistent layer at its relative position - keep the source used by a persistent layer - keep images added through `addStyleImage` method In cases when a new style has the same layer, source or image resource, style's resources would be used instead and `MapLoadingError` event will be emitted.

open fun addPersistentStyleCustomLayer(layerId: String, layerHost: CustomLayerHost, layerPosition: LayerPosition): Expected<String, None>
addPersistentStyleLayer
Link copied to clipboard

Adds a new [style layer](https://docs.mapbox.com/mapbox-gl-js/style-spec/#layers). Note: This is an experimental API and is a subject to change. Whenever a new style is being parsed and currently used style has persistent layers, an engine will try to do following: - keep the persistent layer at its relative position - keep the source used by a persistent layer - keep images added through `addStyleImage` method In cases when a new style has the same layer, source or image resource, style's resources would be used instead and `MapLoadingError` event will be emitted.

open fun addPersistentStyleLayer(properties: Value, layerPosition: LayerPosition): Expected<String, None>
addStyleCustomGeometrySource
Link copied to clipboard

Adds a custom geometry to be used in the style. To add the data, implement the fetchTileFunction callback in the options and call setStyleCustomGeometrySourceTileData()

open fun addStyleCustomGeometrySource(sourceId: String, options: CustomGeometrySourceOptions): Expected<String, None>
addStyleCustomLayer
Link copied to clipboard

Adds a new [style custom layer](https://docs.mapbox.com/mapbox-gl-js/style-spec/#layers). Runtime style layers are valid until they are either removed or a new style is loaded.

open fun addStyleCustomLayer(layerId: String, layerHost: CustomLayerHost, layerPosition: LayerPosition): Expected<String, None>
addStyleImage
Link copied to clipboard

Adds an image to be used in the style. This API can also be used for updating an image. If the image for a given `imageId` was already added, it gets replaced by the new image. The image can be used in [`icon-image`](https://www.mapbox.com/mapbox-gl-js/style-spec/#layout-symbol-icon-image), [`fill-pattern`](https://www.mapbox.com/mapbox-gl-js/style-spec/#paint-fill-fill-pattern), [`line-pattern`](https://www.mapbox.com/mapbox-gl-js/style-spec/#paint-line-line-pattern) and [`text-field`](https://www.mapbox.com/mapbox-gl-js/style-spec/#layout-symbol-text-field) properties.

open fun addStyleImage(imageId: String, scale: Float, image: Image, sdf: Boolean, stretchX: List<ImageStretches>, stretchY: List<ImageStretches>, content: ImageContent): Expected<String, None>
addStyleLayer
Link copied to clipboard

Adds a new [style layer](https://docs.mapbox.com/mapbox-gl-js/style-spec/#layers). Runtime style layers are valid until they are either removed or a new style is loaded.

open fun addStyleLayer(properties: Value, layerPosition: LayerPosition): Expected<String, None>
addStyleSource
Link copied to clipboard

Adds a new [style source](https://docs.mapbox.com/mapbox-gl-js/style-spec/#sources).

open fun addStyleSource(sourceId: String, properties: Value): Expected<String, None>
cameraForCoordinateBounds
Link copied to clipboard

Convenience method that returns the `camera options` object for given parameters.

open fun cameraForCoordinateBounds(bounds: CoordinateBounds, padding: EdgeInsets, bearing: Double, pitch: Double): CameraOptions
cameraForCoordinates
Link copied to clipboard

Convenience method that adjusts the provided `camera options` object for given parameters. Returns the provided `camera` options with zoom adjusted to fit `coordinates` into the `box`, so that `coordinates` on the left, top and right of the effective `camera` center at the principal point of the projection (defined by `padding`) fit into the `box`. Returns the provided `camera` options object unchanged upon an error. Note that this method may fail if the principal point of the projection is not inside the `box` or if there is no sufficient screen space, defined by principal point and the `box`, to fit the geometry.

open fun cameraForCoordinates(coordinates: List<Point>, camera: CameraOptions, box: ScreenBox): CameraOptions

Convenience method that returns the `camera options` object for given parameters.

open fun cameraForCoordinates(coordinates: List<Point>, padding: EdgeInsets, bearing: Double, pitch: Double): CameraOptions
cameraForGeometry
Link copied to clipboard

Convenience method that returns the `camera options` object for given parameters.

open fun cameraForGeometry(geometry: Geometry, padding: EdgeInsets, bearing: Double, pitch: Double): CameraOptions
clearData
Link copied to clipboard

Clears temporary map data. Clears temporary map data from the data path defined in the given resource options. Useful to reduce the disk usage or in case the disk cache contains invalid data. Note that calling this API will affect all maps that use the same data path. Note that calling this API does not affect persistent map data like offline style packages.

open fun clearData(resourceOptions: ResourceOptions, callback: AsyncOperationResultCallback)
coordinateBoundsForCamera
Link copied to clipboard

Returns the `coordinate bounds` for a given camera. Note that if the given `camera` shows the antimeridian, the returned wrapped `coordinate bounds` might not represent the minimum bounding box.

open fun coordinateBoundsForCamera(camera: CameraOptions): CoordinateBounds
coordinateBoundsZoomForCamera
Link copied to clipboard

Returns the `coordinate bounds` and the `zoom` for a given `camera`. Note that if the given `camera` shows the antimeridian, the returned wrapped `coordinate bounds` might not represent the minimum bounding box.

open fun coordinateBoundsZoomForCamera(camera: CameraOptions): CoordinateBoundsZoom
coordinateBoundsZoomForCameraUnwrapped
Link copied to clipboard

Returns the unwrapped `coordinate bounds` and `zoom` for a given `camera`. This method is particularly useful, if the `camera` shows the antimeridian.

open fun coordinateBoundsZoomForCameraUnwrapped(camera: CameraOptions): CoordinateBoundsZoom
coordinateForPixel
Link copied to clipboard

Calculates a geographical `coordinate` (i.e., longitude-latitude pair) that corresponds to a `screen coordinate`. The screen coordinate is in `platform pixels`relative to the top left corner of the map (not of the whole screen).

open fun coordinateForPixel(pixel: ScreenCoordinate): Point
coordinatesForPixels
Link copied to clipboard

Calculates geographical `coordinates` (i.e., longitude-latitude pairs) that correspond to `screen coordinates`. The screen coordinates are in `platform pixels` relative to the top left corner of the map (not of the whole screen).

open fun coordinatesForPixels(pixels: List<ScreenCoordinate>): List<Point>
createRenderer
Link copied to clipboard

Creates the infrastructure needed for rendering the map. It should be called before any call to `render` method. Must be called on the render thread.

open fun createRenderer()
destroyRenderer
Link copied to clipboard

Destroys the infrastructure needed for rendering the map, releasing resources. Must be called on the render thread.

open fun destroyRenderer()
dragEnd
Link copied to clipboard

Ends the ongoing drag gesture. This function should be called always after the user has ended a drag gesture initiated by `dragStart`.

open fun dragEnd()
dragStart
Link copied to clipboard

Prepares the drag gesture to use the provided screen coordinate as a pivot `point`. This function should be called each time when user starts a dragging action (e.g. by clicking on the map). The following dragging will be relative to the pivot.

open fun dragStart(point: ScreenCoordinate)
getBounds
Link copied to clipboard

Returns the `camera bounds` of the map.

open fun getBounds(): CameraBounds
getCameraState
Link copied to clipboard

Returns the current `camera state`.

open fun getCameraState(): CameraState
getDebug
Link copied to clipboard

Returns the `map debug options`.

open fun getDebug(): List<MapDebugOptions>
getDragCameraOptions
Link copied to clipboard

Calculates target point where camera should move after drag. The method should be called after `dragStart` and before `dragEnd`.

open fun getDragCameraOptions(fromPoint: ScreenCoordinate, toPoint: ScreenCoordinate): CameraOptions
getElevation
Link copied to clipboard

Gets elevation for the given coordinate. Note: Elevation is only available for the visible region on the screen.

open fun getElevation(coordinate: Point): Double
getFeatureState
Link copied to clipboard

Gets the state map of a feature within a style source. Note that updates to feature state are asynchronous, so changes made by other methods might not be immediately visible.

open fun getFeatureState(sourceId: String, sourceLayerId: String, featureId: String, callback: QueryFeatureStateCallback)
getFreeCameraOptions
Link copied to clipboard

Gets the map's current free camera options. After mutation, it should be set back to the map.

open fun getFreeCameraOptions(): FreeCameraOptions
getMapOptions
Link copied to clipboard

Returns the `map options`.

open fun getMapOptions(): MapOptions
getMapProjection
Link copied to clipboard

Returns the currently active map projection and its properties as key-value pairs. Common properties shared by all map projections are: - "name" with possible values "mercator" or "globe".

open fun getMapProjection(): Value
getNativePtr
Link copied to clipboard

Experimental feature. Do not use.

open fun getNativePtr(): Long
getPrefetchZoomDelta
Link copied to clipboard

Returns the map's prefetch zoom delta.

open fun getPrefetchZoomDelta(): Byte
getRenderCacheOptions
Link copied to clipboard

Returns the `render cache options` used by the map.

open fun getRenderCacheOptions(): RenderCacheOptions
getResourceOptions
Link copied to clipboard

Gets the resource options for the map. All optional fields of the retuned object are initialized with the actual values. Note that result of this method is different from the `resource options` that were provided to the map's constructor.

open fun getResourceOptions(): ResourceOptions
getSize
Link copied to clipboard

Gets the size of the map.

open fun getSize(): Size
getStyleDefaultCamera
Link copied to clipboard

Returns the map style's default camera, if any, or a default camera otherwise. The map style's default camera is defined as follows: - [center](https://docs.mapbox.com/mapbox-gl-js/style-spec/#root-center) - [zoom](https://docs.mapbox.com/mapbox-gl-js/style-spec/#root-zoom) - [bearing](https://docs.mapbox.com/mapbox-gl-js/style-spec/#root-bearing) - [pitch](https://docs.mapbox.com/mapbox-gl-js/style-spec/#root-pitch) The style default camera is re-evaluated when a new style is loaded.

open fun getStyleDefaultCamera(): CameraOptions
getStyleImage
Link copied to clipboard

Get an `image` from the style.

open fun getStyleImage(imageId: String): Image
getStyleJSON
Link copied to clipboard

Get the JSON serialization string of the current style in use.

open fun getStyleJSON(): String
getStyleLayerProperties
Link copied to clipboard

Gets style layer properties.

open fun getStyleLayerProperties(layerId: String): Expected<String, Value>
getStyleLayerProperty
Link copied to clipboard

Gets the value of style layer property.

open fun getStyleLayerProperty(layerId: String, property: String): StylePropertyValue
getStyleLayerPropertyDefaultValue
Link copied to clipboard

Gets the default value of style layer property

open fun getStyleLayerPropertyDefaultValue(layerType: String, property: String): StylePropertyValue
getStyleLayers
Link copied to clipboard

Returns the existing style layers.

open fun getStyleLayers(): List<StyleObjectInfo>
getStyleLightProperty
Link copied to clipboard

Gets the value of a style light property.

open fun getStyleLightProperty(property: String): StylePropertyValue
getStyleSourceProperties
Link copied to clipboard

Gets style source properties.

open fun getStyleSourceProperties(sourceId: String): Expected<String, Value>
getStyleSourceProperty
Link copied to clipboard

Gets the value of style source property.

open fun getStyleSourceProperty(sourceId: String, property: String): StylePropertyValue
getStyleSourcePropertyDefaultValue
Link copied to clipboard

Gets the default value of style source property.

open fun getStyleSourcePropertyDefaultValue(sourceType: String, property: String): StylePropertyValue
getStyleSources
Link copied to clipboard

Returns the existing style sources.

open fun getStyleSources(): List<StyleObjectInfo>
getStyleTerrainProperty
Link copied to clipboard

Gets the value of a style terrain property.

open fun getStyleTerrainProperty(property: String): StylePropertyValue
getStyleTransition
Link copied to clipboard

Returns the map style's transition options. By default, the style parser will attempt to read the style default transition options, if any, fallbacking to an immediate transition otherwise. Transition options can be overriden via `setStyleTransition`, but the options are reset once a new style has been loaded. The style transition is re-evaluated when a new style is loaded.

open fun getStyleTransition(): TransitionOptions
getStyleURI
Link copied to clipboard

Get the URI of the current style in use.

open fun getStyleURI(): String

Invalidate region for provided custom geometry source.

open fun invalidateStyleCustomGeometrySourceRegion(sourceId: String, bounds: CoordinateBounds): Expected<String, None>
invalidateStyleCustomGeometrySourceTile
Link copied to clipboard

Invalidate tile for provided custom geometry source.

open fun invalidateStyleCustomGeometrySourceTile(sourceId: String, tileId: CanonicalTileID): Expected<String, None>
isGestureInProgress
Link copied to clipboard

Returns `true` if a gesture is currently in progress.

open fun isGestureInProgress(): Boolean
isMapLoaded
Link copied to clipboard

Returns `true` when the map is completely rendered, `false` otherwise. A partially rendered map ranges from nothing rendered at all to only labels missing.

open fun isMapLoaded(): Boolean
isStyleLayerPersistent
Link copied to clipboard

Checks if a style layer is persistent. Note: This is an experimental API and is a subject to change.

open fun isStyleLayerPersistent(layerId: String): Expected<String, Boolean>
isStyleLoaded
Link copied to clipboard

Check if the style is completely loaded. Note: The style specified sprite would be marked as loaded even with sprite loading error (An error will be emitted via `MapLoadingError`). Sprite loading error is not fatal and we don't want it to block the map rendering, thus the function will still return `true` if style and sources are fully loaded.

open fun isStyleLoaded(): Boolean
isUserAnimationInProgress
Link copied to clipboard

Returns `true` if user animation is currently in progress.

open fun isUserAnimationInProgress(): Boolean
moveStyleLayer
Link copied to clipboard

Moves an existing style layer

open fun moveStyleLayer(layerId: String, layerPosition: LayerPosition): Expected<String, None>
pixelForCoordinate
Link copied to clipboard

Calculates a `screen coordinate` that corresponds to a geographical coordinate (i.e., longitude-latitude pair). The `screen coordinate` is in `platform pixels` relative to the top left corner of the map (not of the whole screen).

open fun pixelForCoordinate(coordinate: Point): ScreenCoordinate
pixelsForCoordinates
Link copied to clipboard

Calculates `screen coordinates` that correspond to geographical `coordinates` (i.e., longitude-latitude pairs). The `screen coordinates` are in `platform pixels` relative to the top left corner of the map (not of the whole screen).

open fun pixelsForCoordinates(coordinates: List<Point>): List<ScreenCoordinate>
queryFeatureExtensions
Link copied to clipboard

Queries for feature extension values in a GeoJSON source.

open fun queryFeatureExtensions(sourceIdentifier: String, feature: Feature, extension: String, extensionField: String, args: HashMap<String, Value>, callback: QueryFeatureExtensionCallback)
queryRenderedFeatures
Link copied to clipboard

Queries the map for rendered features.

open fun queryRenderedFeatures(box: ScreenBox, options: RenderedQueryOptions, callback: QueryFeaturesCallback)
open fun queryRenderedFeatures(pixel: ScreenCoordinate, options: RenderedQueryOptions, callback: QueryFeaturesCallback)
open fun queryRenderedFeatures(shape: List<ScreenCoordinate>, options: RenderedQueryOptions, callback: QueryFeaturesCallback)
querySourceFeatures
Link copied to clipboard

Queries the map for source features.

open fun querySourceFeatures(sourceId: String, options: SourceQueryOptions, callback: QueryFeaturesCallback)
reduceMemoryUse
Link copied to clipboard

Reduces memory use. Useful to call when the application gets paused or sent to background.

open fun reduceMemoryUse()
removeFeatureState
Link copied to clipboard

Removes entries from a feature state object. Remove a specified property or all property from a feature's state object, depending on the value of `stateKey`. Note that updates to feature state are asynchronous, so changes made by this method migth not be immediately visible using `getStateFeature`.

open fun removeFeatureState(sourceId: String, sourceLayerId: String, featureId: String, stateKey: String)
removeStyleImage
Link copied to clipboard

Removes an image from the style.

open fun removeStyleImage(imageId: String): Expected<String, None>
removeStyleLayer
Link copied to clipboard

Removes an existing style layer.

open fun removeStyleLayer(layerId: String): Expected<String, None>
removeStyleSource
Link copied to clipboard

Removes an existing style source.

open fun removeStyleSource(sourceId: String): Expected<String, None>
render
Link copied to clipboard

Renders the map.

open fun render()
setBounds
Link copied to clipboard

Sets the `camera bounds options` of the map. The map will retain its current values for any details not passed via the camera bounds options arguments. When camera bounds options are set, the camera center is constrained by these bounds, as well as the minimum zoom level of the camera, to prevent out of bounds areas to be visible. Note that tilting or rotating the map, or setting stricter minimum and maximum zoom within `options` may still cause some out of bounds areas to become visible.

open fun setBounds(options: CameraBoundsOptions): Expected<String, None>
setCamera
Link copied to clipboard

Changes the map view by any combination of center, zoom, bearing, and pitch, without an animated transition. The map will retain its current values for any details not passed via the camera options argument. It is not guaranteed that the provided `camera options` will be set, the map may apply constraints resulting in a different `camera state`.

open fun setCamera(cameraOptions: CameraOptions)

Sets the map view with the free camera options. The `free camera options` provides more direct access to the underlying camera entity. For backwards compatibility the state set using this API must be representable with `camera options` as well. Parameters are clamped to a valid range or discarded as invalid if the conversion to the pitch and bearing presentation is ambiguous. For example orientation can be invalid if it leads to the camera being upside down or the quaternion has zero length.

open fun setCamera(freeCameraOptions: FreeCameraOptions)
setConstrainMode
Link copied to clipboard

Sets the map `constrain mode`.

open fun setConstrainMode(mode: ConstrainMode)
setDebug
Link copied to clipboard

Sets the `map debug options` and enables debug mode based on the passed value.

open fun setDebug(debugOptions: List<MapDebugOptions>, value: Boolean)
setFeatureState
Link copied to clipboard

Updates the state object of a feature within a style source. Update entries in the `state` object of a given feature within a style source. Only properties of the `state` object will be updated. A property in the feature `state` object that is not listed in `state` will retain its previous value. Note that updates to feature `state` are asynchronous, so changes made by this method migth not be immediately visible using `getStateFeature`.

open fun setFeatureState(sourceId: String, sourceLayerId: String, featureId: String, state: Value)
setGestureInProgress
Link copied to clipboard

Tells the map rendering engine that there is currently a gesture in progress. This affects how the map renders labels, as it will use different texture filters if a gesture is ongoing.

open fun setGestureInProgress(inProgress: Boolean)
setMapProjection
Link copied to clipboard

Updates the active map projection. The function expects a collection of common and projection specific properties. Common properties shared by all map projections are: - "name" with possible values "mercator" or "globe".

open fun setMapProjection(projection: Value): Expected<String, None>
setNorthOrientation
Link copied to clipboard

Sets the north `orientation mode`.

open fun setNorthOrientation(orientation: NorthOrientation)
setPrefetchZoomDelta
Link copied to clipboard

When loading a map, if prefetch zoom `delta` is set to any number greater than 0, the map will first request a tile at zoom level lower than `zoom - delta`, with requested zoom level a multiple of `delta`, in an attempt to display a full map at lower resolution as quick as possible.

open fun setPrefetchZoomDelta(delta: Byte)
setRenderCacheOptions
Link copied to clipboard

Enables or disables the experimental render cache feature. Render cache is an experimental feature aiming to reduce resource usage of map rendering by caching intermediate rendering results of tiles into specific cache textures for reuse between frames. Performance benefit of the cache depends on the style as not all layers are cacheable due to e.g. viewport aligned features. Render cache always prefers quality over performance.

open fun setRenderCacheOptions(options: RenderCacheOptions)
setSize
Link copied to clipboard

Sets the size of the map.

open fun setSize(size: Size)
setStyleCustomGeometrySourceTileData
Link copied to clipboard

Set tile data of a custom geometry.

open fun setStyleCustomGeometrySourceTileData(sourceId: String, tileId: CanonicalTileID, featureCollection: List<Feature>): Expected<String, None>
setStyleJSON
Link copied to clipboard

Load the style from a provided JSON string.

open fun setStyleJSON(json: String)
setStyleLayerProperties
Link copied to clipboard

Sets style layer properties. This method can be used to perform batch update for a style layer properties. The structure of a provided `properties` value must conform to a format for a corresponding [layer type](https://docs.mapbox.com/mapbox-gl-js/style-spec/layers/). Modification of a layer [id](https://docs.mapbox.com/mapbox-gl-js/style-spec/layers/#id) and/or a [layer type] (https://docs.mapbox.com/mapbox-gl-js/style-spec/layers/#type) is not allowed.

open fun setStyleLayerProperties(layerId: String, properties: Value): Expected<String, None>
setStyleLayerProperty
Link copied to clipboard

Sets a value to a style layer property.

open fun setStyleLayerProperty(layerId: String, property: String, value: Value): Expected<String, None>
setStyleLight
Link copied to clipboard

Sets the style global [light](https://docs.mapbox.com/mapbox-gl-js/style-spec/#light) properties.

open fun setStyleLight(properties: Value): Expected<String, None>
setStyleLightProperty
Link copied to clipboard

Sets a value to the the style light property.

open fun setStyleLightProperty(property: String, value: Value): Expected<String, None>
setStyleSourceProperties
Link copied to clipboard

Sets style source properties. This method can be used to perform batch update for a style source properties. The structure of a provided `properties` value must conform to a format for a corresponding [source type](https://docs.mapbox.com/mapbox-gl-js/style-spec/sources/). Modification of a source [type](https://docs.mapbox.com/mapbox-gl-js/style-spec/sources/#type) is not allowed.

open fun setStyleSourceProperties(sourceId: String, properties: Value): Expected<String, None>
setStyleSourceProperty
Link copied to clipboard

Sets a value to a style source property. Note: When setting the `data` property of a `geojson` source, this method never returns an error. In case of success, a `map-loaded` event will be propagated. In case of errors, a `map-loading-error` event will be propagated instead.

open fun setStyleSourceProperty(sourceId: String, property: String, value: Value): Expected<String, None>
setStyleTerrain
Link copied to clipboard

Sets the style global [terrain](https://docs.mapbox.com/mapbox-gl-js/style-spec/#terrain) properties.

open fun setStyleTerrain(properties: Value): Expected<String, None>
setStyleTerrainProperty
Link copied to clipboard

Sets a value to the the style terrain property.

open fun setStyleTerrainProperty(property: String, value: Value): Expected<String, None>
setStyleTransition
Link copied to clipboard

Overrides the map style's transition options with user-provided options. The style transition is re-evaluated when a new style is loaded.

open fun setStyleTransition(transitionOptions: TransitionOptions)
setStyleURI
Link copied to clipboard

Load style from provided URI. This is an asynchronous call. To check the result of this operation the user must register an observer observing `MapLoaded` or `MapLoadingError` events. In case of successful style load, `StyleLoaded` event will be also emitted.

open fun setStyleURI(uri: String)
setUserAnimationInProgress
Link copied to clipboard

Tells the map rendering engine that the animation is currently performed by the user (e.g. with a `setCamera` calls series). It adjusts the engine for the animation use case. In particular, it brings more stability to symbol placement and rendering.

open fun setUserAnimationInProgress(inProgress: Boolean)
setViewportMode
Link copied to clipboard

Sets the `viewport mode`.

open fun setViewportMode(mode: ViewportMode)
styleLayerExists
Link copied to clipboard

Checks whether a given style layer exists.

open fun styleLayerExists(layerId: String): Boolean
styleSourceExists
Link copied to clipboard

Checks whether a given style source exists.

open fun styleSourceExists(sourceId: String): Boolean
subscribe
Link copied to clipboard

Subscribes an `observer` to a provided array of event types. The `observable` will hold a strong reference to an `observer` instance, therefore, in order to stop receiving notifications, caller must call `unsubscribe` with an `observer` instance used for an initial subscription.

open fun subscribe(observer: Observer, events: List<String>)
triggerRepaint
Link copied to clipboard

Triggers a repaint of the map.

open fun triggerRepaint()
unsubscribe
Link copied to clipboard

Unsubscribes an `observer` from all events.

open fun unsubscribe(observer: Observer)

Unsubscribes an `observer` from a provided array of event types.

open fun unsubscribe(observer: Observer, events: List<String>)
updateStyleImageSourceImage
Link copied to clipboard

Updates the image of an [image style source](https://docs.mapbox.com/mapbox-gl-js/style-spec/#sources-image).

open fun updateStyleImageSourceImage(sourceId: String, image: Image): Expected<String, None>