diff --git a/src/controllers/AbstractAppController.js b/src/controllers/AbstractAppController.js index 9f5f85584050..14432444fc95 100644 --- a/src/controllers/AbstractAppController.js +++ b/src/controllers/AbstractAppController.js @@ -91,6 +91,7 @@ export function AbstractAppController($scope, $injector, mobile) { } } const scaleline = document.getElementById('scaleline'); + const view = new olView(this.options.view); const constraints = view.getConstraints(); const centerConstraint = constraints.center; @@ -126,15 +127,6 @@ export function AbstractAppController($scope, $injector, mobile) { } return newCenter; }; - - // Fix the center on the WMTS grid on animation end - const originalViewSetHint = view.setHint; - view.setHint = (hint, value) => { - originalViewSetHint.call(view, hint, value); - if (hint === ViewHint.ANIMATING && value === -1) { - view.setCenter(view.getCenter()); - } - }; const map = new olMap( Object.assign( {