Package com.mapbox.maps

Types

AsyncOperationResultCallback
Link copied to clipboard
interface AsyncOperationResultCallback
Callback invoked once an asynchronous operation completes.
CameraBounds
Link copied to clipboard
class CameraBounds : Serializable
Holds information about `camera bounds`.
CameraBoundsOptions
Link copied to clipboard
open class CameraBoundsOptions : Serializable
Holds options to be used for setting `camera bounds`.
CameraManager
Link copied to clipboard
open class CameraManager : StyleManager, CameraManagerInterface
Interface for managing camera.
CameraManagerInterface
Link copied to clipboard
interface CameraManagerInterface : StyleManagerInterface
Interface for managing camera.
CameraOptions
Link copied to clipboard
class CameraOptions : Serializable
Various options for describing the viewpoint of a camera.
CameraState
Link copied to clipboard
class CameraState : Serializable
Describes the viewpoint of a camera.
CancelTileFunctionCallback
Link copied to clipboard
interface CancelTileFunctionCallback
Callback to cancel a tile.
CanonicalTileID
Link copied to clipboard
class CanonicalTileID : Serializable
Represents a tile coordinate.
ConstrainMode
Link copied to clipboard
enum ConstrainMode
Describes whether to constrain the map in both axes or only vertically e.g.
ContextMode
Link copied to clipboard
enum ContextMode
Describes the map context mode.
CoordinateBounds
Link copied to clipboard
open class CoordinateBounds : Serializable
A rectangular area as measured on a two-dimensional map projection.
CoordinateBoundsZoom
Link copied to clipboard
class CoordinateBoundsZoom : Serializable
A coordinate bounds and zoom.
CoordinateInfo
Link copied to clipboard
class CoordinateInfo : Serializable
Represents the coordinate information returned by the `coordinateInfoForPixel` or `coordinatesInfoForPixels` methods.
CustomGeometrySourceOptions
Link copied to clipboard
class CustomGeometrySourceOptions : Serializable
Options for custom geometry source.
CustomLayerHost
Link copied to clipboard
interface CustomLayerHost
Interface for hosting a custom map style layer.
CustomLayerRenderConfiguration
Link copied to clipboard
class CustomLayerRenderConfiguration : Serializable
Note!
CustomLayerRenderParameters
Link copied to clipboard
class CustomLayerRenderParameters : Serializable
Parameters that define the current camera position for a `CustomLayerHost::render()` function.
EdgeInsets
Link copied to clipboard
class EdgeInsets : Serializable
The distance on each side between rectangles, when one is contained into other.
ElevationData
Link copied to clipboard
interface ElevationData
Interface that provides access to elevation data.
Event
Link copied to clipboard
class Event : Serializable
Generic Event type used to notify an `observer`.
FeatureExtensionValue
Link copied to clipboard
class FeatureExtensionValue : Serializable
A value or a collection of a feature extension.
FetchTileFunctionCallback
Link copied to clipboard
interface FetchTileFunctionCallback
Callback to create data for tile.
FreeCameraOptions
Link copied to clipboard
class FreeCameraOptions
Various options for accessing physical properties of the underlying camera entity.
GeoJSONSourceData
Link copied to clipboard
open class GeoJSONSourceData
GlyphsRasterizationMode
Link copied to clipboard
enum GlyphsRasterizationMode
Describes glyphs rasterization modes.
GlyphsRasterizationOptions
Link copied to clipboard
class GlyphsRasterizationOptions : Serializable
Describes the glyphs rasterization option values.
Image
Link copied to clipboard
class Image : Serializable
Image type.
ImageContent
Link copied to clipboard
class ImageContent : Serializable
Describes the image content, e.g.
ImageStretches
Link copied to clipboard
class ImageStretches : Serializable
Describes the image stretch areas.
LayerPosition
Link copied to clipboard
class LayerPosition : Serializable
Specifies position of a layer that is added via addStyleLayer method.
MapboxAnnotationException
Link copied to clipboard
class MapboxAnnotationException(exceptionText: String?) : RuntimeException

Mapbox exception class flagging annotation plugin related RuntimeException did occur.

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

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

class MapboxConcurrentGeometryModificationException(exceptionText: String, sourceId: String) : ConcurrentModificationException

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

