From 0200a62772e9975b3efa15ad86fa48277a787ee1 Mon Sep 17 00:00:00 2001 From: Benjamin Gerber Date: Tue, 26 Nov 2024 09:35:22 +0100 Subject: [PATCH] Remove force center after view animation. This workaround was making the map less blury in case of map height with a not round number of pixels, but it cause the map zoom to "jump" if the view.contrainResolution is set to true. --- src/controllers/AbstractAppController.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) 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( {