[Commits] r316 - apps/opengeo/geoexplorer/trunk/lib
commits at geoext.org
commits at geoext.org
Wed Apr 1 21:05:30 CEST 2009
Author: sbenthall
Date: 2009-04-01 21:05:30 +0200 (Wed, 01 Apr 2009)
New Revision: 316
Modified:
apps/opengeo/geoexplorer/trunk/lib/GeoExplorer.js
Log:
more complet extractConfiguration method (maybe a little convoluted)
Modified: apps/opengeo/geoexplorer/trunk/lib/GeoExplorer.js
===================================================================
--- apps/opengeo/geoexplorer/trunk/lib/GeoExplorer.js 2009-04-01 18:37:59 UTC (rev 315)
+++ apps/opengeo/geoexplorer/trunk/lib/GeoExplorer.js 2009-04-01 19:05:30 UTC (rev 316)
@@ -315,6 +315,44 @@
config.ows = this.ows;
+ // Map configuration
+ var mapConfig = {}
+
+ mapConfig.zoom = this.map.zoom;
+
+ var center = this.map.getCenter();
+ this.map.center = [center.lon, center.lat];
+
+ config.map = mapConfig;
+ //End Map configuration
+
+
+
+ //Layers configuration
+ var layerConfig = [];
+
+ this.layers.each(function(layerRecord){
+ var c = {};
+
+ //if it's the dummy layer, do nothing.
+ if(layerRecord.get("layer").isBaseLayer){
+ return;
+ }
+
+ c.name = layerRecord.get("name") || layerRecord.get("layer").params.LAYERS;
+ c.title = layerRecord.get("title");
+ if (c.queryable) {
+ c.queryable = layerRecord.get("queryable");
+ }
+
+ layerConfig.push(c);
+ });
+
+
+ config.map.layers = layerConfig
+ //End Layers configuration
+
+
return config;
}
});
More information about the Commits
mailing list