rotateTo method
Rotates to a specific angle in degrees clockwise.
rotation
The new rotation angle in degrees. Must be between 0 (inclusive) and 360 (exclusive).
Implementation
MapPosition rotateTo(double rotation) {
assert(rotation >= 0 && rotation < 360, 'Rotation must be between 0 and 360: $rotation');
return MapPosition._(
latitude: _latitude,
longitude: _longitude,
zoomlevel: zoomlevel,
indoorLevel: indoorLevel,
rotation: rotation,
rotationRadian: Projection.degToRadian(rotation),
scale: scale,
focalPoint: null,
projection: _projection,
center: _center,
);
}