[fusion-commits] r2128 - in branches/fusion-2.0: layers/MapGuide
widgets
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Thu Apr 1 11:32:40 EDT 2010
Author: madair
Date: 2010-04-01 11:32:39 -0400 (Thu, 01 Apr 2010)
New Revision: 2128
Modified:
branches/fusion-2.0/layers/MapGuide/MapGuide.js
branches/fusion-2.0/widgets/Legend.js
Log:
re #376: patch applied to 2.0 branch
Modified: branches/fusion-2.0/layers/MapGuide/MapGuide.js
===================================================================
--- branches/fusion-2.0/layers/MapGuide/MapGuide.js 2010-04-01 15:12:15 UTC (rev 2127)
+++ branches/fusion-2.0/layers/MapGuide/MapGuide.js 2010-04-01 15:32:39 UTC (rev 2128)
@@ -44,6 +44,7 @@
selectionAsOverlay: true,
useAsyncOverlay: false,
defaultFormat: 'PNG',
+ oLayerOL2: false, //a layer object for tiled maps that also contains dynamic layers
initialize: function(map, mapTag, isMapWidgetLayer) {
// console.log('MapGuide.initialize');
@@ -1021,7 +1022,7 @@
this.processGroupEvents(group, true);
if (group.groupName == 'layerRoot') {
this.oLayerOL.setVisibility(true);
- this.oLayerOL2.setVisibility(true);
+ if (this.oLayerOL2) this.oLayerOL2.setVisibility(true);
} else if (group.isBaseMapGroup) {
this.oLayerOL.setVisibility(true);
} else {
@@ -1035,7 +1036,7 @@
this.processGroupEvents(group, false);
if (group.groupName == 'layerRoot') {
this.oLayerOL.setVisibility(false);
- this.oLayerOL2.setVisibility(false);
+ if (this.oLayerOL2) this.oLayerOL2.setVisibility(false);
} else if (group.isBaseMapGroup) {
this.oLayerOL.setVisibility(false);
} else {
Modified: branches/fusion-2.0/widgets/Legend.js
===================================================================
--- branches/fusion-2.0/widgets/Legend.js 2010-04-01 15:12:15 UTC (rev 2127)
+++ branches/fusion-2.0/widgets/Legend.js 2010-04-01 15:32:39 UTC (rev 2128)
@@ -709,11 +709,17 @@
var opt = {};
opt.statusIsDefault = layer.statusDefault;
+ //set the label
+ if (style && style.legendLabel) {
+ opt.label = style.legendLabel == '' ? ' ' : style.legendLabel;
+ } else {
+ opt.label = layer.legendLabel == '' ? ' ' : layer.legendLabel;
+ }
+
+ //set the checkbox rendererer
if (bCheckBox ) {
- opt.label = layer.legendLabel == '' ? ' ' : layer.legendLabel;
opt.draw = this.renderItemCheckBox;
} else {
- opt.label = style.legendLabel == '' ? ' ' : style.legendLabel;
opt.draw = this.renderItem;
}
More information about the fusion-commits
mailing list