rotateRaw method
bool
rotateRaw(
- double newRotation, {
- required bool hasGesture,
- required MapEventSource source,
- String? id,
Internal endpoint to rotate the MapCamera.
Implementation
bool rotateRaw(
double newRotation, {
required bool hasGesture,
required MapEventSource source,
String? id,
}) {
if (newRotation == camera.rotation) return false;
final newCamera = options.cameraConstraint.constrain(
camera.withRotation(newRotation),
);
if (newCamera == null) return false;
final oldCamera = camera;
// Update camera then emit events and callbacks
value = value.withMapCamera(newCamera);
_emitMapEvent(
MapEventRotate(
id: id,
source: source,
oldCamera: oldCamera,
camera: camera,
),
);
return true;
}