ObservableInterface(androidJvm)

The `observable` interface provides basic Publish&Subscribe functionality. Classes that extend this functionality and capable of generating events, have to specify event types and corresponding data format for an event.

interface ObservableInterface(androidJvm)

Functions

subscribe
Link copied to clipboard

Subscribes an `observer` to a provided array of event types. The `observable` will hold a strong reference to an `observer` instance, therefore, in order to stop receiving notifications, caller must call `unsubscribe` with an `observer` instance used for an initial subscription.

abstract fun subscribe(observer: Observer, events: List<String>)
unsubscribe
Link copied to clipboard

Unsubscribes an `observer` from all events.

abstract fun unsubscribe(observer: Observer)

Unsubscribes an `observer` from a provided array of event types.

abstract fun unsubscribe(observer: Observer, events: List<String>)

Inheritors

Observable
Link copied to clipboard
StyleManagerInterface
Link copied to clipboard
MapboxMap
Link copied to clipboard

Extensions

subscribeCameraChange
Link copied to clipboard

Subscribes an Observer for of event type "camera-changed".

Observable will hold a strong reference to an Observer instance, therefore, in order to stop receiving notifications, caller must call unsubscribe with an Observer instance used for an initial subscription.

fun ObservableInterface.subscribeCameraChange(observer: Observer)
subscribeMapIdle
Link copied to clipboard

Subscribes an Observer for of event type "map-idle".

Observable will hold a strong reference to an Observer instance, therefore, in order to stop receiving notifications, caller must call unsubscribe with an Observer instance used for an initial subscription.

fun ObservableInterface.subscribeMapIdle(observer: Observer)
subscribeMapLoaded
Link copied to clipboard

Subscribes an Observer for of event type "map-loaded".

Observable will hold a strong reference to an Observer instance, therefore, in order to stop receiving notifications, caller must call unsubscribe with an Observer instance used for an initial subscription.

fun ObservableInterface.subscribeMapLoaded(observer: Observer)
subscribeMapLoadingError
Link copied to clipboard

Subscribes an Observer for of event type "map-loading-error".

Observable will hold a strong reference to an Observer instance, therefore, in order to stop receiving notifications, caller must call unsubscribe with an Observer instance used for an initial subscription.

fun ObservableInterface.subscribeMapLoadingError(observer: Observer)
subscribeRenderFrameFinished
Link copied to clipboard

Subscribes an Observer for of event type "render-frame-finished".

Observable will hold a strong reference to an Observer instance, therefore, in order to stop receiving notifications, caller must call unsubscribe with an Observer instance used for an initial subscription.

fun ObservableInterface.subscribeRenderFrameFinished(observer: Observer)
subscribeRenderFrameStarted
Link copied to clipboard

Subscribes an Observer for of event type "render-frame-started".

Observable will hold a strong reference to an Observer instance, therefore, in order to stop receiving notifications, caller must call unsubscribe with an Observer instance used for an initial subscription.

fun ObservableInterface.subscribeRenderFrameStarted(observer: Observer)
subscribeResourceRequest
Link copied to clipboard

Subscribes an Observer for of event type "resource-request".

Observable will hold a strong reference to an Observer instance, therefore, in order to stop receiving notifications, caller must call unsubscribe with an Observer instance used for an initial subscription.

fun ObservableInterface.subscribeResourceRequest(observer: Observer)
subscribeSourceAdded
Link copied to clipboard

Subscribes an Observer for of event type "source-added".

Observable will hold a strong reference to an Observer instance, therefore, in order to stop receiving notifications, caller must call unsubscribe with an Observer instance used for an initial subscription.

fun ObservableInterface.subscribeSourceAdded(observer: Observer)
subscribeSourceDataLoaded
Link copied to clipboard

Subscribes an Observer for of event type "source-data-loaded".

Observable will hold a strong reference to an Observer instance, therefore, in order to stop receiving notifications, caller must call unsubscribe with an Observer instance used for an initial subscription.

fun ObservableInterface.subscribeSourceDataLoaded(observer: Observer)
subscribeSourceRemoved
Link copied to clipboard

Subscribes an Observer for of event type "source-removed".

Observable will hold a strong reference to an Observer instance, therefore, in order to stop receiving notifications, caller must call unsubscribe with an Observer instance used for an initial subscription.

