MapState

The MapState that can be hoisted to observe map events, query rendered features and control gestures settings.

Constructors

Link copied to clipboard
fun MapState()

Constructor for the MapState.

Types

Link copied to clipboard
object Companion

Public companion object of MapState.

Link copied to clipboard
data class Holder(val savedProperties: Map<String, Parcelable>) : Parcelable

MapState Holder class to be used within Saver.

Functions

Link copied to clipboard
fun genericEvents(eventName: String): Flow<GenericEvent>

Flow of GenericEvent updates from MapboxMap.subscribeGenericEvent.

Link copied to clipboard

Gets the state map of a feature from a featureset asynchronously.

Link copied to clipboard
suspend fun pixelForCoordinate(coordinate: Point): ScreenCoordinate

Calculate a screen coordinate that corresponds to a geographical coordinate (i.e., longitude-latitude pair).

Link copied to clipboard
suspend fun queryRenderedFeatures(geometry: RenderedQueryGeometry, options: RenderedQueryOptions): Expected<String, List<QueriedRenderedFeature>>

Queries the map for rendered features.

suspend fun <FF : FeaturesetFeature<*>> queryRenderedFeatures(descriptor: TypedFeaturesetDescriptor<*, FF>, geometry: RenderedQueryGeometry? = null, filter: Expression? = null): List<FF>

Queries the map for given descriptor and returns typed FeaturesetFeature list of rendered features.

Link copied to clipboard
suspend fun <FS : FeatureState, FSK : FeatureStateKey<FS>> removeFeatureState(featuresetFeature: FeaturesetFeature<FS>, stateKey: FSK? = null): Expected<String, None>

Removes entries from a feature state based on featuresetFeature coming from an interaction callback.

Link copied to clipboard
suspend fun resetFeatureStates(descriptor: TypedFeaturesetDescriptor<*, *>): Expected<String, None>

Reset all the feature states within a style source.

Link copied to clipboard
suspend fun <FS : FeatureState> setFeatureState(featuresetFeature: FeaturesetFeature<FS>, state: FS): Expected<String, None>

Sets the state map for given featuresetFeature coming from an interaction callback asynchronously.

Properties

Link copied to clipboard
val cameraChangedEvents: Flow<CameraChanged>

Flow of CameraChanged updates from MapboxMap.subscribeCameraChanged.

Link copied to clipboard

Gesture configuration allows to control the user touch interaction.

Link copied to clipboard
val mapIdleEvents: Flow<MapIdle>

Flow of MapIdle updates from MapboxMap.subscribeMapIdle.

Link copied to clipboard
val mapLoadedEvents: Flow<MapLoaded>

Flow of MapLoaded updates from MapboxMap.subscribeMapLoaded.

Link copied to clipboard
val mapLoadingErrorEvents: Flow<MapLoadingError>

Flow of MapLoadingError updates from MapboxMap.subscribeMapLoadingError.

Link copied to clipboard
val renderFrameFinishedEvents: Flow<RenderFrameFinished>

Flow of RenderFrameFinished updates from MapboxMap.subscribeRenderFrameFinished.

Link copied to clipboard
val renderFrameStartedEvents: Flow<RenderFrameStarted>

Flow of RenderFrameStarted updates from MapboxMap.subscribeRenderFrameStarted.

Link copied to clipboard
val resourceRequestEvents: Flow<ResourceRequest>

Flow of ResourceRequest updates from MapboxMap.subscribeResourceRequest.

Link copied to clipboard
val sourceAddedEvents: Flow<SourceAdded>

Flow of SourceAdded updates from MapboxMap.subscribeSourceAdded.

Link copied to clipboard
val sourceDataLoadedEvents: Flow<SourceDataLoaded>

Flow of SourceDataLoaded updates from MapboxMap.subscribeSourceDataLoaded.

Link copied to clipboard
val sourceRemovedEvents: Flow<SourceRemoved>

Flow of SourceRemoved updates from MapboxMap.subscribeSourceRemoved.

Link copied to clipboard
val styleDataLoadedEvents: Flow<StyleDataLoaded>

Flow of StyleDataLoaded updates from MapboxMap.subscribeStyleDataLoaded.

Link copied to clipboard
val styleImageMissingEvents: Flow<StyleImageMissing>

Flow of StyleImageMissing updates from MapboxMap.subscribeStyleImageMissing.

Link copied to clipboard
val styleImageRemoveUnusedEvents: Flow<StyleImageRemoveUnused>

Flow of StyleImageRemoveUnused updates from MapboxMap.subscribeStyleImageRemoveUnused.

Link copied to clipboard
val styleLoadedEvents: Flow<StyleLoaded>

Flow of StyleLoaded updates from MapboxMap.subscribeStyleLoaded.