[fusion-commits] r2911 - sandbox/adsk/2.6l/widgets

svn_fusion at osgeo.org svn_fusion at osgeo.org
Thu May 28 19:50:18 PDT 2015


Author: liuar
Date: 2015-05-28 19:50:18 -0700 (Thu, 28 May 2015)
New Revision: 2911

Modified:
   sandbox/adsk/2.6l/widgets/Legend.js
Log:
Fix an issue introduced by fix for #631.
The legend of raster layer is disabled after applying hot fix of #631. This issue only happens in AIMS 2015. It is because when creating a legend tree item, it will check if the layer has style in this scale range. If not, the legend will be disabled. But raster layers don't have style in any scale range. So we need to add a check for raster layers.

Modified: sandbox/adsk/2.6l/widgets/Legend.js
===================================================================
--- sandbox/adsk/2.6l/widgets/Legend.js	2015-05-07 13:18:03 UTC (rev 2910)
+++ sandbox/adsk/2.6l/widgets/Legend.js	2015-05-29 02:50:18 UTC (rev 2911)
@@ -825,7 +825,15 @@
                 opt.image = layer.oMap.getLegendImageURL(scale, layer, style);
             }
         }
-
+        // MapGuide DWF and Raster layer
+        // MapGuide Raster and DWF layer
+        if(layer.layerTypes[0] == 4){
+            opt.image = this.imgLayerRasterIcon;
+            opt.enabled = true;
+        } else if(layer.layerTypes[0] == 5){
+            opt.image = this.imgLayerDWFIcon;
+            opt.enabled = true;
+        }
         var item;
         if (!layer.isBaseMapLayer&&checkbox) {
             // opt.contextMenu = this.getContextMenu();



More information about the fusion-commits mailing list