Mapbox Map
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.
class MapboxMap : MapTransformDelegate, MapProjectionDelegate, MapFeatureQueryDelegate, ObservableInterface, MapListenerDelegate, MapPluginExtensionsDelegate, MapCameraManagerDelegate, MapStyleStateDelegate
Content copied to clipboard
Functions
addOnCameraChangeListener
Link copied to clipboard
open override fun addOnCameraChangeListener(onCameraChangeListener: OnCameraChangeListener)
Content copied to clipboard
addOnMapIdleListener
Link copied to clipboard
open override fun addOnMapIdleListener(onMapIdleListener: OnMapIdleListener)
Content copied to clipboard
addOnMapLoadedListener
Link copied to clipboard
open override fun addOnMapLoadedListener(onMapLoadedListener: OnMapLoadedListener)
Content copied to clipboard
addOnMapLoadErrorListener
Link copied to clipboard
open override fun addOnMapLoadErrorListener(onMapLoadErrorListener: OnMapLoadErrorListener)
Content copied to clipboard
addOnRenderFrameFinishedListener
Link copied to clipboard
open override fun addOnRenderFrameFinishedListener(onRenderFrameFinishedListener: OnRenderFrameFinishedListener)
Content copied to clipboard
addOnRenderFrameStartedListener
Link copied to clipboard
open override fun addOnRenderFrameStartedListener(onRenderFrameStartedListener: OnRenderFrameStartedListener)
Content copied to clipboard
addOnSourceAddedListener
Link copied to clipboard
open override fun addOnSourceAddedListener(onSourceAddedListener: OnSourceAddedListener)
Content copied to clipboard
addOnSourceDataLoadedListener
Link copied to clipboard
open override fun addOnSourceDataLoadedListener(onSourceDataLoadedListener: OnSourceDataLoadedListener)
Content copied to clipboard
addOnSourceRemovedListener
Link copied to clipboard
open override fun addOnSourceRemovedListener(onSourceRemovedListener: OnSourceRemovedListener)
Content copied to clipboard
addOnStyleDataLoadedListener
Link copied to clipboard
open override fun addOnStyleDataLoadedListener(onStyleDataLoadedListener: OnStyleDataLoadedListener)
Content copied to clipboard
addOnStyleImageMissingListener
Link copied to clipboard
open override fun addOnStyleImageMissingListener(onStyleImageMissingListener: OnStyleImageMissingListener)
Content copied to clipboard
addOnStyleImageUnusedListener
Link copied to clipboard
open override fun addOnStyleImageUnusedListener(onStyleImageUnusedListener: OnStyleImageUnusedListener)
Content copied to clipboard
addOnStyleLoadedListener
Link copied to clipboard
open override fun addOnStyleLoadedListener(onStyleLoadedListener: OnStyleLoadedListener)
Content copied to clipboard
cameraAnimationsPlugin
Link copied to clipboard
open override fun cameraAnimationsPlugin(function: CameraAnimationsPlugin.() -> Any?): Any?
Content copied to clipboard
cameraForCoordinateBounds
Link copied to clipboard
open override fun cameraForCoordinateBounds(bounds: CoordinateBounds, padding: EdgeInsets, bearing: Double?, pitch: Double?): CameraOptions
Content copied to clipboard
cameraForCoordinates
Link copied to clipboard
open override fun cameraForCoordinates(coordinates: List<Point>, camera: CameraOptions, box: ScreenBox): CameraOptions
Content copied to clipboard
open override fun cameraForCoordinates(coordinates: List<Point>, padding: EdgeInsets, bearing: Double?, pitch: Double?): CameraOptions
Content copied to clipboard
cameraForGeometry
Link copied to clipboard
open override fun cameraForGeometry(geometry: Geometry, padding: EdgeInsets, bearing: Double?, pitch: Double?): CameraOptions
Content copied to clipboard
coordinateBoundsForCamera
Link copied to clipboard
open override fun coordinateBoundsForCamera(camera: CameraOptions): CoordinateBounds
Content copied to clipboard
coordinateBoundsZoomForCamera
Link copied to clipboard
open override fun coordinateBoundsZoomForCamera(camera: CameraOptions): CoordinateBoundsZoom
Content copied to clipboard
coordinateBoundsZoomForCameraUnwrapped
Link copied to clipboard
open override fun coordinateBoundsZoomForCameraUnwrapped(camera: CameraOptions): CoordinateBoundsZoom
Content copied to clipboard
coordinateForPixel
Link copied to clipboard
coordinateForProjectedMeters
Link copied to clipboard
open override fun coordinateForProjectedMeters(projectedMeters: ProjectedMeters): Point
Content copied to clipboard
coordinatesForPixels
Link copied to clipboard
open override fun coordinatesForPixels(pixels: List<ScreenCoordinate>): List<Point>
Content copied to clipboard
dragStart
Link copied to clipboard
equals
Link copied to clipboard
gesturesPlugin
Link copied to clipboard
open override fun gesturesPlugin(function: GesturesPlugin.() -> Any?): Any?
Content copied to clipboard
getBounds
Link copied to clipboard
getDragCameraOptions
Link copied to clipboard
open override fun getDragCameraOptions(fromPoint: ScreenCoordinate, toPoint: ScreenCoordinate): CameraOptions
Content copied to clipboard
getElevation
Link copied to clipboard
getFeatureState
Link copied to clipboard
fun getFeatureState(sourceId: String, sourceLayerId: String?, featureId: String, callback: QueryFeatureStateCallback)
Content copied to clipboard
getFreeCameraOptions
Link copied to clipboard
getMapOptions
Link copied to clipboard
getMetersPerPixelAtLatitude
Link copied to clipboard
open override fun getMetersPerPixelAtLatitude(latitude: Double, zoom: Double): Double
Content copied to clipboard
getPrefetchZoomDelta
Link copied to clipboard
getResourceOptions
Link copied to clipboard
getStyle
Link copied to clipboard
isFullyLoaded
Link copied to clipboard
isGestureInProgress
Link copied to clipboard
isUserAnimationInProgress
Link copied to clipboard
loadStyle
Link copied to clipboard
fun loadStyle(styleExtension: StyleContract.StyleExtension, onStyleLoaded: Style.OnStyleLoaded)
Content copied to clipboard
fun loadStyle(styleExtension: StyleContract.StyleExtension, onStyleLoaded: Style.OnStyleLoaded?, onMapLoadErrorListener: OnMapLoadErrorListener?)
Content copied to clipboard
loadStyleJSON
Link copied to clipboard
fun loadStyleJSON(json: String, onStyleLoaded: Style.OnStyleLoaded?, onMapLoadErrorListener: OnMapLoadErrorListener?)
Content copied to clipboard
loadStyleUri
Link copied to clipboard
fun loadStyleUri(styleUri: String, onStyleLoaded: Style.OnStyleLoaded?, onMapLoadErrorListener: OnMapLoadErrorListener?)
Content copied to clipboard
pixelForCoordinate
Link copied to clipboard
open override fun pixelForCoordinate(coordinate: Point): ScreenCoordinate
Content copied to clipboard
pixelsForCoordinates
Link copied to clipboard
open override fun pixelsForCoordinates(coordinates: List<Point>): List<ScreenCoordinate>
Content copied to clipboard
project
Link copied to clipboard
projectedMetersForCoordinate
Link copied to clipboard
open override fun projectedMetersForCoordinate(point: Point): ProjectedMeters
Content copied to clipboard
queryFeatureExtensions
Link copied to clipboard
queryRenderedFeatures
Link copied to clipboard
open override fun queryRenderedFeatures(box: ScreenBox, options: RenderedQueryOptions, callback: QueryFeaturesCallback)
Content copied to clipboard
open override fun queryRenderedFeatures(pixel: ScreenCoordinate, options: RenderedQueryOptions, callback: QueryFeaturesCallback)
Content copied to clipboard
open override fun queryRenderedFeatures(shape: List<ScreenCoordinate?>, options: RenderedQueryOptions, callback: QueryFeaturesCallback)
Content copied to clipboard
querySourceFeatures
Link copied to clipboard
open override fun querySourceFeatures(sourceId: String, options: SourceQueryOptions, callback: QueryFeaturesCallback)
Content copied to clipboard
reduceMemoryUse
Link copied to clipboard
fun reduceMemoryUse()
Content copied to clipboard
removeFeatureState
Link copied to clipboard
fun removeFeatureState(sourceId: String, sourceLayerId: String?, featureId: String, stateKey: String?)
Content copied to clipboard
removeOnCameraChangeListener
Link copied to clipboard
open override fun removeOnCameraChangeListener(onCameraChangeListener: OnCameraChangeListener)
Content copied to clipboard
removeOnMapIdleListener
Link copied to clipboard
open override fun removeOnMapIdleListener(onMapIdleListener: OnMapIdleListener)
Content copied to clipboard
removeOnMapLoadedListener
Link copied to clipboard
open override fun removeOnMapLoadedListener(onMapLoadedListener: OnMapLoadedListener)
Content copied to clipboard
removeOnMapLoadErrorListener
Link copied to clipboard
open override fun removeOnMapLoadErrorListener(onMapLoadErrorListener: OnMapLoadErrorListener)
Content copied to clipboard
removeOnRenderFrameFinishedListener
Link copied to clipboard
open override fun removeOnRenderFrameFinishedListener(onRenderFrameFinishedListener: OnRenderFrameFinishedListener)
Content copied to clipboard
removeOnRenderFrameStartedListener
Link copied to clipboard
open override fun removeOnRenderFrameStartedListener(onRenderFrameStartedListener: OnRenderFrameStartedListener)
Content copied to clipboard
removeOnSourceAddedListener
Link copied to clipboard
open override fun removeOnSourceAddedListener(onSourceAddedListener: OnSourceAddedListener)
Content copied to clipboard
removeOnSourceDataLoadedListener
Link copied to clipboard
open override fun removeOnSourceDataLoadedListener(onSourceDataLoadedListener: OnSourceDataLoadedListener)
Content copied to clipboard
removeOnSourceRemovedListener
Link copied to clipboard
open override fun removeOnSourceRemovedListener(onSourceRemovedListener: OnSourceRemovedListener)
Content copied to clipboard
removeOnStyleDataLoadedListener
Link copied to clipboard
open override fun removeOnStyleDataLoadedListener(onStyleDataLoadedListener: OnStyleDataLoadedListener)
Content copied to clipboard
removeOnStyleImageMissingListener
Link copied to clipboard
open override fun removeOnStyleImageMissingListener(onStyleImageMissingListener: OnStyleImageMissingListener)
Content copied to clipboard
removeOnStyleImageUnusedListener
Link copied to clipboard
open override fun removeOnStyleImageUnusedListener(onStyleImageUnusedListener: OnStyleImageUnusedListener)
Content copied to clipboard
removeOnStyleLoadedListener
Link copied to clipboard
open override fun removeOnStyleLoadedListener(onStyleLoadedListener: OnStyleLoadedListener)
Content copied to clipboard
setBounds
Link copied to clipboard
setCamera
Link copied to clipboard
setConstrainMode
Link copied to clipboard
setDebug
Link copied to clipboard
setFeatureState
Link copied to clipboard
fun setFeatureState(sourceId: String, sourceLayerId: String?, featureId: String, state: Value)
Content copied to clipboard
setGestureInProgress
Link copied to clipboard
setNorthOrientation
Link copied to clipboard
open override fun setNorthOrientation(northOrientation: NorthOrientation)
Content copied to clipboard
setPrefetchZoomDelta
Link copied to clipboard
setUserAnimationInProgress
Link copied to clipboard
setViewportMode
Link copied to clipboard
subscribe
Link copied to clipboard
triggerRepaint
Link copied to clipboard
fun triggerRepaint()
Content copied to clipboard
unproject
Link copied to clipboard
unsubscribe
Link copied to clipboard
Properties
cameraState
Link copied to clipboard
Represents current camera state.