Package-level declarations

Types

Link copied to clipboard
open class AnnotatedFeature
Represents a variant that can store either a GeoJSON geometry or an annotated layer feature.
Link copied to clipboard
Represents a connection between a view annotation and specific features within a designated layer source.
Link copied to clipboard
Callback invoked once an asynchronous operation completes.
Link copied to clipboard
Holds information about `camera bounds`.
Link copied to clipboard
Holds options to be used for setting `camera bounds`.
Link copied to clipboard
This event is emitted whenever the visible viewport changes its size due to the invocation of the `setSize` and `setBounds` methods or when the camera is modified by calling camera methods.
Link copied to clipboard
This event is emitted whenever the visible viewport changes its size due to the invocation of the `setSize` and `setBounds` methods or when the camera is modified by calling camera methods.
Link copied to clipboard
Various options for describing the viewpoint of a camera.
Link copied to clipboard
Describes the viewpoint of a camera.
Link copied to clipboard
Represents a tile coordinate.
Link copied to clipboard
Describes whether to constrain the map in both axes or only vertically e.g.
Link copied to clipboard
Describes the map context mode.
Link copied to clipboard
A rectangular area as measured on a two-dimensional map projection.
Link copied to clipboard
A coordinate bounds and zoom.
Link copied to clipboard
Represents the coordinate information returned by the `coordinateInfoForPixel` or `coordinatesInfoForPixels` methods.
Link copied to clipboard
Options for custom geometry source.
Link copied to clipboard
interface CustomLayerHost
Interface for hosting a custom map style layer.
Link copied to clipboard
Parameters that define the current camera position for a `CustomLayerHost::render()` function.
Link copied to clipboard
Options for custom raster source.
Link copied to clipboard
Link copied to clipboard
The distance on each side between rectangles, when one is contained into other.
Link copied to clipboard
interface ElevationData
Interface that provides access to elevation data.
Link copied to clipboard
The time interval of an event.
Link copied to clipboard
A value or a collection of a feature extension.
Link copied to clipboard
Callback to get operation status on the feature states asynchronously.
Link copied to clipboard
Various options for accessing physical properties of the underlying camera entity.
Link copied to clipboard
The generic event type.
Link copied to clipboard
Generic event for experimental events.
Link copied to clipboard
Link copied to clipboard
Describes glyphs rasterization modes.
Link copied to clipboard
Describes the glyphs rasterization option values.
Link copied to clipboard
Image type.
Link copied to clipboard
Describes the image content, e.g.
Link copied to clipboard

Class to hold image data either as drawable id or as the Bitmap.

Link copied to clipboard
Describes the image stretch areas.
Link copied to clipboard
Specifies position of a layer that is added via addStyleLayer method.
Link copied to clipboard

Mapbox exception class flagging annotation plugin related RuntimeException did occur.

Link copied to clipboard

Mapbox exception class flagging camera animation plugin related RuntimeException did occur.

Mapbox exception thrown when any collection used to build GeoJson data is mutated.

Link copied to clipboard

A MapboxConfigurationException is thrown by MapboxMap when the SDK hasn't been properly initialised.

Link copied to clipboard

Annotation class to mark API as experimental.

Link copied to clipboard

MapboxLifecycleObserver interface defines the lifecycle events that needed by MapView.

Link copied to clipboard

Mapbox exception class flagging location component plugin related RuntimeException did occur.

Link copied to clipboard

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.

Link copied to clipboard
class MapboxMapException(exceptionText: String?) : RuntimeException

Mapbox exception class flagging map related RuntimeException did occur.

Link copied to clipboard

MapboxMapRecorder provides functions to record and replay API calls of a MapboxMap instance. These recordings can be used to debug issues which require multiple steps to reproduce. Additionally, playbacks can be used for performance testing custom scenarios.

Link copied to clipboard

Manages configuration options that are used by the Maps API objects, such as maps data directory and base URL.

Link copied to clipboard

Mapbox exception class flagging style extension related RuntimeException did occur.

Link copied to clipboard
open class MapboxStyleManager @RestrictTo(value = [RestrictTo.Scope.LIBRARY_GROUP_PREFIX]) constructor(val styleManager: StyleManager, val pixelRatio: Float)

