geoext / geoext2

GeoExt 2 — JavaScript Toolkit for Rich Web Mapping Applications
http://geoext.github.io/geoext2/
Other
142 stars 106 forks source link

FeatureModel.js recenterToSelectionExtent breaks with nulls #393

Closed geographika closed 7 years ago

geographika commented 7 years ago

The getSelectionExtent in the FeatureModel calculates the max extent which includes all selected features, and returns null if the layer has no features.

This is called by recenterToSelectionExtent which does not check for a returned null value causing Unable to get property 'getWidth' of undefined or null reference errors when calling this.baseLayer.getZoomForExtent(bounds, closest) in OpenLayers.