From 6a30af647ad379bdbe0264534b2e356debdcede7 Mon Sep 17 00:00:00 2001
From: mpeltriaux <Michel.Peltriaux@sgdnord.rlp.de>
Date: Tue, 13 Sep 2022 13:43:43 +0200
Subject: [PATCH] NEtgis Client Bugfix

* fixes bug where initial geometry has not been rendered on client loading
* needs to be replaced asap by a proper bugfix from the original devs
---
 templates/map/client/libs/netgis/MapOpenLayers.js | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/templates/map/client/libs/netgis/MapOpenLayers.js b/templates/map/client/libs/netgis/MapOpenLayers.js
index b8869a1e..807b057e 100644
--- a/templates/map/client/libs/netgis/MapOpenLayers.js
+++ b/templates/map/client/libs/netgis/MapOpenLayers.js
@@ -394,12 +394,16 @@ netgis.MapOpenLayers.prototype.clearAll = function()
 {
 	for ( var i = 0; i < this.layers.length; i++ )
 	{
+		if(this.layers[i] === this.editLayer){
+			continue;
+		};
 		this.map.removeLayer( this.layers[ i ] );
 	}
 	
-	this.layers = [];
+	this.layers = [this.editLayer];
 	
 	this.snapFeatures.clear();
+	this.snapFeatures.push(this.editLayer);
 };
 
 netgis.MapOpenLayers.prototype.onUpdateStyle = function( e )