OverviewViewportState constructor
const
OverviewViewportState({
- required GeometryObject geometry,
- EdgeInsets geometryPadding = const EdgeInsets.all(0),
- double? bearing = 0.0,
- double? pitch = 0.0,
- double? maxZoom,
- Offset? offset,
- Duration animationDuration = const Duration(seconds: 1),
Creates an OverviewViewportState that configures the camera to display an overview of the specified geometry.
The camera adjusts to fit the geometry within the map view, applying any specified geometryPadding around it. You can set the map's orientation using bearing and pitch, and limit the zoom level with maxZoom. The offset parameter shifts the center of the geometry relative to the map's center, which can be useful for accommodating UI elements. The animationDuration controls how long the camera transition animation takes.
All parameters are optional except for geometry, which is required.
Implementation
const OverviewViewportState({
required this.geometry,
this.geometryPadding = const EdgeInsets.all(0),
this.bearing = 0.0,
this.pitch = 0.0,
this.maxZoom,
this.offset,
this.animationDuration = const Duration(seconds: 1),
}) : super();