Camera Manager
Interface for managing camera.
Functions
Link copied to clipboard
open fun addPersistentStyleCustomLayer(@NonNull layerId: String, @NonNull layerHost: CustomLayerHost, @Nullable layerPosition: LayerPosition): Expected<String, None>
Adds a new [style custom layer](https://docs.mapbox.com/mapbox-gl-js/style-spec/#layers).
Link copied to clipboard
open fun addPersistentStyleLayer(@NonNull properties: Value, @Nullable layerPosition: LayerPosition): Expected<String, None>
Adds a new [style layer](https://docs.mapbox.com/mapbox-gl-js/style-spec/#layers).
Link copied to clipboard
open fun addStyleCustomGeometrySource(@NonNull sourceId: String, @NonNull options: CustomGeometrySourceOptions): Expected<String, None>
Adds a custom geometry to be used in the style.
Link copied to clipboard
open fun addStyleCustomLayer(@NonNull layerId: String, @NonNull layerHost: CustomLayerHost, @Nullable layerPosition: LayerPosition): Expected<String, None>
Adds a new [style custom layer](https://docs.mapbox.com/mapbox-gl-js/style-spec/#layers).
Link copied to clipboard
open fun addStyleCustomRasterSource(@NonNull sourceId: String, @NonNull options: CustomRasterSourceOptions): Expected<String, None>
Note!
Link copied to clipboard
open fun addStyleImage(@NonNull imageId: String, scale: Float, @NonNull image: Image, sdf: Boolean, @NonNull stretchX: List<ImageStretches>, @NonNull stretchY: List<ImageStretches>, @Nullable content: ImageContent): Expected<String, None>
Adds an image to be used in the style.
Link copied to clipboard
open fun addStyleLayer(@NonNull properties: Value, @Nullable layerPosition: LayerPosition): Expected<String, None>
Adds a new [style layer](https://docs.mapbox.com/mapbox-gl-js/style-spec/#layers).
Link copied to clipboard
open fun cameraForCoordinateBounds(@NonNull bounds: CoordinateBounds, @Nullable padding: EdgeInsets, @Nullable bearing: Double, @Nullable pitch: Double, @Nullable maxZoom: Double, @Nullable offset: ScreenCoordinate): CameraOptions
Convenience method that returns the `camera options` object for given parameters.
Link copied to clipboard
open fun cameraForCoordinates(@NonNull coordinates: List<Point>, @NonNull camera: CameraOptions, @NonNull box: ScreenBox): CameraOptions
Convenience method that adjusts the provided `camera options` object for given parameters.
open fun cameraForCoordinates(@NonNull coordinates: List<Point>, @Nullable padding: EdgeInsets, @Nullable bearing: Double, @Nullable pitch: Double): CameraOptions
open fun cameraForCoordinates(@NonNull coordinates: List<Point>, @Nullable camera: CameraOptions, @Nullable coordinatesPadding: EdgeInsets, @Nullable maxZoom: Double, @Nullable offset: ScreenCoordinate): Expected<String, CameraOptions>
Convenience method that returns the `camera options` object for given parameters.
Link copied to clipboard
open fun cameraForDrag(@NonNull startCoordinate: ScreenCoordinate, @NonNull endCoordinate: ScreenCoordinate): CameraOptions
Convenience method that returns the `camera options` object for given parameters.
Link copied to clipboard
open fun cameraForGeometry(@NonNull geometry: Geometry, @Nullable padding: EdgeInsets, @Nullable bearing: Double, @Nullable pitch: Double): CameraOptions
Convenience method that returns the `camera options` object for given parameters.
Link copied to clipboard
Returns the `coordinate bounds` for a given camera.
Link copied to clipboard
Returns the `coordinate bounds` for a given camera.
Link copied to clipboard
Returns the `coordinate bounds` and the `zoom` for a given `camera`.
Link copied to clipboard
open fun coordinateBoundsZoomForCameraUnwrapped(@NonNull camera: CameraOptions): CoordinateBoundsZoom
Returns the unwrapped `coordinate bounds` and `zoom` for a given `camera`.
Link copied to clipboard
Calculates a geographical `coordinate` (i.e., longitude-latitude pair) that corresponds to a `screen coordinate`.
Link copied to clipboard
Calculates the geographical coordinate information that corresponds to a given screen coordinate.
Link copied to clipboard
Calculates geographical `coordinates` (i.e., longitude-latitude pairs) that correspond to `screen coordinates`.
Link copied to clipboard
Calculates the geographical coordinates information that corresponds to the given screen coordinates.
Link copied to clipboard
Returns the `camera bounds` of the map.
Link copied to clipboard
Returns the current `camera state`.
Link copied to clipboard
Gets the map's current free camera options.
Link copied to clipboard
Returns whether multiple copies of the world are being rendered side by side beyond -180 and 180 degrees longitude.
Link copied to clipboard
Gets the value of a style atmosphere property.
Link copied to clipboard
Returns the map style's default camera, if any, or a default camera otherwise.
Link copied to clipboard
Get an `image` from the style.
Link copied to clipboard
open fun getStyleImportConfigProperties(@NonNull importId: String): Expected<String, HashMap<String, StylePropertyValue>>
Gets style import config.
Link copied to clipboard
open fun getStyleImportConfigProperty(@NonNull importId: String, @NonNull config: String): Expected<String, StylePropertyValue>
Gets the value of style import config.
Link copied to clipboard
Returns the existing style imports.
Link copied to clipboard
Get the JSON serialization string of the current style in use.
Link copied to clipboard
open fun getStyleLayerProperty(@NonNull layerId: String, @NonNull property: String): StylePropertyValue
Gets the value of style layer property.
Link copied to clipboard
open fun getStyleLayerPropertyDefaultValue(@NonNull layerType: String, @NonNull property: String): StylePropertyValue
Gets the default value of style layer property
Link copied to clipboard
Returns the existing style layers.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Gets the value of a style projection property.
Link copied to clipboard
open fun getStyleSourceProperty(@NonNull sourceId: String, @NonNull property: String): StylePropertyValue
Gets the value of style source property.
Link copied to clipboard
open fun getStyleSourcePropertyDefaultValue(@NonNull sourceType: String, @NonNull property: String): StylePropertyValue
Gets the default value of style source property.
Link copied to clipboard
Returns the existing style sources.
Link copied to clipboard
Gets the value of a style terrain property.
Link copied to clipboard
Returns the map style's transition options.
Link copied to clipboard
Get the URI of the current style in use.
Link copied to clipboard
Checks whether an image exists.
Link copied to clipboard
Checks whether a model exists.
Link copied to clipboard
open fun invalidateStyleCustomGeometrySourceRegion(@NonNull sourceId: String, @NonNull bounds: CoordinateBounds): Expected<String, None>
Invalidate region for provided custom geometry source.
Link copied to clipboard
open fun invalidateStyleCustomGeometrySourceTile(@NonNull sourceId: String, @NonNull tileId: CanonicalTileID): Expected<String, None>
Invalidate tile for provided custom geometry source.
Link copied to clipboard
open fun invalidateStyleCustomRasterSourceRegion(@NonNull sourceId: String, @NonNull bounds: CoordinateBounds): Expected<String, None>
Note!
Link copied to clipboard
open fun invalidateStyleCustomRasterSourceTile(@NonNull sourceId: String, @NonNull tileId: CanonicalTileID): Expected<String, None>
Note!
Link copied to clipboard
Check if the style is completely loaded.
Link copied to clipboard
open fun moveStyleLayer(@NonNull layerId: String, @Nullable layerPosition: LayerPosition): Expected<String, None>
Moves an existing style layer
Link copied to clipboard
Calculates a `screen coordinate` that corresponds to a geographical coordinate (i.e., longitude-latitude pair).
Link copied to clipboard
Calculates `screen coordinates` that correspond to geographical `coordinates` (i.e., longitude-latitude pairs).
Link copied to clipboard
Removes an image from the style.
Link copied to clipboard
Removes an existing style import.
Link copied to clipboard
Removes an existing style layer.
Link copied to clipboard
Removes a model from the style.
Link copied to clipboard
Removes an existing style source.
Link copied to clipboard
Changes the map view by any combination of center, zoom, bearing, and pitch, without an animated transition.
Sets the map view with the free camera options.
Link copied to clipboard
Sets whether multiple copies of the world will be rendered side by side beyond -180 and 180 degrees longitude.
Link copied to clipboard
Sets the style global [atmosphere](https://docs.mapbox.com/mapbox-gl-js/style-spec/#fog) properties.
Link copied to clipboard
open fun setStyleCustomGeometrySourceTileData(@NonNull sourceId: String, @NonNull tileId: CanonicalTileID, @NonNull featureCollection: List<Feature>): Expected<String, None>
Set tile data of a custom geometry.
Link copied to clipboard
open fun setStyleCustomRasterSourceTileData(@NonNull sourceId: String, @NonNull tileId: CanonicalTileID, @Nullable image: Image): Expected<String, None>
Note!
Link copied to clipboard
open fun setStyleGeoJSONSourceData(@NonNull sourceId: String, @NonNull dataId: String, @NonNull data: GeoJSONSourceData): Expected<String, None>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Load the style from a provided JSON string.
Link copied to clipboard
Link copied to clipboard
Sets the map's [projection](https://docs.mapbox.com/mapbox-gl-js/style-spec/projection/).
Link copied to clipboard
Link copied to clipboard
Sets the style global [terrain](https://docs.mapbox.com/mapbox-gl-js/style-spec/#terrain) properties.
Link copied to clipboard
Overrides the map style's transition options with user-provided options.
Link copied to clipboard
Load style from provided URI.
Link copied to clipboard
Checks whether a given style layer exists.
Link copied to clipboard
Checks whether a given style source exists.
Link copied to clipboard
Subscribes to `CameraChanged` event.
Subscribes to `MapIdle` event.
Subscribes to `MapLoaded` event.
Subscribes to `MapLoadingError` event.
Subscribes to `PerfStatsCollected` event.
Subscribes to `RenderFrameFinished` event.
Subscribes to `RenderFrameStarted` event.
Subscribes to `ResourceRequest` event.
Subscribes to `SourceAdded` event.
Subscribes to `SourceDataLoaded` event.
Subscribes to `SourceRemoved` event.
Subscribes to `StyleDataLoaded` event.
Subscribes to `StyleImageMissing` event.
Subscribes to `StyleImageRemoveUnused` event.
Subscribes to `StyleLoaded` event.
Subscribes to an experimental `GenericEvent` event.
Link copied to clipboard
open fun tileCover(@NonNull tileCoverOptions: TileCoverOptions, @Nullable cameraOptions: CameraOptions): List<CanonicalTileID>