[Commits] r407 - apps/opengeo/geoexplorer/trunk/lib
commits at geoext.org
commits at geoext.org
Fri Apr 17 02:02:57 CEST 2009
Author: tschaub
Date: 2009-04-17 02:02:56 +0200 (Fri, 17 Apr 2009)
New Revision: 407
Modified:
apps/opengeo/geoexplorer/trunk/lib/CapabilitiesGrid.js
Log:
Set layer max extent. Assuming epsg:4326 here. Need to be able to transform to handle in general.
Modified: apps/opengeo/geoexplorer/trunk/lib/CapabilitiesGrid.js
===================================================================
--- apps/opengeo/geoexplorer/trunk/lib/CapabilitiesGrid.js 2009-04-17 00:01:53 UTC (rev 406)
+++ apps/opengeo/geoexplorer/trunk/lib/CapabilitiesGrid.js 2009-04-17 00:02:56 UTC (rev 407)
@@ -95,9 +95,19 @@
//adding group layers)
var records = sm.getSelections();
+ var record, layer;
for(var i = 0; i < records.length; i++){
- var record = records[i];
- this.mapPanel.layers.add([record.copy()]);
+ record = records[i].copy();
+ /*
+ * TODO: deal with srs and maxExtent
+ * At this point, we need to think about SRS if we want the layer to
+ * have a maxExtent. For our app, we are dealing with EPSG:4326
+ * only. This will have to be made more generic for apps that use
+ * other srs.
+ */
+ layer = record.get("layer");
+ layer.maxExtent = OpenLayers.Bounds.fromArray(record.get("llbbox"));
+ this.mapPanel.layers.add(record);
}
}
More information about the Commits
mailing list