FollowPuckViewportState constructor
const
FollowPuckViewportState({
- double? zoom = 16.35,
- FollowPuckViewportStateBearing? bearing = const FollowPuckViewportStateBearingHeading(),
- double? pitch = 45,
Creates a FollowPuckViewportState that configures the camera to follow the user's location indicator.
The camera will continuously track the user's position on the map, adjusting its position and orientation based on the provided zoom
, bearing
, and pitch
values.
Note: It is recommended to use only the DefaultViewportTransition animation option when transitioning to this viewport state, as it smoothly handles the moving user location puck. Other animation options are not supported.
zoom
: The zoom level of the map. Defaults to16.35
.bearing
: The bearing behavior of the map. Defaults to FollowPuckViewportStateBearingHeading.pitch
: The pitch of the camera toward the horizon, in degrees. Defaults to45
.
Implementation
const FollowPuckViewportState({
this.zoom = 16.35,
this.bearing = const FollowPuckViewportStateBearingHeading(),
this.pitch = 45,
}) : super();