ViewportPlugin

The ViewportPlugin provides a structured approach to organizing camera management logic into states and transitions between them.

At any given time, the viewport is either:

Functions

Link copied to clipboard
abstract fun addStatusObserver(viewportStatusObserver: ViewportStatusObserver)

Subscribes ViewportStatusObserver to observe the ViewportStatus change.

Link copied to clipboard
open fun cleanup()

Called when the map is destroyed. Should be used to cleanup plugin resources for that map.

Link copied to clipboard
abstract fun idle()
Link copied to clipboard
open fun initialize()

Called when the plugin is first added to the map.

Link copied to clipboard
abstract fun makeDefaultViewportTransition(options: DefaultViewportTransitionOptions = DefaultViewportTransitionOptions.Builder().build()): DefaultViewportTransition

Create a new DefaultViewportTransition instance with provided DefaultViewportTransitionOptions.

Link copied to clipboard
abstract fun makeFollowPuckViewportState(options: FollowPuckViewportStateOptions = FollowPuckViewportStateOptions.Builder().build()): FollowPuckViewportState

Create a new FollowPuckViewportState instance with provided FollowPuckViewportStateOptions.

Link copied to clipboard

Create a new ViewportTransition instance that transition to the target ViewportState immediately.

Link copied to clipboard
open fun onDelegateProvider(delegateProvider: MapDelegateProvider)

Provides all map delegate instances.

Link copied to clipboard
abstract fun removeStatusObserver(viewportStatusObserver: ViewportStatusObserver)
Link copied to clipboard
abstract fun transitionTo(targetState: ViewportState, transition: ViewportTransition? = null, completionListener: CompletionListener? = null)

Executes a transition to requested state.

Properties

Link copied to clipboard

ViewportPlugin.transitionTo uses this transition unless some non-null value is passed to its transition argument.

Link copied to clipboard
abstract var options: ViewportOptions

Configuration options that impact the ViewportPlugin.

Link copied to clipboard
abstract val status: ViewportStatus

Returns current ViewportStatus.