fun ObservableInterface.subscribeSourceRemoved(observer: Observer)
subscribeStyleDataLoaded
Link copied to clipboard

Subscribes an Observer for of event type "style-data-loaded".

Observable will hold a strong reference to an Observer instance, therefore, in order to stop receiving notifications, caller must call unsubscribe with an Observer instance used for an initial subscription.

fun ObservableInterface.subscribeStyleDataLoaded(observer: Observer)
subscribeStyleImageMissing
Link copied to clipboard

Subscribes an Observer for of event type "style-image-missing".

Observable will hold a strong reference to an Observer instance, therefore, in order to stop receiving notifications, caller must call unsubscribe with an Observer instance used for an initial subscription.

fun ObservableInterface.subscribeStyleImageMissing(observer: Observer)
subscribeStyleImageUnused
Link copied to clipboard

Subscribes an Observer for of event type "style-image-remove-unused".

Observable will hold a strong reference to an Observer instance, therefore, in order to stop receiving notifications, caller must call unsubscribe with an Observer instance used for an initial subscription.

fun ObservableInterface.subscribeStyleImageUnused(observer: Observer)
subscribeStyleLoaded
Link copied to clipboard

Subscribes an Observer for of event type "style-loaded".

Observable will hold a strong reference to an Observer instance, therefore, in order to stop receiving notifications, caller must call unsubscribe with an Observer instance used for an initial subscription.

fun ObservableInterface.subscribeStyleLoaded(observer: Observer)
unsubscribeCameraChange
Link copied to clipboard

Unsubscribe an Observer for event types "camera-changed".

fun ObservableInterface.unsubscribeCameraChange(observer: Observer)
unsubscribeMapIdle
Link copied to clipboard

Unsubscribe an Observer for event types "map-idle".

fun ObservableInterface.unsubscribeMapIdle(observer: Observer)
unsubscribeMapLoaded
Link copied to clipboard

Unsubscribe an Observer for event types "map-loaded".

fun ObservableInterface.unsubscribeMapLoaded(observer: Observer)
unsubscribeMapLoadingError
Link copied to clipboard

Unsubscribe an Observer for event types "map-loading-error".

fun ObservableInterface.unsubscribeMapLoadingError(observer: Observer)
unsubscribeRenderFrameFinished
Link copied to clipboard

Unsubscribe an Observer for event types "render-frame-finished".

fun ObservableInterface.unsubscribeRenderFrameFinished(observer: Observer)
unsubscribeRenderFrameStarted
Link copied to clipboard

Unsubscribe an Observer for event types "render-frame-started".

fun ObservableInterface.unsubscribeRenderFrameStarted(observer: Observer)
unsubscribeResourceRequest
Link copied to clipboard

Unsubscribe an Observer for event types "resource-request".

fun ObservableInterface.unsubscribeResourceRequest(observer: Observer)
unsubscribeSourceAdded
Link copied to clipboard

Unsubscribe an Observer for event types "source-added".

fun ObservableInterface.unsubscribeSourceAdded(observer: Observer)
unsubscribeSourceDataLoaded
Link copied to clipboard

Unsubscribe an Observer for event types "source-data-loaded".

fun ObservableInterface.unsubscribeSourceDataLoaded(observer: Observer)
unsubscribeSourceRemoved
Link copied to clipboard

Unsubscribe an Observer for event types "source-removed".

fun ObservableInterface.unsubscribeSourceRemoved(observer: Observer)
unsubscribeStyleDataFinished
Link copied to clipboard

Unsubscribe an Observer for event types "style-data-loaded".

fun ObservableInterface.unsubscribeStyleDataFinished(observer: Observer)
unsubscribeStyleImageMissing
Link copied to clipboard

Unsubscribe an Observer for event types "style-image-missing".

fun ObservableInterface.unsubscribeStyleImageMissing(observer: Observer)
unsubscribeStyleImageUnused
Link copied to clipboard

Unsubscribe an Observer for event types "style-image-remove-unused".

fun ObservableInterface.unsubscribeStyleImageUnused(observer: Observer)
unsubscribeStyleLoaded
Link copied to clipboard

Unsubscribe an Observer for event types "style-loaded".

fun ObservableInterface.unsubscribeStyleLoaded(observer: Observer)