Wrapper class for StyleManager allowing to expose style related methods for MapboxMap.

Link copied to clipboard

Allows to control several levels of tracing that could be useful to understand the performance of Mapbox Maps. For more details about Android tracing refer to relevant section of DEVELOPING.md file.

Link copied to clipboard

Mapbox exception class flagging view annotation related RuntimeException did occur.

Link copied to clipboard
Defines how the map center point should react to terrain elevation changes.
Link copied to clipboard
Collection of useful constants.
Link copied to clipboard

MapControllable interface is the gateway for public API to talk to the internal map controller.

Link copied to clipboard
Options for enabling debugging features in a map.
Link copied to clipboard
The `map` has entered the idle state.
Link copied to clipboard
interface MapIdleCallback
The `map` has entered the idle state.
Link copied to clipboard
data class MapInitOptions @JvmOverloads constructor(val context: Context, var mapOptions: MapOptions = getDefaultMapOptions(context), var plugins: List<Plugin> = defaultPluginList, var cameraOptions: CameraOptions? = null, var textureView: Boolean = false, val styleUri: String? = Style.STANDARD, var attrs: AttributeSet? = null, var antialiasingSampleCount: Int = DEFAULT_ANTIALIASING_SAMPLE_COUNT, var mapName: String = "")

Defines configuration MapInitOptions for a MapboxMap. These options can be used when adding a map to your application programmatically (as opposed to via XML). If you are using a MapFragment, you can pass these options in using the static factory method newInstance(MapboxMapOptions). If you are using a MapView, you can pass these options in using the constructor MapView(Context, MapboxMapOptions). If you add a map using XML, then you can apply these options using custom XML tags.

Link copied to clipboard
The style has been fully loaded, and the `map` has rendered all visible tiles.
Link copied to clipboard
The style has been fully loaded, and the `map` has rendered all visible tiles.
Link copied to clipboard
Describes an error that has occurred while loading the `map`.
Link copied to clipboard
Describes an error that has occurred while loading the `map`.
Link copied to clipboard
The enumeration defines map loading errors.
Link copied to clipboard
Describes the map option values.
Link copied to clipboard
Options for playback.
Link copied to clipboard
Options for recording.
Link copied to clipboard
Set of options for taking map snapshot with `map snapshotter`.
Link copied to clipboard

A MapSurface provides an embeddable map interface. You use this class to display map information and to manipulate the map contents from your application. You can center the map on a given coordinate, specify the size of the area you want to display, and style the features of the map to fit your application's use case.

Link copied to clipboard

A MapView provides an embeddable map interface. You use this class to display map information and to manipulate the map contents from your application. You can center the map on a given coordinate, specify the size of the area you want to display, and style the features of the map to fit your application's use case.

Link copied to clipboard
Describes a point on the map in Mercator projection.
Link copied to clipboard
Describes the map orientation.
Link copied to clipboard
Callback invoked when a sideloaded database has been merged into the main offline database.
Link copied to clipboard
An `offline manager` manages downloads and storage for style packages and also produces tileset descriptors for the `tile store`.
Link copied to clipboard
An offline region represents an identifiable geographic region with optional metadata.
Link copied to clipboard
Callback invoked when fetching existing regions.
Link copied to clipboard
Callback invoked when creating a new region.
Link copied to clipboard
Describes the download state of a region.
Link copied to clipboard
Describes an offline request response error.
Link copied to clipboard
Describes the reason for an offline request response error.
Link copied to clipboard
An offline region definition is a geographic region defined by a style URL, a geometry, zoom range, and device pixel ratio.
Link copied to clipboard
The `offline region manager` that manages offline packs.
Link copied to clipboard
A region can have a single observer, which gets notified whenever a change to the region's status occurs.
Link copied to clipboard
A region's status includes its active/inactive state as well as counts of the number of resources that have completed downloading, their total size in bytes, and the total number of resources that are required.
Link copied to clipboard
Callback invoked when get offline region status operation completes.
Link copied to clipboard
An offline region definition is a geographic region defined by a style URL, geographic bounding box, zoom range, and device pixel ratio.
Link copied to clipboard
Samplers which can be optionally enabled to collect performance statistics.
Link copied to clipboard
The performance statistics collected at the end of the sampling duration.
Link copied to clipboard
Use this callback to observe the collected statistics.
Link copied to clipboard
Options for the following statistics collection behaviors:
  • Specify the types of sampling: cumulative, per-frame, or both.
  • Define the minimum elapsed time for collecting performance samples.
