Mercurial > lada > lada-client
diff app/view/panel/Map.js @ 1373:94d35d5a7913
update other panels if ortegrid changes
author | Maximilian Krambach <mkrambach@intevation.de> |
---|---|
date | Thu, 09 Feb 2017 11:54:22 +0100 |
parents | 5c2d6812d85a |
children | 9cac9eb1365f |
line wrap: on
line diff
--- a/app/view/panel/Map.js Thu Feb 09 11:19:03 2017 +0100 +++ b/app/view/panel/Map.js Thu Feb 09 11:54:22 2017 +0100 @@ -205,6 +205,16 @@ } this.featureLayer.removeAllFeatures(); this.featureLayer.addFeatures(locationFeatures); + if (this.selectedFeatureLayer && this.selectedFeatureLayer.features){ + var oldSelection = this.selectedFeatureLayer.features[0].data.id; + var feature = this.featureLayer.getFeaturesByAttribute('id', oldSelection)[0]; + this.selectControl.unselectAll(); + this.selectedFeatureLayer.removeAllFeatures(); + this.selectedFeatureLayer.addFeatures(feature.clone()); + this.featureLayer.removeFeatures([feature]); + this.selectedFeatureLayer.refresh({force: true}); + this.featureLayer.refresh({force: true}); + } this.map.addLayer(this.featureLayer); },