MapboxConfigurationException
Link copied to clipboard
class MapboxConfigurationException : RuntimeException

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

MapboxExperimental
Link copied to clipboard
annotation class MapboxExperimental

Annotation class to mark API as experimental.

MapboxLifecycleObserver
Link copied to clipboard
interface MapboxLifecycleObserver

MapboxLifecycleObserver interface defines the lifecycle events that needed by MapView.

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

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

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.

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

Mapbox exception class flagging map related RuntimeException did occur.

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

Mapbox exception class flagging style extension related RuntimeException did occur.

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

Mapbox exception class flagging view annotation related RuntimeException did occur.

MapClient
Link copied to clipboard
interface MapClient
MapConstants
Link copied to clipboard
class MapConstants
Collection of useful constants.
MapControllable
Link copied to clipboard
interface MapControllable : MapboxLifecycleObserver

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

MapDebugOptions
Link copied to clipboard
enum MapDebugOptions
Options for enabling debugging features in a map.
MapEvents
Link copied to clipboard
class MapEvents
List of supported event types by the `map` and `map snapshotter` objects, and event data format specification for each event.
MapInitOptions
Link copied to clipboard
data class MapInitOptions @JvmOverloads constructor(context: Context, resourceOptions: ResourceOptions, mapOptions: MapOptions, plugins: List<Plugin>, cameraOptions: CameraOptions?, textureView: Boolean, styleUri: String?, attrs: AttributeSet?, antialiasingSampleCount: Int)

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.

MapInterface
Link copied to clipboard
interface MapInterface : CameraManagerInterface
Map class provides map rendering functionality.
MapMemoryBudget
Link copied to clipboard
open class MapMemoryBudget
MapMemoryBudgetInMegabytes
Link copied to clipboard
open class MapMemoryBudgetInMegabytes : Serializable
Map memory budget in megabytes.
MapMemoryBudgetInTiles
Link copied to clipboard
open class MapMemoryBudgetInTiles : Serializable
Map memory budget in tiles.
MapOptions
Link copied to clipboard
class MapOptions : Serializable
Describes the map option values.
MapSnapshotInterface
Link copied to clipboard
interface MapSnapshotInterface
An image snapshot of a map rendered by `map snapshotter`.
MapSnapshotOptions
Link copied to clipboard
class MapSnapshotOptions : Serializable
Set of options for taking map snapshot with `map snapshotter`.
MapSnapshotterInterface
Link copied to clipboard
interface MapSnapshotterInterface : CameraManagerInterface
MapSnapshotter exposes functionality to capture static map images.
MapSurface
Link copied to clipboard
class MapSurface : MapPluginProviderDelegate, MapControllable

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.

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

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.

