Package-level declarations

Types

Link copied to clipboard

Defines the click interaction.

Link copied to clipboard
Link copied to clipboard

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

Link copied to clipboard

Defines the long click interaction.

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

Marks declarations that are delicate — they have limited use-case and shall be used with care in general code. Any use of a delicate declaration has to be carefully reviewed to make sure it is properly used. Carefully read documentation of any declaration marked as MapboxDelicateApi.

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, val mapLoadingErrorDelegate: MapLoadingErrorDelegate)

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

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

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? = "https://tile.routo.com/v1/sdk/style/basic", 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
Base class for interactions.
Link copied to clipboard
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
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. The Snapshotter is valid until destroy is called.

Link copied to clipboard

Runtime exception thrown when the Snapshotter has already been destroyed.

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.

Functions

Link copied to clipboard
fun MapOptions.Builder.applyDefaultParams(context: Context): MapOptions.Builder
fun MapOptions.Builder.applyDefaultParams(pixelRatio: Float): MapOptions.Builder

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
inline fun mapPlayerOptions(block: MapPlayerOptions.Builder.() -> Unit): MapPlayerOptions

DSL builder function to create MapPlayerOptions object.

Link copied to clipboard
inline fun mapRecorderOptions(block: MapRecorderOptions.Builder.() -> Unit): MapRecorderOptions

DSL builder function to create MapRecorderOptions object.

Link copied to clipboard
fun CameraState.toCameraOptions(anchor: ScreenCoordinate? = null): CameraOptions

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.