[fusion-commits] r1890 - trunk/widgets
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Mon Aug 10 13:58:54 EDT 2009
Author: zjames
Date: 2009-08-10 13:58:54 -0400 (Mon, 10 Aug 2009)
New Revision: 1890
Modified:
trunk/widgets/MapMenu.js
Log:
re 228: fix handling of mapgroups
Modified: trunk/widgets/MapMenu.js
===================================================================
--- trunk/widgets/MapMenu.js 2009-07-31 16:23:46 UTC (rev 1889)
+++ trunk/widgets/MapMenu.js 2009-08-10 17:58:54 UTC (rev 1890)
@@ -52,17 +52,19 @@
var mapGroups = Fusion.applicationDefinition.mapGroups;
this.mapGroupData = {};
- for (var i=0; i<mapGroups.length; i++) {
- var mapGroup = mapGroups[i];
- if (json.Folder) {
- this.mapGroupData[mapGroup.maps[0].resourceId] = mapGroup;
- } else {
- var data = mapGroup;
- var menuItem = new Jx.Menu.Item({
- label: mapGroup.mapId,
- onClick: OpenLayers.Function.bind(this.switchMap, this, data)
- });
- this.uiObj.add(menuItem);
+ for (var key in mapGroups) {
+ if (mapGroups[key].mapId) {
+ var mapGroup = mapGroups[key];
+ if (json.Folder) {
+ this.mapGroupData[mapGroup.maps[0].resourceId] = mapGroup;
+ } else {
+ var data = mapGroup;
+ var menuItem = new Jx.Menu.Item({
+ label: mapGroup.mapId,
+ onClick: OpenLayers.Function.bind(this.switchMap, this, data)
+ });
+ this.uiObj.add(menuItem);
+ }
}
}
More information about the fusion-commits
mailing list