Camera Manager
Interface for managing camera.
Functions
add Persistent Style Custom Layer
Link copied to clipboard
open fun addPersistentStyleCustomLayer(@NonNull layerId: String, @NonNull layerHost: CustomLayerHost, @Nullable layerPosition: LayerPosition): Expected<String, None>
Content copied to clipboard
Adds a new [style custom layer](https://docs.mapbox.com/mapbox-gl-js/style-spec/#layers).
add Persistent Style Layer
Link copied to clipboard
open fun addPersistentStyleLayer(@NonNull properties: Value, @Nullable layerPosition: LayerPosition): Expected<String, None>
Content copied to clipboard
Adds a new [style layer](https://docs.mapbox.com/mapbox-gl-js/style-spec/#layers).
add Style Custom Geometry Source
Link copied to clipboard
open fun addStyleCustomGeometrySource(@NonNull sourceId: String, @NonNull options: CustomGeometrySourceOptions): Expected<String, None>
Content copied to clipboard
Adds a custom geometry to be used in the style.
add Style Custom Layer
Link copied to clipboard
open fun addStyleCustomLayer(@NonNull layerId: String, @NonNull layerHost: CustomLayerHost, @Nullable layerPosition: LayerPosition): Expected<String, None>
Content copied to clipboard
Adds a new [style custom layer](https://docs.mapbox.com/mapbox-gl-js/style-spec/#layers).
add Style Image
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>
Content copied to clipboard
Adds an image to be used in the style.
add Style Layer
Link copied to clipboard
open fun addStyleLayer(@NonNull properties: Value, @Nullable layerPosition: LayerPosition): Expected<String, None>
Content copied to clipboard
Adds a new [style layer](https://docs.mapbox.com/mapbox-gl-js/style-spec/#layers).
add Style Model
Link copied to clipboard
add Style Source
Link copied to clipboard
camera For Coordinate Bounds
Link copied to clipboard
open fun cameraForCoordinateBounds(@NonNull bounds: CoordinateBounds, @NonNull padding: EdgeInsets, @Nullable bearing: Double, @Nullable pitch: Double): CameraOptions
Content copied to clipboard
Convenience method that returns the `camera options` object for given parameters.
camera For Coordinates
Link copied to clipboard
open fun cameraForCoordinates(@NonNull coordinates: List<Point>, @NonNull camera: CameraOptions, @NonNull box: ScreenBox): CameraOptions
Content copied to clipboard
Convenience method that adjusts the provided `camera options` object for given parameters.
open fun cameraForCoordinates(@NonNull coordinates: List<Point>, @NonNull padding: EdgeInsets, @Nullable bearing: Double, @Nullable pitch: Double): CameraOptions
Content copied to clipboard
Convenience method that returns the `camera options` object for given parameters.
camera For Geometry
Link copied to clipboard
open fun cameraForGeometry(@NonNull geometry: Geometry, @NonNull padding: EdgeInsets, @Nullable bearing: Double, @Nullable pitch: Double): CameraOptions
Content copied to clipboard
Convenience method that returns the `camera options` object for given parameters.
coordinate Bounds For Camera
Link copied to clipboard
open fun coordinateBoundsForCamera(@NonNull camera: CameraOptions): CoordinateBounds
Content copied to clipboard
Returns the `coordinate bounds` for a given camera.
coordinate Bounds For Camera Unwrapped
Link copied to clipboard
open fun coordinateBoundsForCameraUnwrapped(@NonNull camera: CameraOptions): CoordinateBounds
Content copied to clipboard
Returns the `coordinate bounds` for a given camera.
coordinate Bounds Zoom For Camera
Link copied to clipboard
open fun coordinateBoundsZoomForCamera(@NonNull camera: CameraOptions): CoordinateBoundsZoom
Content copied to clipboard
Returns the `coordinate bounds` and the `zoom` for a given `camera`.
coordinate Bounds Zoom For Camera Unwrapped
Link copied to clipboard
open fun coordinateBoundsZoomForCameraUnwrapped(@NonNull camera: CameraOptions): CoordinateBoundsZoom
Content copied to clipboard
Returns the unwrapped `coordinate bounds` and `zoom` for a given `camera`.
coordinate For Pixel
Link copied to clipboard
Calculates a geographical `coordinate` (i.e., longitude-latitude pair) that corresponds to a `screen coordinate`.
coordinates For Pixels
Link copied to clipboard
open fun coordinatesForPixels(@NonNull pixels: List<ScreenCoordinate>): List<Point>
Content copied to clipboard
Calculates geographical `coordinates` (i.e., longitude-latitude pairs) that correspond to `screen coordinates`.
drag Start
Link copied to clipboard
Prepares the drag gesture to use the provided screen coordinate as a pivot `point`.
get Bounds
Link copied to clipboard
Returns the `camera bounds` of the map.
get Camera State
Link copied to clipboard
Returns the current `camera state`.
get Drag Camera Options
Link copied to clipboard
open fun getDragCameraOptions(@NonNull fromPoint: ScreenCoordinate, @NonNull toPoint: ScreenCoordinate): CameraOptions
Content copied to clipboard
Calculates target point where camera should move after drag.
get Free Camera Options
Link copied to clipboard
Gets the map's current free camera options.
get Render World Copies
Link copied to clipboard
Returns whether multiple copies of the world are being rendered side by side beyond -180 and 180 degrees longitude.
get Style Atmosphere Property
Link copied to clipboard
open fun getStyleAtmosphereProperty(@NonNull property: String): StylePropertyValue
Content copied to clipboard
Gets the value of a style atmosphere property.
get Style Default Camera
Link copied to clipboard
Returns the map style's default camera, if any, or a default camera otherwise.
get Style Image
Link copied to clipboard
Get an `image` from the style.
get Style JSON
Link copied to clipboard
Get the JSON serialization string of the current style in use.
get Style Layer Properties
Link copied to clipboard
get Style Layer Property
Link copied to clipboard
open fun getStyleLayerProperty(@NonNull layerId: String, @NonNull property: String): StylePropertyValue
Content copied to clipboard
Gets the value of style layer property.
get Style Layer Property Default Value
Link copied to clipboard
open fun getStyleLayerPropertyDefaultValue(@NonNull layerType: String, @NonNull property: String): StylePropertyValue
Content copied to clipboard
Gets the default value of style layer property
get Style Layers
Link copied to clipboard
Returns the existing style layers.
get Style Light Property
Link copied to clipboard
open fun getStyleLightProperty(@NonNull property: String): StylePropertyValue
Content copied to clipboard
Gets the value of a style light property.
get Style Projection Property
Link copied to clipboard
open fun getStyleProjectionProperty(@NonNull property: String): StylePropertyValue
Content copied to clipboard
Gets the value of a style projection property.
get Style Source Properties
Link copied to clipboard
get Style Source Property
Link copied to clipboard
open fun getStyleSourceProperty(@NonNull sourceId: String, @NonNull property: String): StylePropertyValue
Content copied to clipboard
Gets the value of style source property.
get Style Source Property Default Value
Link copied to clipboard
open fun getStyleSourcePropertyDefaultValue(@NonNull sourceType: String, @NonNull property: String): StylePropertyValue
Content copied to clipboard
Gets the default value of style source property.
get Style Sources
Link copied to clipboard
Returns the existing style sources.
get Style Terrain Property
Link copied to clipboard
open fun getStyleTerrainProperty(@NonNull property: String): StylePropertyValue
Content copied to clipboard
Gets the value of a style terrain property.
get Style Transition
Link copied to clipboard
Returns the map style's transition options.
get Style URI
Link copied to clipboard
Get the URI of the current style in use.
has Style Image
Link copied to clipboard
Checks whether an image exists.
has Style Model
Link copied to clipboard
Checks whether a model exists.
invalidate Style Custom Geometry Source Region
Link copied to clipboard
open fun invalidateStyleCustomGeometrySourceRegion(@NonNull sourceId: String, @NonNull bounds: CoordinateBounds): Expected<String, None>
Content copied to clipboard
Invalidate region for provided custom geometry source.
invalidate Style Custom Geometry Source Tile
Link copied to clipboard
open fun invalidateStyleCustomGeometrySourceTile(@NonNull sourceId: String, @NonNull tileId: CanonicalTileID): Expected<String, None>
Content copied to clipboard
Invalidate tile for provided custom geometry source.
is Style Layer Persistent
Link copied to clipboard
is Style Loaded
Link copied to clipboard
Check if the style is completely loaded.
move Style Layer
Link copied to clipboard
open fun moveStyleLayer(@NonNull layerId: String, @Nullable layerPosition: LayerPosition): Expected<String, None>
Content copied to clipboard
Moves an existing style layer
pixel For Coordinate
Link copied to clipboard
open fun pixelForCoordinate(@NonNull coordinate: Point): ScreenCoordinate
Content copied to clipboard
Calculates a `screen coordinate` that corresponds to a geographical coordinate (i.e., longitude-latitude pair).
pixels For Coordinates
Link copied to clipboard
open fun pixelsForCoordinates(@NonNull coordinates: List<Point>): List<ScreenCoordinate>
Content copied to clipboard
Calculates `screen coordinates` that correspond to geographical `coordinates` (i.e., longitude-latitude pairs).
remove Style Image
Link copied to clipboard
remove Style Layer
Link copied to clipboard
remove Style Model
Link copied to clipboard
remove Style Source
Link copied to clipboard
set Camera
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.
set Render World Copies
Link copied to clipboard
Sets whether multiple copies of the world will be rendered side by side beyond -180 and 180 degrees longitude.
set Style Atmosphere
Link copied to clipboard
set Style Atmosphere Property
Link copied to clipboard
set Style Custom Geometry Source Tile Data
Link copied to clipboard
set Style Geo JSONSource Data
Link copied to clipboard
open fun setStyleGeoJSONSourceData(@NonNull sourceId: String, @NonNull data: GeoJSONSourceData): Expected<String, None>
Content copied to clipboard
set Style JSON
Link copied to clipboard
Load the style from a provided JSON string.
set Style Layer Properties
Link copied to clipboard
set Style Light
Link copied to clipboard
set Style Light Property
Link copied to clipboard
set Style Projection
Link copied to clipboard
set Style Projection Property
Link copied to clipboard
set Style Source Properties
Link copied to clipboard
set Style Terrain
Link copied to clipboard
set Style Terrain Property
Link copied to clipboard
set Style Transition
Link copied to clipboard
open fun setStyleTransition(@NonNull transitionOptions: TransitionOptions)
Content copied to clipboard
Overrides the map style's transition options with user-provided options.
set Style URI
Link copied to clipboard
Load style from provided URI.
style Layer Exists
Link copied to clipboard
Checks whether a given style layer exists.
style Source Exists
Link copied to clipboard
Checks whether a given style source exists.
unsubscribe
Link copied to clipboard
Unsubscribes an `observer` from all events.
update Style Image Source Image
Link copied to clipboard