MercatorCoordinate
Link copied to clipboard
class MercatorCoordinate : Serializable
Describes a point on the map in Mercator projection.
NorthOrientation
Link copied to clipboard
enum NorthOrientation
Describes the map orientation.
Observable
Link copied to clipboard
open class Observable : ObservableInterface
The `observable` interface provides basic Publish&Subscribe functionality.
ObservableInterface
Link copied to clipboard
interface ObservableInterface
The `observable` interface provides basic Publish&Subscribe functionality.
Observer
Link copied to clipboard
interface Observer
An `observer` interface used to subscribe for an `observable` events.
OfflineDatabaseMergeCallback
Link copied to clipboard
interface OfflineDatabaseMergeCallback
Callback invoked when a sideloaded database has been merged into the main offline database.
OfflineManager
Link copied to clipboard
class OfflineManager : OfflineManagerInterface
An `offline manager` manages downloads and storage for style packages and also produces tileset descriptors for the `tile store`.
OfflineManagerInterface
Link copied to clipboard
interface OfflineManagerInterface
An `offline manager` manages downloads and storage for style packages and also produces tileset descriptors for the `tile store`.
OfflineRegion
Link copied to clipboard
class OfflineRegion : OfflineRegionInterface
An offline region represents an identifiable geographic region with optional metadata.
OfflineRegionCallback
Link copied to clipboard
interface OfflineRegionCallback
Callback invoked when fetching existing regions.
OfflineRegionCreateCallback
Link copied to clipboard
interface OfflineRegionCreateCallback
Callback invoked when creating a new region.
OfflineRegionDownloadState
Link copied to clipboard
enum OfflineRegionDownloadState
Describes the download state of a region.
OfflineRegionGeometryDefinition
Link copied to clipboard
class OfflineRegionGeometryDefinition : Serializable
An offline region definition is a geographic region defined by a style URL, a geometry, zoom range, and device pixel ratio.
OfflineRegionInterface
Link copied to clipboard
interface OfflineRegionInterface
An offline region represents an identifiable geographic region with optional metadata.
OfflineRegionManager
Link copied to clipboard
The `offline region manager` that manages offline packs.
OfflineRegionManagerInterface
Link copied to clipboard
interface OfflineRegionManagerInterface
The `offline region manager` that manages offline packs.
OfflineRegionObserver
Link copied to clipboard
interface OfflineRegionObserver
A region can have a single observer, which gets notified whenever a change to the region's status occurs.
OfflineRegionStatus
Link copied to clipboard
class OfflineRegionStatus : Serializable
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.
OfflineRegionStatusCallback
Link copied to clipboard
interface OfflineRegionStatusCallback
Callback invoked when get offline region status operation completes.
OfflineRegionTilePyramidDefinition
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.
PlaybackFinished
Link copied to clipboard
interface PlaybackFinished
ProjectedMeters
Link copied to clipboard
class ProjectedMeters : Serializable
ProjectedMeters is a coordinate in a specific [Spherical Mercator](http://docs.openlayers.org/library/spherical_mercator.html) projection.
Projection
Link copied to clipboard
class Projection
Collection of [Spherical Mercator](http://docs.openlayers.org/library/spherical_mercator.html) projection methods.
QueriedFeature
Link copied to clipboard
class QueriedFeature : Serializable
Represents query result that is returned in QueryFeaturesCallback.
QueryFeatureExtensionCallback
Link copied to clipboard
interface QueryFeatureExtensionCallback
Callback to get query feature extension asynchronously.
QueryFeaturesCallback
Link copied to clipboard
interface QueryFeaturesCallback
Callback to get query features asynchronously.
QueryFeatureStateCallback
Link copied to clipboard
interface QueryFeatureStateCallback
Callback to get query features asynchronously.
RenderCacheOptions
Link copied to clipboard
class RenderCacheOptions : Serializable
Parameters that defines behavior of the render cache.
RenderedQueryGeometry
Link copied to clipboard
open class RenderedQueryGeometry
Geometry for querying rendered features.
RenderedQueryOptions
Link copied to clipboard
class RenderedQueryOptions : Serializable
Options for querying rendered features.
ResourceOptions
Link copied to clipboard
class ResourceOptions : Serializable
Options to configure a resource
ResourceOptionsManager
Link copied to clipboard
data class ResourceOptionsManager(resourceOptions: ResourceOptions)

Convenience class that manages a global ResourceOptions It's possible to create ResourceOptionsManager instances as you need them, however it's convenient to use the default object (default).

ResponseError
Link copied to clipboard
class ResponseError : Serializable
Describes an offline request response error.
ResponseErrorReason
Link copied to clipboard
enum ResponseErrorReason
Describes the reason for an offline request response error.
ScreenBox
Link copied to clipboard
class ScreenBox : Serializable
Describes the coordinate box on the screen, measured in `platform pixels` from top to bottom and from left to right.
ScreenCoordinate
Link copied to clipboard
class ScreenCoordinate : Serializable
Describes the coordinate on the screen, measured from top to bottom and from left to right.
Settings
Link copied to clipboard
class Settings
Settings class provides non-persistent, in-process key-value storage.
Size
Link copied to clipboard
class Size : Serializable
Size type.
SnapshotCompleteCallback
Link copied to clipboard
interface SnapshotCompleteCallback
Callback invoked once a snapshot operation completes.
SnapshotCreatedListener
Link copied to clipboard
fun interface SnapshotCreatedListener

Interface for getting snapshot when it's finished.

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

Data class to config the overlays on the snapshotter

SnapshotStyleListener
Link copied to clipboard
interface SnapshotStyleListener

Interface for getting all style related events for snapshotter.

Snapshotter
Link copied to clipboard
open class Snapshotter

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

SourceQueryOptions
Link copied to clipboard
class SourceQueryOptions : Serializable
Options for querying source features.
Style
Link copied to clipboard
class Style : StyleInterface

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.

StyleManager
Link copied to clipboard
open class StyleManager : Observable, StyleManagerInterface
Interface for managing style of the `map`.
StyleManagerInterface
Link copied to clipboard
interface StyleManagerInterface : ObservableInterface
Interface for managing style of the `map`.
StyleObjectInfo
Link copied to clipboard
class StyleObjectInfo : Serializable
The information about style object (source or layer or light).
StylePack
Link copied to clipboard
class StylePack : Serializable
The `style pack` represents a stored style package.
StylePackCallback
Link copied to clipboard
interface StylePackCallback
Callback invoked when returning a style package.
StylePackError
Link copied to clipboard
open class StylePackError : Serializable
Describes a style package load request error.
StylePackErrorType
Link copied to clipboard
enum StylePackErrorType
Describes the reason for a style package download request failure.
StylePackLoadOptions
Link copied to clipboard
class StylePackLoadOptions : Serializable
Describes the style package load option values.
StylePackLoadProgress
Link copied to clipboard
class StylePackLoadProgress : Serializable
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.
StylePackLoadProgressCallback
Link copied to clipboard
interface StylePackLoadProgressCallback
Callback Invoked to report the progess of the style package loading operation.
StylePackMetadataCallback
Link copied to clipboard
interface StylePackMetadataCallback
Callback invoked to return a style package's associated metadata
StylePacksCallback
Link copied to clipboard
interface StylePacksCallback
Callback invoked when returning existing style packages.
StylePropertyValue
Link copied to clipboard
class StylePropertyValue : Serializable
Holds a style property value with meta data.
StylePropertyValueKind
Link copied to clipboard
enum StylePropertyValueKind
Describes the kind of a style property value.
Task
Link copied to clipboard
interface Task
TileCoverOptions
Link copied to clipboard
class TileCoverOptions : Serializable
Various options needed for tile cover
TileOptions
Link copied to clipboard
class TileOptions : Serializable
Options for custom geometry tiles.
TilesetDescriptorOptions
Link copied to clipboard
class TilesetDescriptorOptions : Serializable
Describes the style package load option values for a style.
TilesetDescriptorOptionsForTilesets
Link copied to clipboard
class TilesetDescriptorOptionsForTilesets : Serializable
Describes the style package load option values for a list of tilesets.
TileStoreUsageMode
Link copied to clipboard
enum TileStoreUsageMode
Describes tile store usage modes.
TransitionOptions
Link copied to clipboard
class TransitionOptions : Serializable
The `transition options` controls timing for the interpolation between a transitionable style property's previous value and new value.
Vec3
Link copied to clipboard
class Vec3 : Serializable
3 component vector.
Vec4
Link copied to clipboard
class Vec4 : Serializable
4 component vector.
Version
Link copied to clipboard
class Version
ViewAnnotationAnchor
Link copied to clipboard
enum ViewAnnotationAnchor
Enum describing how to place view annotation relatively to geometry.
ViewAnnotationOptions
Link copied to clipboard
class ViewAnnotationOptions : Serializable
Various options needed for displaying view annotation.
ViewAnnotationPositionsUpdateListener
Link copied to clipboard
interface ViewAnnotationPositionsUpdateListener
ViewportMode
Link copied to clipboard
enum ViewportMode
Satisfies embedding platforms that requires the viewport coordinate systems to be set according to its standards.

Functions

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

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

Get a default ResourceOptions.Builder with Mapbox pre-defined options, and with the access token taken from the Android resources(if available).

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

Extension function to obtain Bitmap from snapshotter converted from Image.

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

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

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

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

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

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

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

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

setDisabled
Link copied to clipboard

Set render cache size to 0MB in order to disable it.

setLargeSize
Link copied to clipboard

Set render cache size to large(128MB).

setSmallSize
Link copied to clipboard

Set render cache size to small(64MB).

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

Extension function to convert CameraState to CameraOptions.

Properties

MAPBOX_ACCESS_TOKEN_RESOURCE_NAME
Link copied to clipboard
const val MAPBOX_ACCESS_TOKEN_RESOURCE_NAME: String

Resource name used to lookup the Mapbox access token.

MAPBOX_LOCALE
Link copied to clipboard
val MAPBOX_LOCALE: Locale

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