GeoNode/geonode — pull request #1669 by state-hiu (2014-08-26 04:24:40+00:00)
Title: GeoExt Preview Map // Fix 1

This PR fixes an issue with the GeoExt Preview map initialization on layer detail pages. With some model changes on layers, the following code block no longer worked because maxExtent was replaced with bbox. MaxExtent is in latlon instead of web mercator.

```
map.zoomToExtent(map.layers.slice(-1)[0].maxExtent);
```
Also, this PR retrieves bbox from app.map instead of app.mapPanel.map b/c map.layers is not loaded yet. The preview map does not seem to be zooming in as far as it should. The zoom fix may require more complex refractoring of the preview map initialization step to solve.