MapboxMapRecorder

MapboxMapRecorder provides functions to record and replay API calls of a MapboxMap instance. These recordings can be used to debug issues which require multiple steps to reproduce. Additionally, playbacks can be used for performance testing custom scenarios.

Note: The raw format produced by stopRecording is experimental and there is no guarantee for version cross-compatibility when feeding it to replay.

To create the MapboxMapRecorder instance refer to MapboxMap.createRecorder.

Functions

Link copied to clipboard
fun getPlaybackState(): String

Returns the string description of the current state of playback.

Link copied to clipboard
@JvmOverloads
fun replay(recordedSequence: ByteBuffer, options: MapPlayerOptions = mapPlayerOptions { }, onEnded: () -> Unit = { })

Replay a supplied sequence.

Link copied to clipboard
@JvmOverloads
fun startRecording(options: MapRecorderOptions = mapRecorderOptions { })

Begins the recording session.

Link copied to clipboard
fun stopRecording(): ByteBuffer

Stops the current recording session. Recorded section could be replayed with replay function.

Link copied to clipboard

Temporarily pauses or resumes playback if already paused.