The general class to interact with in the Mapbox Maps SDK for Android. It exposes the entry point for all methods related to the Map object. You cannot instantiate MapboxMap object directly, rather, you must obtain one from the getMapboxMap() method MapView that you have added to your application.
Note: Similar to a View object, a MapboxMap should only be read and modified from the main thread.
Convenience method that returns the camera options object for given arguments
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.
In some cases querying source / render features is expected to be a blocking operation e.g. performing this action on map click. In this case in order to avoid deadlock on main thread querying could be performed on render thread and in that case querying result will be also delivered on render thread not leading to the main thread deadlock. Example:
Returns the children (original points or clusters) of a cluster (on the next zoom level) given its id (cluster_id value from feature properties) from a GeoJsonSource.
Returns the zoom on which the cluster expands into several children (useful for "click to zoom" feature) given the cluster's cluster_id (cluster_id value from feature properties) from a GeoJsonSource.
Returns all the leaves (original points) of a cluster (given its cluster_id) from a GeoJsonSource, with pagination support: limit is the number of leaves to return (set to Infinity for all points), and offset is the amount of points to skip (for pagination).
Calculate distance spanned by one pixel at the specified latitude at current zoom level.
Load the style from Style Extension.
Load style JSON.
Load style JSON
Will load a new map style asynchronous from the specified URI.
Queries the map for rendered features.
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 CameraOptions will be set, the map may apply constraints resulting in a different CameraState.
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.
Subscribes an Observer to a provided list of event types. Observable will hold a strong reference to an \sa Observer instance, therefore, in order to stop receiving notifications, caller must call unsubscribe with an \sa Observer instance used for an initial subscription.