diff --git a/src/ol/control/Rotate.js b/src/ol/control/Rotate.js index 5ba8a0db34..f4dd50c54d 100644 --- a/src/ol/control/Rotate.js +++ b/src/ol/control/Rotate.js @@ -131,8 +131,9 @@ class Rotate extends Control { // upon it return; } - if (view.getRotation() !== undefined) { - if (this.duration_ > 0) { + const rotation = view.getRotation(); + if (rotation !== undefined) { + if (this.duration_ > 0 && rotation % (2 * Math.PI) !== 0) { view.animate({ rotation: 0, duration: this.duration_,