diff app/view/panel/Map.js @ 1130:e4952906634d

Implemented insert, edit and delete for stammdaten.ort.
author Raimund Renkert <raimund.renkert@intevation.de>
date Wed, 25 May 2016 14:04:51 +0200
parents 65ea1c2a8c98
children 26197c2d9362
line wrap: on
line diff
--- a/app/view/panel/Map.js	Tue May 24 10:41:07 2016 +0200
+++ b/app/view/panel/Map.js	Wed May 25 14:04:51 2016 +0200
@@ -86,6 +86,9 @@
     },
 
     selectFeature: function(model, record) {
+        if (!record.get('id') || record.get('id') === '') {
+            return;
+        }
         var feature = this.featureLayer.getFeaturesByAttribute('id', record.get('id'));
         this.map.setCenter(
             new OpenLayers.LonLat(feature[0].geometry.x, feature[0].geometry.y));
@@ -109,8 +112,9 @@
         this.locationRecord.set('latitude', features.feature.geometry.y);
         this.locationRecord.set('longitude', features.feature.geometry.x);
         this.drawPoint.deactivate();
-        this.selectControl.unselectAll();
-        this.selectControl.select(features.feature);
+        this.fireEvent('featureadded', this.locationRecord);
+    //    this.selectControl.unselectAll();
+    //    this.selectControl.select(features.feature);
     },
 
     addLocations: function(locationStore) {

http://lada.wald.intevation.org