From b726ad1fa7323ade9747ebd57e0fbd5cf602fa1a Mon Sep 17 00:00:00 2001
From: Tor-Einar Skog <tor-einar.skog@nibio.no>
Date: Mon, 28 Mar 2022 11:11:14 +0200
Subject: [PATCH] Ignoring clicks on POI maps where user can't edit them

---
 src/components/MapPOI.vue | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/components/MapPOI.vue b/src/components/MapPOI.vue
index db0156b..3f68187 100644
--- a/src/components/MapPOI.vue
+++ b/src/components/MapPOI.vue
@@ -488,6 +488,10 @@ export default{
                         }
 
                                     This.map.on(['singleclick'],function(event){
+										if(!This.userCanEditPOI)
+										{
+											return;
+										}
                                         let   transFormCord =       transform(event.coordinate, 'EPSG:3857','EPSG:4326');
                                               This.poi.longitude    =   transFormCord[0];
                                               This.poi.latitude     =   transFormCord[1];
-- 
GitLab