Map Viewport State
A state object that can be hoisted to control and observe the map's camera state. A MapViewportState may only be used by a single MapboxMap composable at a time as it reflects instance state for a single view of a map.
Parameters
the initial camera position
Constructors
Types
Companion object of MapViewportState.
Functions
Convenience method that returns the CameraOptions object for given parameters.
Ease the map camera to a given camera options.
Fly the map camera to a given camera options.
Sets ViewportPlugin.status to ViewportStatus.Idle synchronously.
Move the map by the given screen coordinate with optional animation.
Pitch the map by the given amount in degrees with optional animation.
Rotate the map using two screen coordinates as rotation pivots, with optional animation.
Scale the map by the given amount with optional animation.
Move the camera instantaneously as specified by cameraOptions. Any camera animation in progress will be cancelled.
Move the camera instantaneously as specified by block camera options. Any camera animation in progress will be cancelled.
Transition to a new FollowPuckViewportState.
Transition to a new OverviewViewportState.
Properties
The current CameraState of the map or null if this MapViewportState is not yet associated with a map.
The current ViewportStatus that represents the status of the viewport or null if this MapViewportState is not yet associated with a map.
The reason why the ViewportStatus has been changed or null if this MapViewportState is not yet associated with a map.
A utility function to get the default CameraOptions defined in the style or null if this MapViewportState is not yet associated with a map.