From 3b6758b4cbe16a6365e2f7e4abb8fad25ff73874 Mon Sep 17 00:00:00 2001 From: Lene Wasskog <lene.wasskog@nibio.no> Date: Tue, 29 Oct 2024 15:37:04 +0100 Subject: [PATCH] feat: Coordinates are given "poiId" -1 to be shown with form in map --- .../templates/cerealblotchmodels/barleynetblotchform.html | 4 ++-- .../cerealblotchmodels/septoriahumiditymodelform.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cerealblotchmodels/templates/cerealblotchmodels/barleynetblotchform.html b/cerealblotchmodels/templates/cerealblotchmodels/barleynetblotchform.html index 177578a2..7411d6a7 100755 --- a/cerealblotchmodels/templates/cerealblotchmodels/barleynetblotchform.html +++ b/cerealblotchmodels/templates/cerealblotchmodels/barleynetblotchform.html @@ -269,7 +269,7 @@ window.openCoordinatesMap = () => { if (inputLatitudeElement.value && inputLongitudeElement.value) { - selectedPoint = 1; + selectedPoint = -1; selectedFeature = { "type": "FeatureCollection", "features": [ { @@ -289,7 +289,7 @@ } const isPoiMap = false; // Map should enable selection of coordinates (not pois) - const allowNewPoints = true; // User should be able to select new pois + const allowNewPoints = true; // User should be able to select new coordinates const coordinatesMapInstance = new MapModal('coordinates-map', selectedFeature, settings.currentLanguage, isPoiMap, allowNewPoints, selectCoordinates); coordinatesMapInstance.openModal(selectedPoint); } diff --git a/cerealblotchmodels/templates/cerealblotchmodels/septoriahumiditymodelform.html b/cerealblotchmodels/templates/cerealblotchmodels/septoriahumiditymodelform.html index 559b50c9..2e29cd75 100644 --- a/cerealblotchmodels/templates/cerealblotchmodels/septoriahumiditymodelform.html +++ b/cerealblotchmodels/templates/cerealblotchmodels/septoriahumiditymodelform.html @@ -274,7 +274,7 @@ window.openCoordinatesMap = () => { if (inputLatitudeElement.value && inputLongitudeElement.value) { console.info(`Open map for lat=${parseFloat(inputLatitudeElement.value)} lon=${parseFloat(inputLatitudeElement.value)}`) - selectedPoint = 1; + selectedPoint = -1; selectedFeature = { "type": "FeatureCollection", "features": [ { @@ -294,7 +294,7 @@ } const isPoiMap = false; // Map should enable selection of coordinates (not pois) - const allowNewPoints = true; // User should be able to select new pois + const allowNewPoints = true; // User should be able to select new coordinates const coordinatesMapInstance = new MapModal('coordinates-map', selectedFeature, settings.currentLanguage, isPoiMap, allowNewPoints, selectCoordinates); coordinatesMapInstance.openModal(selectedPoint); } -- GitLab