rotate method
bool
rotate(
- double degree, {
- dynamic hasGesture = false,
- dynamic callOnMoveSink = true,
- required MapEventSource source,
- String? id,
Implementation
bool rotate(
double degree, {
hasGesture = false,
callOnMoveSink = true,
required MapEventSource source,
String? id,
}) {
if (degree != _rotation) {
var oldRotation = _rotation;
rotation = degree;
_updateSizeByOriginalSizeAndRotation();
onRotationChanged(_rotation);
emitMapEvent(
MapEventRotate(
id: id,
currentRotation: oldRotation,
targetRotation: _rotation,
center: _lastCenter!,
zoom: _zoom,
source: source,
),
);
if (callOnMoveSink) {
_onMoveSink.add(null);
}
return true;
}
return false;
}