Package com.mapbox.maps

Types

CustomMapInterface
Link copied to clipboard

Temporary interface wrapper around MapInterface, StyleManagerInterface and ObservableInterface

interface CustomMapInterface : MapInterface, StyleManagerInterface, ObservableInterface
MapAttributeParser
Link copied to clipboard

Utility class for parsing AttributeSet to MapSettings.

object MapAttributeParser
MapboxConfigurationException
Link copied to clipboard

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

class MapboxConfigurationException : RuntimeException
MapboxExperimental
Link copied to clipboard

Annotation class to mark API as experimental.

annotation class MapboxExperimental
MapboxMap
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.

<p> Note: Similar to a View object, a MapboxMap should only be read and modified from the main thread. </p>

MapboxMapOptions
Link copied to clipboard

Defines configuration MapboxMapOptions 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.

data class MapboxMapOptions(context: Context, pixelRatio: Float, attrs: AttributeSet?)
MapboxOptions
Link copied to clipboard

Configuration object for Mapbox Maps SDK For Android.

object MapboxOptions
MapControllable
Link copied to clipboard

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

interface MapControllable
MapSurface
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.

Use of MapSurface requires a Mapbox API access token. Obtain an access token on the Mapbox account page.

<strong>Warning:</strong> Please note that you are responsible for getting permission to use the map data, and for ensuring your use adheres to the relevant terms of use.

class MapSurface : MapPluginProviderDelegate, MapControllable
MapView
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.

Use of MapView requires a Mapbox API access token. Obtain an access token on the Mapbox account page.

<strong>Warning:</strong> Please note that you are responsible for getting permission to use the map data, and for ensuring your use adheres to the relevant terms of use.

open class MapView : FrameLayout, MapPluginProviderDelegate, MapControllable
SnapshotCreatedListener
Link copied to clipboard

Interface for getting snapshot when it's finished.

fun fun interface SnapshotCreatedListener
SnapshotStyleListener
Link copied to clipboard

Interface for getting all style related events for snapshotter.

interface SnapshotStyleListener
Snapshotter
Link copied to clipboard

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

open class Snapshotter
Style
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 getStyleAsync() method on MapboxMap.

<p> Note: Similar to a View object, a [Style] should only be read and modified from the main thread. </p>

class Style : StyleManagerInterface

Functions

bitmap
Link copied to clipboard

Extension function to obtain Bitmap from snapshotter converted from Image.

fun MapSnapshotInterface.bitmap(): Bitmap
equalsWithDelta
Link copied to clipboard

Extension function to compare two double with delta.

fun Double.equalsWithDelta(other: Double, delta: Double): Boolean
roughlyEquals
Link copied to clipboard

Extension function to compare two double with default delta of 1E-5.

fun Double.roughlyEquals(other: Double): Boolean
toJson
Link copied to clipboard

Extension function to compare two double with default delta of 1E-5.

fun Value.toJson(): String

Properties

DATABASE_NAME
Link copied to clipboard

Name of the database file.

const val DATABASE_NAME: String
MAPBOX_ACCESS_TOKEN_RESOURCE_NAME
Link copied to clipboard

Resource name used to lookup the Mapbox access token.

const val MAPBOX_ACCESS_TOKEN_RESOURCE_NAME: String
MAPBOX_LOCALE
Link copied to clipboard

Default Locale for data processing (ex: String.toLowerCase(com.mapbox.maps.getMAPBOX_LOCALE, "foo"))

val MAPBOX_LOCALE: Locale