CameraManager

Interface for managing camera.

Functions

Link copied to clipboard
open fun addGeoJSONSourceFeatures(@NonNull sourceId: String, @NonNull dataId: String, @NonNull features: List<Feature>): Expected<String, None>
Add additional features to a GeoJSON style source.
Link copied to clipboard
Adds a new [style custom layer](https://docs.mapbox.com/mapbox-gl-js/style-spec/#layers).
Link copied to clipboard
Adds a new [style layer](https://docs.mapbox.com/mapbox-gl-js/style-spec/#layers).
Link copied to clipboard
Adds a custom geometry to be used in the style.
Link copied to clipboard
Adds a new [style custom layer](https://docs.mapbox.com/mapbox-gl-js/style-spec/#layers).
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
Adds a model to be used in the style.
Link copied to clipboard
Adds a new [style source](https://docs.mapbox.com/mapbox-gl-js/style-spec/#sources).
Link copied to clipboard
Convenience method that returns the `camera options` object for given parameters.
Link copied to clipboard
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
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
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
Gets the value of style import config.
Link copied to clipboard
Returns the existing style imports.
Link copied to clipboard
Gets style import schema.
Link copied to clipboard
Get the JSON serialization string of the current style in use.
Link copied to clipboard
Gets style layer properties.
Link copied to clipboard
Gets the value of style layer property.
Link copied to clipboard
Gets the default value of style layer property
Link copied to clipboard
Returns the existing style layers.
Link copied to clipboard
Gets the value of a style projection property.
Link copied to clipboard
Gets style source properties.
Link copied to clipboard
Gets the value of style source property.
Link copied to clipboard
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.
Invalidate region for provided custom geometry source.
Link copied to clipboard
Invalidate tile for provided custom geometry source.
Link copied to clipboard
Checks if a style layer is persistent.
Link copied to clipboard
Check if the style is completely loaded.
Link copied to clipboard
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
Remove features from a GeoJSON style source.
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
Sets the `camera bounds options` of the map.
Link copied to clipboard
open fun setCamera(@NonNull cameraOptions: CameraOptions)
Changes the map view by any combination of center, zoom, bearing, and pitch, without an animated transition.
open fun setCamera(@NonNull freeCameraOptions: FreeCameraOptions)
Sets the map view with the free camera options.
Link copied to clipboard
open fun setRenderWorldCopies(renderWorldCopies: Boolean)
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
Sets a value to the the style atmosphere property.
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
Sets style import config.
Link copied to clipboard
Sets a value to a style import config.
Link copied to clipboard
open fun setStyleJSON(@NonNull json: String, @NonNull stylingOptions: RuntimeStylingOptions)
Load the style from a provided JSON string.
Link copied to clipboard
Sets style layer properties.
Link copied to clipboard
Sets a value to a style layer property.
Link copied to clipboard
Sets the map's [projection](https://docs.mapbox.com/mapbox-gl-js/style-spec/projection/).
Link copied to clipboard
Sets a value to the the style projection property.
Link copied to clipboard
Sets style source properties.
Link copied to clipboard
Sets a value to a style source property.
Link copied to clipboard
Sets the style global [terrain](https://docs.mapbox.com/mapbox-gl-js/style-spec/#terrain) properties.
Link copied to clipboard
Sets a value to the the style terrain property.
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
Link copied to clipboard
open fun updateGeoJSONSourceFeatures(@NonNull sourceId: String, @NonNull dataId: String, @NonNull features: List<Feature>): Expected<String, None>
Update existing features in a GeoJSON style source.
Link copied to clipboard
Updates the image of an [image style source](https://docs.mapbox.com/mapbox-gl-js/style-spec/#sources-image).