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.
<p> Note: Similar to a View object, a MapboxMap should only be read and modified from the main thread. </p>
class MapboxMap : MapTransformDelegate, MapProjectionDelegate, MapFeatureQueryDelegate, ObservableInterface, MapListenerDelegate, MapStyleStateDelegate
Content copied to clipboard
Functions
addOnCameraChangeListener
Link copied to clipboard
open override fun addOnCameraChangeListener(onCameraChangeListener: OnCameraChangeListener)
Content copied to clipboard
addOnDidFinishRenderingFrameListener
Link copied to clipboard
open override fun addOnDidFinishRenderingFrameListener(onDidFinishRenderingFrameListener: OnDidFinishRenderingFrameListener)
Content copied to clipboard
addOnDidFinishRenderingMapListener
Link copied to clipboard
open override fun addOnDidFinishRenderingMapListener(onDidFinishRenderingMapListener: OnDidFinishRenderingMapListener)
Content copied to clipboard
addOnMapChangedListener
Link copied to clipboard
open override fun addOnMapChangedListener(onMapChangeListener: OnMapChangedListener)
Content copied to clipboard
addOnMapLoadErrorListener
Link copied to clipboard
open override fun addOnMapLoadErrorListener(onMapLoadErrorListener: OnMapLoadErrorListener)
Content copied to clipboard
addOnSourceChangeListener
Link copied to clipboard
open override fun addOnSourceChangeListener(onSourceChangeListener: OnSourceChangeListener)
Content copied to clipboard
addOnStyleImageChangeListener
Link copied to clipboard
open override fun addOnStyleImageChangeListener(onStyleImageChangeListener: OnStyleImageChangeListener)
Content copied to clipboard
cameraForCoordinateBounds
Link copied to clipboard
open override fun cameraForCoordinateBounds(coordinateBounds: CoordinateBounds, padding: EdgeInsets, bearing: Double?, pitch: Double?): CameraOptions
Content copied to clipboard
cameraForCoordinates
Link 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(cameraOptions: CameraOptions): CoordinateBounds
Content copied to clipboard
coordinateBoundsZoomForCamera
Link copied to clipboard
open override fun coordinateBoundsZoomForCamera(cameraOptions: CameraOptions): CoordinateBoundsZoom
Content copied to clipboard
coordinateBoundsZoomForCameraUnwrapped
Link copied to clipboard
open override fun coordinateBoundsZoomForCameraUnwrapped(cameraOptions: CameraOptions): CoordinateBoundsZoom
Content copied to clipboard
coordinateForPixel
Link copied to clipboard
open override fun coordinateForPixel(screenCoordinate: ScreenCoordinate): Point
Content 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
drag
Link copied to clipboard
open override fun drag(fromPoint: ScreenCoordinate, toPoint: ScreenCoordinate, animation: AnimationOptions?)
Content copied to clipboard
dragStart
Link copied to clipboard
dumpDebugLogs
Link copied to clipboard
fun dumpDebugLogs()
Content copied to clipboard
equals
Link copied to clipboard
getBounds
Link copied to clipboard
getCameraOptions
Link copied to clipboard
open override fun getCameraOptions(edgeInsets: EdgeInsets?): 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
getMaxZoom
Link copied to clipboard
getMetersPerPixelAtLatitude
Link copied to clipboard
open override fun getMetersPerPixelAtLatitude(latitude: Double, zoom: Double): Double
Content copied to clipboard
getMinZoom
Link 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
jumpTo
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
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
removeOnDidFinishRenderingFrameListener
Link copied to clipboard
open override fun removeOnDidFinishRenderingFrameListener(onDidFinishRenderingFrameListener: OnDidFinishRenderingFrameListener)
Content copied to clipboard
removeOnDidFinishRenderingMapListener
Link copied to clipboard
open override fun removeOnDidFinishRenderingMapListener(onDidFinishRenderingMapListener: OnDidFinishRenderingMapListener)
Content copied to clipboard
removeOnMapChangedListener
Link copied to clipboard
open override fun removeOnMapChangedListener(onMapChangedListener: OnMapChangedListener)
Content copied to clipboard
removeOnMapLoadErrorListener
Link copied to clipboard
open override fun removeOnMapLoadErrorListener(onMapLoadErrorListener: OnMapLoadErrorListener)
Content copied to clipboard
removeOnSourceChangeListener
Link copied to clipboard
open override fun removeOnSourceChangeListener(onSourceChangeListener: OnSourceChangeListener)
Content copied to clipboard
removeOnStyleImageChangeListener
Link copied to clipboard
open override fun removeOnStyleImageChangeListener(onStyleImageChangeListener: OnStyleImageChangeListener)
Content copied to clipboard
renderStill
Link copied to clipboard
fun renderStill(cameraOptions: CameraOptions, debugOptions: List<MapDebugOptions>, stillImageCallback: StillImageCallback)
Content copied to clipboard
setBounds
Link copied to clipboard
setConstrainMode
Link copied to clipboard
setDebug
Link copied to clipboard
setDefaultFramebufferObject
Link copied to clipboard
setFeatureState
Link copied to clipboard
fun setFeatureState(sourceId: String, sourceLayerId: String?, featureId: String, state: Value)
Content copied to clipboard
setFreeCameraOptions
Link 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
terrainEnabled
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