NdsStore

class NdsStore : DataStore, Disposable

Implementation of a DataStore which is based on an onboard NDS map.

Important: This is a Public Preview API. It may be changed or removed at any time.

Types

Link copied to clipboard
object Companion
Link copied to clipboard
data class MapOperation(val operation: MapOperationType, val node: RegionGraphNodeId)

Represents an operation on the onboard map

Functions

Link copied to clipboard
fun addOnAutomaticUpdateFailureListener(listener: (error: UpdateErrorCode) -> Unit)

Adds listener that is called when an automatic update fails due to an irrecoverable error.

Link copied to clipboard
fun addOnUpdateListener(listener: () -> Unit)

Adds listener that is called when a region is successfully updated with new content.

Link copied to clipboard
fun addRegionGraphListener(listener: (regionGraphOrError: Result<RegionGraph, UpdateErrorCode>) -> Unit)

Add a listener for information about the state of the map.

Link copied to clipboard
open override fun dispose()
Link copied to clipboard
fun removeOnAutomaticUpdateFailureListener(listener: (error: UpdateErrorCode) -> Unit)

Removes previously registered listener.

Link copied to clipboard
fun removeOnUpdateListener(listener: () -> Unit)

Removes previously registered listener.

Link copied to clipboard
fun removeRegionGraphListener(listener: (regionGraphOrError: Result<RegionGraph, UpdateErrorCode>) -> Unit)

Removes the given listener.

Link copied to clipboard
fun scheduleMapOperations(operations: List<NdsStore.MapOperation>)

Schedules the given operations to be performed on the onboard map.

Link copied to clipboard
open override fun setActiveRoute(polyline: List<GeoCoordinate>)

Sets the active route.

Link copied to clipboard
open override fun setPosition(position: GeoCoordinate)

Sets current position.

Link copied to clipboard
fun setUpdatesEnabled(enabled: Boolean)

Enables or disables map updates.

Properties

Link copied to clipboard
open override val storeAccess: NdsStoreAccess
Link copied to clipboard
val sync: NdsStoreAccessSync