Snapshotter

open class Snapshotter

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

Constructors

Snapshotter
Link copied to clipboard
fun Snapshotter(context: Context, options: MapSnapshotOptions, overlayOptions: SnapshotOverlayOptions = SnapshotOverlayOptions())

Types

Companion
Link copied to clipboard
object Companion
Static variables and methods.

Functions

cameraForCoordinates
Link copied to clipboard
fun cameraForCoordinates(coordinates: List<Point>, padding: EdgeInsets, bearing: Double, pitch: Double): CameraOptions
Convenience method that returns the camera options object for given arguments
cancel
Link copied to clipboard
fun cancel()
Cancel taking snapshot if it was running.
clearData
Link copied to clipboard
fun clearData(callback: AsyncOperationResultCallback)
Clears temporary map data.
coordinateBoundsForCamera
Link copied to clipboard
fun coordinateBoundsForCamera(options: CameraOptions): CoordinateBounds
Returns the coordinate bounds for a given camera.
destroy
Link copied to clipboard
fun destroy()
Destroy snapshotter.
equals
Link copied to clipboard
open operator fun equals(other: Any?): Boolean
getCameraState
Link copied to clipboard
fun getCameraState(): CameraState
Get the current camera state.
getSize
Link copied to clipboard
fun getSize(): Size
Gets the size of the snapshot
getStyleJson
Link copied to clipboard
fun getStyleJson(): String
Get the JSON serialization string of the current Mapbox Style in use.
getStyleUri
Link copied to clipboard
fun getStyleUri(): String
Get the URI of the current Mapbox Style in use.
hashCode
Link copied to clipboard
open fun hashCode(): Int
isInTileMode
Link copied to clipboard
fun isInTileMode(): Boolean
Returns TRUE if the snapshotter is in the tile mode.
setCamera
Link copied to clipboard
fun setCamera(cameraOptions: CameraOptions)
Set the camera options of the snapshot.
setSize
Link copied to clipboard
fun setSize(size: Size)
Sets the size of the snapshot
setStyleJson
Link copied to clipboard
fun setStyleJson(styleJson: String)
Load the style from a provided JSON string.
setStyleListener
Link copied to clipboard
fun setStyleListener(listener: SnapshotStyleListener)
Set SnapshotStyleListener to listen to all events style related.
setStyleUri
Link copied to clipboard
fun setStyleUri(styleUri: String)
Set the URI of the current Mapbox Style in use.
setTileMode
Link copied to clipboard
fun setTileMode(set: Boolean)
Sets the snapshotter to the tile mode.
start
Link copied to clipboard
fun start(callback: SnapshotCreatedListener)
Start taking a snapshot.
subscribe
Link copied to clipboard
fun subscribe(observer: Observer, events: List<String>)
Subscribes an Observer to a provided list of event types.
toString
Link copied to clipboard
open fun toString(): String
unsubscribe
Link copied to clipboard
fun unsubscribe(observer: Observer)
Unsubscribes an Observer from all events.
fun unsubscribe(observer: Observer, events: List<String>)
Unsubscribes an Observer from a provided list of event types.