rotate method
bool
rotate(
- double newRotation, {
- bool hasGesture = false,
- required MapEventSource source,
- String? id,
Implementation
bool rotate(
double newRotation, {
bool hasGesture = false,
required MapEventSource source,
String? id,
}) {
if (newRotation != _rotation) {
final double oldRotation = _rotation;
//Apply state then emit events and callbacks
setState(() {
_rotation = newRotation;
});
_updateSizeByOriginalSizeAndRotation();
emitMapEvent(
MapEventRotate(
id: id,
currentRotation: oldRotation,
targetRotation: _rotation,
center: _center,
zoom: _zoom,
source: source,
),
);
return true;
}
return false;
}