[fusion-commits] r2702 - sandbox/createruntimemap/layers/MapGuide
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Wed May 15 13:18:29 PDT 2013
Author: jng
Date: 2013-05-15 13:18:26 -0700 (Wed, 15 May 2013)
New Revision: 2702
Modified:
sandbox/createruntimemap/layers/MapGuide/MapGuide.js
Log:
LegendLabel elements can be null. Handle such cases gracefully
Modified: sandbox/createruntimemap/layers/MapGuide/MapGuide.js
===================================================================
--- sandbox/createruntimemap/layers/MapGuide/MapGuide.js 2013-05-15 10:47:18 UTC (rev 2701)
+++ sandbox/createruntimemap/layers/MapGuide/MapGuide.js 2013-05-15 20:18:26 UTC (rev 2702)
@@ -298,7 +298,7 @@
var grp = rt.Group[i];
var cg = {
groupName: grp.Name[0],
- legendLabel: grp.LegendLabel[0],
+ legendLabel: (grp.LegendLabel ? grp.LegendLabel[0] : ""),
uniqueId: grp.ObjectId[0],
displayInLegend: (grp.DisplayInLegend[0] == "true"),
expandInLegend: (grp.ExpandInLegend[0] == "true"),
@@ -332,7 +332,7 @@
actuallyVisible: (lyr.ActuallyVisible[0] == "true"),
editable: false,
isBaseMapLayer: (lyr.Type[0] == "2"),
- legendLabel: lyr.LegendLabel[0],
+ legendLabel: (lyr.LegendLabel ? lyr.LegendLabel[0] : ""),
displayInLegend: (lyr.DisplayInLegend[0] == "true"),
expandInLegend: (lyr.ExpandInLegend[0] == "true")
};
More information about the fusion-commits
mailing list