Viewport Plugin Impl
Mapbox default implementation for ViewportPlugin.
The Viewport plugin allows to track objects on a map.
It provides a structured approach to organizing camera management logic into states and transitions between them.
at any given time, the viewport is either:
idle (not updating the camera)
in a state (camera is being managed by a ViewportState)
transitioning (camera is being managed by a ViewportTransition)
Constructors
ViewportPluginImpl
Link copied to clipboard
fun ViewportPluginImpl(handler: Handler = Handler(Looper.getMainLooper()))
Content copied to clipboard
Functions
addStatusObserver
Link copied to clipboard
open override fun addStatusObserver(viewportStatusObserver: ViewportStatusObserver)
Content copied to clipboard
Adds ViewportStatusObserver to observe the status change.
idle
Link copied to clipboard
open override fun idle()
Content copied to clipboard
Immediately goes to ViewportStatus.Idle state canceling all ongoing transitions.
initialize
Link copied to clipboard
open fun initialize()
Content copied to clipboard
makeDefaultViewportTransition
Link copied to clipboard
open override fun makeDefaultViewportTransition(options: DefaultViewportTransitionOptions): DefaultViewportTransition
Content copied to clipboard
makeFollowPuckViewportState
Link copied to clipboard
open override fun makeFollowPuckViewportState(options: FollowPuckViewportStateOptions): FollowPuckViewportState
Content copied to clipboard
makeImmediateViewportTransition
Link copied to clipboard
makeOverviewViewportState
Link copied to clipboard
open override fun makeOverviewViewportState(options: OverviewViewportStateOptions): OverviewViewportState
Content copied to clipboard
onDelegateProvider
Link copied to clipboard
open override fun onDelegateProvider(delegateProvider: MapDelegateProvider)
Content copied to clipboard
removeStatusObserver
Link copied to clipboard
open override fun removeStatusObserver(viewportStatusObserver: ViewportStatusObserver)
Content copied to clipboard
Removes ViewportStatusObserver.
transitionTo
Link copied to clipboard
open override fun transitionTo(targetState: ViewportState, transition: ViewportTransition?, completionListener: CompletionListener?)
Content copied to clipboard
Properties
defaultTransition
Link copied to clipboard
DefaultViewportTransition with default optionsThis transition is used unless overridden by one of the registered transitions.
options
Link copied to clipboard
Options that impact the ViewportPlugin.
status
Link copied to clipboard
Returns current ViewportStatus.