setPerspective method
- MapViewPerspective perspective, {
- GemAnimation? animation,
Switch between 2D and 3D map perspectives during follow position mode
Toggles between a flat, top-down view (MapViewPerspective.twoDimensional) and a perspective view with tilt (MapViewPerspective.threeDimensional). Optionally animates the transition.
Parameters
perspective: The desired map perspective: MapViewPerspective.twoDimensional for flat view or MapViewPerspective.threeDimensional for perspective viewanimation: Optional animation for the perspective change. If null, the change is instant. Default: null
Also see:
perspective- Current map perspective- viewAngle - Camera pitch angle relevant in 3D perspective
Implementation
void setPerspective(
final MapViewPerspective perspective, {
final GemAnimation? animation,
}) {
objectMethod(
pointerId,
'FollowPositionPreferences',
'setPerspective',
args: <String, Object>{
'perspective': perspective.id,
if (animation != null) 'animation': animation,
},
dependencyId: _mapPointerId,
);
}