From b18f8aa5aff02087da9afcbac079079171c005fd Mon Sep 17 00:00:00 2001 From: Lene Wasskog <lene.wasskog@nibio.no> Date: Mon, 28 Oct 2024 13:33:06 +0100 Subject: [PATCH] feat: Set minZoom of map to 3 --- src/main/webapp/js/mapModal.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/webapp/js/mapModal.js b/src/main/webapp/js/mapModal.js index ad34e2b0..315d337d 100644 --- a/src/main/webapp/js/mapModal.js +++ b/src/main/webapp/js/mapModal.js @@ -177,7 +177,8 @@ class MapModal { // Initialize the map centered on Norway this.map = map(this.mapContainerId).setView([latitude, longitude], zoomLevel); tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { - maxZoom: 19 + maxZoom: 19, + minZoom: 3 }).addTo(this.map); console.info("Create map " + this.mapContainerId + " centered on (" + latitude + "," + longitude + ") with points", this.geoJsonData ? this.geoJsonData.features : null); -- GitLab