From 1b136f9c6c7d17c2f11c63c2910ca5304f551420 Mon Sep 17 00:00:00 2001 From: Pascal Barth Date: Mon, 6 Nov 2023 17:06:19 +0100 Subject: [PATCH] BGDIINF_SB-3161 : constrains OL to only show map in LV95 extent --- src/modules/map/components/openlayers/OpenLayersMap.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/modules/map/components/openlayers/OpenLayersMap.vue b/src/modules/map/components/openlayers/OpenLayersMap.vue index 82410c9992..f8af0c5049 100644 --- a/src/modules/map/components/openlayers/OpenLayersMap.vue +++ b/src/modules/map/components/openlayers/OpenLayersMap.vue @@ -333,6 +333,8 @@ export default { minResolution: VIEW_MIN_RESOLUTION, rotation: this.rotation, projection: WEBMERCATOR.epsg, + extent: LV95.getBoundsAs(WEBMERCATOR).flatten, + constrainOnlyCenter: true, }) this.lv95View = new View({ zoom: this.zoom, @@ -340,6 +342,8 @@ export default { rotation: this.rotation, resolutions: LV95_RESOLUTIONS, projection: LV95.epsg, + extent: LV95.bounds.flatten, + constrainOnlyCenter: true, }) this.setCurrentMapViewAccordingToProjection()