From 17e201b6721d155a9a45e40e41dc54a43f142235 Mon Sep 17 00:00:00 2001 From: Lene Wasskog <lene.wasskog@nibio.no> Date: Mon, 28 Oct 2024 15:54:03 +0100 Subject: [PATCH] feat: Open map with currently selected language --- .../templates/cerealblotchmodels/barleynetblotchform.html | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/cerealblotchmodels/templates/cerealblotchmodels/barleynetblotchform.html b/cerealblotchmodels/templates/cerealblotchmodels/barleynetblotchform.html index 4305be96..8dde9dee 100755 --- a/cerealblotchmodels/templates/cerealblotchmodels/barleynetblotchform.html +++ b/cerealblotchmodels/templates/cerealblotchmodels/barleynetblotchform.html @@ -251,11 +251,9 @@ selectedFeature = undefined; } - // TODO Open map with currently selected language! (not 'nb') - const isPoiMap = false; // Map should enable selection of coordinates (not pois) const allowNewPoints = true; // User should be able to select new pois - const coordinatesMapInstance = new MapModal('coordinates-map', selectedFeature, 'nb', isPoiMap, allowNewPoints, selectCoordinates); + const coordinatesMapInstance = new MapModal('coordinates-map', selectedFeature, settings.currentLanguage, isPoiMap, allowNewPoints, selectCoordinates); coordinatesMapInstance.openModal(selectedPoint); } @@ -272,7 +270,7 @@ .then(geoJson => { const isPoiMap = true; // Map should enable selection of pois const allowNewPoints = false; // User should not be able to create new pois - const poiMapInstance = new MapModal('poi-map', geoJson, 'nb', isPoiMap, allowNewPoints, selectPoi); + const poiMapInstance = new MapModal('poi-map', geoJson, settings.currentLanguage, isPoiMap, allowNewPoints, selectPoi); const selectedPoiId = getSelectedPoiId(); poiMapInstance.openModal(selectedPoiId); }) -- GitLab