comparison 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
comparison
equal deleted inserted replaced
1126:f1d234a7adc7 1130:e4952906634d
84 this.addLocations(this.locationStore); 84 this.addLocations(this.locationStore);
85 } 85 }
86 }, 86 },
87 87
88 selectFeature: function(model, record) { 88 selectFeature: function(model, record) {
89 if (!record.get('id') || record.get('id') === '') {
90 return;
91 }
89 var feature = this.featureLayer.getFeaturesByAttribute('id', record.get('id')); 92 var feature = this.featureLayer.getFeaturesByAttribute('id', record.get('id'));
90 this.map.setCenter( 93 this.map.setCenter(
91 new OpenLayers.LonLat(feature[0].geometry.x, feature[0].geometry.y)); 94 new OpenLayers.LonLat(feature[0].geometry.x, feature[0].geometry.y));
92 this.map.zoomToScale(this.mapOptions.scales[5]); 95 this.map.zoomToScale(this.mapOptions.scales[5]);
93 this.selectControl.unselectAll(); 96 this.selectControl.unselectAll();
107 110
108 featureAdded: function(features) { 111 featureAdded: function(features) {
109 this.locationRecord.set('latitude', features.feature.geometry.y); 112 this.locationRecord.set('latitude', features.feature.geometry.y);
110 this.locationRecord.set('longitude', features.feature.geometry.x); 113 this.locationRecord.set('longitude', features.feature.geometry.x);
111 this.drawPoint.deactivate(); 114 this.drawPoint.deactivate();
112 this.selectControl.unselectAll(); 115 this.fireEvent('featureadded', this.locationRecord);
113 this.selectControl.select(features.feature); 116 // this.selectControl.unselectAll();
117 // this.selectControl.select(features.feature);
114 }, 118 },
115 119
116 addLocations: function(locationStore) { 120 addLocations: function(locationStore) {
117 var me = this; 121 var me = this;
118 locationFeatures = []; 122 locationFeatures = [];

http://lada.wald.intevation.org