Mercurial > lada > lada-client
comparison app/view/panel/Map.js @ 1335:cba4e0b0e336
Fixed ort grid selection.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Fri, 03 Feb 2017 17:02:55 +0100 |
parents | 152fca74a839 |
children | 26e0aec2eb31 |
comparison
equal
deleted
inserted
replaced
1334:2c5d89886885 | 1335:cba4e0b0e336 |
---|---|
95 selectFeature: function(model, record) { | 95 selectFeature: function(model, record) { |
96 if (!record.get('id') || record.get('id') === '') { | 96 if (!record.get('id') || record.get('id') === '') { |
97 return; | 97 return; |
98 } | 98 } |
99 var feature = this.featureLayer.getFeaturesByAttribute('id', record.get('id'))[0]; | 99 var feature = this.featureLayer.getFeaturesByAttribute('id', record.get('id'))[0]; |
100 if (!feature) { | |
101 return; | |
102 } | |
100 this.map.setCenter( | 103 this.map.setCenter( |
101 new OpenLayers.LonLat(feature.geometry.x, feature.geometry.y)); | 104 new OpenLayers.LonLat(feature.geometry.x, feature.geometry.y)); |
102 this.map.zoomTo(12); | 105 this.map.zoomTo(12); |
103 if (this.selectedFeatureLayer) { | 106 if (this.selectedFeatureLayer) { |
104 this.selectControl.unselectAll(); | 107 this.selectControl.unselectAll(); |