[Commits] r312 - apps/opengeo/geoexplorer/trunk/lib
commits at geoext.org
commits at geoext.org
Wed Apr 1 19:08:15 CEST 2009
Author: sbenthall
Date: 2009-04-01 19:08:15 +0200 (Wed, 01 Apr 2009)
New Revision: 312
Modified:
apps/opengeo/geoexplorer/trunk/lib/CapabilitiesGrid.js
Log:
can now add multiple layers at a time. "Add from URL" button changed to "Add
Layers". I have misgivings about the location of the button.
Modified: apps/opengeo/geoexplorer/trunk/lib/CapabilitiesGrid.js
===================================================================
--- apps/opengeo/geoexplorer/trunk/lib/CapabilitiesGrid.js 2009-04-01 17:05:55 UTC (rev 311)
+++ apps/opengeo/geoexplorer/trunk/lib/CapabilitiesGrid.js 2009-04-01 17:08:15 UTC (rev 312)
@@ -66,7 +66,7 @@
this.plugins = expander;
this.tbar = ["->", new Ext.Button({
- text: "Add from URL",
+ text: "Add Layers",
handler: this.addLayer,
scope : this
})];
@@ -94,10 +94,13 @@
//for now just use the first selected record
//TODO: force single selection (until we allow
//adding group layers)
- var record = sm.getSelected();
+ var records = sm.getSelections();
+
+ for(var i = 0; i < records.length; i++){
+ var record = records[i];
+ this.mapPanel.layers.add([record.copy()]);
+ }
- this.mapPanel.layers.add([record.copy()]);
-
}
});
\ No newline at end of file
More information about the Commits
mailing list