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 )