Link copied to clipboard
ProjectedMeters is a coordinate in a specific [Spherical Mercator](http://docs.openlayers.org/library/spherical_mercator.html) projection.
Link copied to clipboard
Collection of [Spherical Mercator](http://docs.openlayers.org/library/spherical_mercator.html) projection methods.
Link copied to clipboard
Represents queried feature that is returned through `QueriedRenderedFeature` or `QueriedSourceFeature`
Link copied to clipboard
Represents query result that is returned in QueryRenderedFeaturesCallback.
Link copied to clipboard
Represents query result that is returned in QuerySourceFeaturesCallback.
Link copied to clipboard
Callback to get query feature extension asynchronously.
Link copied to clipboard
Callback to get query features asynchronously.
Link copied to clipboard
Callback to get queried rendered features asynchronously.
Link copied to clipboard
Callback to get queried source features asynchronously.
Link copied to clipboard
Geometry for querying rendered features.
Link copied to clipboard
Options for querying rendered features.
Link copied to clipboard
The `map` finished rendering a frame.
Link copied to clipboard
The `map` finished rendering a frame.
Link copied to clipboard
The `map` started rendering a frame.
Link copied to clipboard
The `map` started rendering a frame.
Link copied to clipboard
The enumeration defines the rendering mode for the rendered frame.
Link copied to clipboard
The enumeration defines the type of data source.
Link copied to clipboard
The enumeration defines the error type that may occur during a resource request.
Link copied to clipboard
The structure defines the information about the resource request.
Link copied to clipboard
The enumeration defines the method used to make a resource request.
Link copied to clipboard
The enumeration defines the priority of a resource request.
Link copied to clipboard
The enumeration defines the type of resource requested by the `map`.
Link copied to clipboard
The `ResourceRequest` event allows the application to observe resource requests made by a `map` or `map snapshotter` object.
Link copied to clipboard
The `ResourceRequest` event allows the application to observe resourcerequests made by a `map` or `map snapshotter` object.
Link copied to clipboard
The structure defines the information about errors that may occur during a resource request.
Link copied to clipboard
The structure defines the information about the response for the resource request.
Link copied to clipboard
The enumeration defines the source type that provides the requested resource.
Link copied to clipboard
Describes the coordinate box on the screen, measured in `platform pixels` from top to bottom and from left to right.
Link copied to clipboard
Describes the coordinate on the screen, measured from top to bottom and from left to right.
Link copied to clipboard
Size type.
Link copied to clipboard
abstract class SnapshotOverlay

An instance of overlay allowing to draw custom content directly over the snapshot image on the Canvas.

Link copied to clipboard

A block which can be used to obtain a SnapshotOverlay to draw custom content directly over the snapshot image.

Link copied to clipboard
data class SnapshotOverlayOptions @JvmOverloads constructor(val showLogo: Boolean = true, val showAttributes: Boolean = true)

Data class to config the overlays on the snapshotter

Link copied to clipboard

Callback invoked when obtaining the map snapshot.

Link copied to clipboard

Interface for getting all style related events for snapshotter.

Link copied to clipboard
open class Snapshotter

Snapshotter is high-level component responsible for taking map snapshot with given MapSnapshotOptions.

Link copied to clipboard
The source has been added with `addStyleSource` method.
Link copied to clipboard
The source has been added with `addStyleSource` method.
Link copied to clipboard
The `SourceDataLoaded` event is emitted when source data is loaded.
Link copied to clipboard
The `SourceDataLoaded` event is emitted when source data is loaded.
Link copied to clipboard
The enumeration defines the type of loaded source data.
Link copied to clipboard
Options for querying source features.
Link copied to clipboard
The source has been removed with `removeStyleSource` method.
Link copied to clipboard
The source has been removed with `removeStyleSource` method.
Link copied to clipboard

The general class to interact with Styles in the Modular Mapbox Maps SDK for Android. It exposes the entry point for all methods related to the Style. You cannot instantiate Style object directly, rather, you must obtain one from the getStyle(onStyleLoaded) method on MapboxMap.

Link copied to clipboard
The style data has been loaded.
Link copied to clipboard
The style data has been loaded.
Link copied to clipboard
The enumeration defines the type of loaded style data.
Link copied to clipboard
A style needs an image that is missing from the sprite sheet.
Link copied to clipboard
A style needs an image that is missing from the sprite sheet.
Link copied to clipboard
An image requested by the `map` through the `StyleImageMissing` event is no longer needed and can be removed using the `removeStyleImage` method.
Link copied to clipboard
An image requested by the `map` through the `StyleImageMissing` event is no longer needed and can be removed using the `removeStyleImage` method.
Link copied to clipboard
The requested style has been fully loaded, including specified sprite, and sources' metadata.
Link copied to clipboard
The requested style has been fully loaded, including specified sprite, and sources' metadata.
Link copied to clipboard
The information about style object (source or layer or light).
Link copied to clipboard
The `style pack` represents a stored style package.
Link copied to clipboard
Callback invoked when returning a style package.
Link copied to clipboard
Describes a style package load request error.
Link copied to clipboard
Describes the reason for a style package download request failure.
Link copied to clipboard
Describes the style package load option values.
Link copied to clipboard
A `style pack load` progress includes information about the number of resources that have completed downloading and the total number of resources that are required.
Link copied to clipboard
Callback Invoked to report the progess of the style package loading operation.
Link copied to clipboard
Callback invoked to return a style package's associated metadata
Link copied to clipboard
Callback invoked when returning existing style packages.
Link copied to clipboard
Holds a style property value with meta data.
Link copied to clipboard
Describes the kind of a style property value.
Link copied to clipboard
open class TileCacheBudget
Link copied to clipboard
Tile cache budget in megabytes.
Link copied to clipboard
Tile cache budget in tiles.
Link copied to clipboard
Various options needed for tile cover
Link copied to clipboard
Callback to do various operations for tile.
Link copied to clipboard
Options for custom geometry tiles.
Link copied to clipboard
Describes the tileset descriptor option values.
Link copied to clipboard
Describes tile store usage modes.
Link copied to clipboard
The `transition options` controls timing for the interpolation between a transitionable style property's previous value and new value.
Link copied to clipboard
3 component vector.
Link copied to clipboard
4 component vector.
Link copied to clipboard
Enum describing how to place view annotation relatively to geometry.
Link copied to clipboard
Represents a specific setting for a view annotation anchor.
Link copied to clipboard
Defines the necessary options for displaying view annotations.
Link copied to clipboard
Satisfies embedding platforms that requires the viewport coordinate systems to be set according to its standards.

Functions

Link copied to clipboard

Get a default MapOptions.Builder with reasterization mode GlyphsRasterizationMode#ALL_GLYPHS_RASTERIZED_LOCALLY

Link copied to clipboard
fun logD(tag: String, message: String)

Log Android debug entry in the following format: D/Mapbox: [SDK_IDENTIFIER]\ [tag]

Link copied to clipboard
fun logE(tag: String, message: String)

Log Android error entry in the following format: E/Mapbox: [SDK_IDENTIFIER]\ [tag]

Link copied to clipboard
fun logI(tag: String, message: String)

Log Android info entry in the following format: I/Mapbox: [SDK_IDENTIFIER]\ [tag]

Link copied to clipboard
fun logW(tag: String, message: String)

Log Android warning entry in the following format: W/Mapbox: [SDK_IDENTIFIER]\ [tag]

Link copied to clipboard

DSL builder function to create MapPlayerOptions object.

Link copied to clipboard

DSL builder function to create MapRecorderOptions object.

Link copied to clipboard

Extension function to convert CameraState to CameraOptions.

Link copied to clipboard

Convert Bitmap to rendering engine Image instance.

Properties

Link copied to clipboard

Default Locale for data processing

Link copied to clipboard
val MapboxOptions.mapsOptions: MapboxMapsOptions

Access Mapbox Maps SDK specific options.