ViewportPlugin

interface ViewportPlugin : MapPlugin

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

addStatusObserver
Link copied to clipboard
abstract fun addStatusObserver(viewportStatusObserver: ViewportStatusObserver)
Subscribes ViewportStatusObserver to observe the ViewportStatus change.
cleanup
Link copied to clipboard
open fun cleanup()
Called when the map is destroyed.
equals
Link copied to clipboard
open operator fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
open fun hashCode(): Int
idle
Link copied to clipboard
abstract fun idle()
initialize
Link copied to clipboard
open fun initialize()
Called when the plugin is first added to the map.
makeDefaultViewportTransition
Link copied to clipboard
abstract fun makeDefaultViewportTransition(options: DefaultViewportTransitionOptions = DefaultViewportTransitionOptions.Builder().build()): DefaultViewportTransition
Create a new DefaultViewportTransition instance with provided DefaultViewportTransitionOptions.
makeFollowPuckViewportState
Link copied to clipboard
abstract fun makeFollowPuckViewportState(options: FollowPuckViewportStateOptions = FollowPuckViewportStateOptions.Builder().build()): FollowPuckViewportState
Create a new FollowPuckViewportState instance with provided FollowPuckViewportStateOptions.
makeImmediateViewportTransition
Link copied to clipboard
abstract fun makeImmediateViewportTransition(): ViewportTransition
Create a new ViewportTransition instance that transition to the target ViewportState immediately.
makeOverviewViewportState
Link copied to clipboard
abstract fun makeOverviewViewportState(options: OverviewViewportStateOptions): OverviewViewportState
Create a new OverviewViewportState instance with provided OverviewViewportStateOptions.
onDelegateProvider
Link copied to clipboard
open fun onDelegateProvider(delegateProvider: MapDelegateProvider)
Provides all map delegate instances.
removeStatusObserver
Link copied to clipboard
abstract fun removeStatusObserver(viewportStatusObserver: ViewportStatusObserver)
toString
Link copied to clipboard
open fun toString(): String
transitionTo
Link copied to clipboard
abstract fun transitionTo(targetState: ViewportState, transition: ViewportTransition? = null, completionListener: CompletionListener? = null)
Executes a transition to requested state.

Properties

defaultTransition
Link copied to clipboard
abstract var defaultTransition: ViewportTransition
ViewportPlugin.transitionTo uses this transition unless some non-null value is passed to its transition argument.
options
Link copied to clipboard
abstract var options: ViewportOptions
Configuration options that impact the ViewportPlugin.
status
Link copied to clipboard
abstract val status: ViewportStatus
Returns current ViewportStatus.

Inheritors

ViewportPluginImpl
Link copied to clipboard