[fusion-commits] r1696 - trunk/layers
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Fri Nov 28 14:30:57 EST 2008
Author: pdeschamps
Date: 2008-11-28 14:30:57 -0500 (Fri, 28 Nov 2008)
New Revision: 1696
Modified:
trunk/layers/Layers.js
Log:
patch for layers in mapserver - references bug#186
Modified: trunk/layers/Layers.js
===================================================================
--- trunk/layers/Layers.js 2008-11-28 19:27:58 UTC (rev 1695)
+++ trunk/layers/Layers.js 2008-11-28 19:30:57 UTC (rev 1696)
@@ -434,16 +434,31 @@
this.layerName = o.layerName;
this.uniqueId = o.uniqueId;
this.resourceId = o.resourceId;
- this.selectable = o.selectable=="true"?true:false;
this.selectedFeatureCount = 0;
this.layerTypes = [].concat(o.layerTypes);
- this.visible = o.visible=="true"?true:false;
- this.actuallyVisible = o.actuallyVisible=="true"?true:false;
- this.editable = o.editable=="true"?true:false;
-
this.legendLabel = o.legendLabel;
- this.displayInLegend = o.displayInLegend=="true"?true:false;
- this.expandInLegend = o.expandInLegend=="true"?true:false;
+
+ /* In mapserver - flags are boolean's where as in MapGuide they need to be converted from strings.
+ http://trac.osgeo.org/fusion/ticket/186
+ */
+ if(typeof(o.displayInLegend)=="boolean"){
+ this.displayInLegend = o.displayInLegend;
+ this.expandInLegend = o.expandInLegend;
+ this.actuallyVisible = o.actuallyVisible;
+ this.editable = o.editable;
+ this.visible = o.visible;
+ this.selectable = o.selectable;
+ }
+ else
+ {
+ this.editable = o.editable=="true"?true:false;
+ this.visible = o.visible=="true"?true:false;
+ this.selectable = o.selectable=="true"?true:false;
+ this.displayInLegend = o.displayInLegend=="true"?true:false;
+ this.expandInLegend = o.expandInLegend=="true"?true:false;
+ this.actuallyVisible = o.actuallyVisible=="true"?true:false;
+ }
+
//determine the layer type so that the correct icon can be displayed in the legend
this.layerType = null;
More information about the fusion-commits
mailing list