diff app/view/panel/Map.js @ 1379:e95ac7584c2c

Only displaying own messpunkte in ortszuordnung after creation of new messpunkt
author Maximilian Krambach <mkrambach@intevation.de>
date Tue, 14 Feb 2017 14:30:15 +0100
parents 9cac9eb1365f
children
line wrap: on
line diff
--- a/app/view/panel/Map.js	Tue Feb 14 11:06:05 2017 +0100
+++ b/app/view/panel/Map.js	Tue Feb 14 14:30:15 2017 +0100
@@ -205,7 +205,9 @@
         }
         this.featureLayer.removeAllFeatures();
         this.featureLayer.addFeatures(locationFeatures);
-        if (this.selectedFeatureLayer && this.selectedFeatureLayer.features){
+        if (this.selectedFeatureLayer
+            && this.selectedFeatureLayer.features
+            && this.selectedFeatureLayer.features.length > 0){
             var oldSelection = this.selectedFeatureLayer.features[0].data.id;
             var feature = this.featureLayer.getFeaturesByAttribute('id', oldSelection)[0];
             this.selectControl.unselectAll();

http://lada.wald.intevation.org