[fusion-commits] r2134 - trunk/layers/MapGuide

svn_fusion at osgeo.org svn_fusion at osgeo.org
Tue Apr 6 22:48:33 EDT 2010


Author: liuar
Date: 2010-04-06 22:48:31 -0400 (Tue, 06 Apr 2010)
New Revision: 2134

Modified:
   trunk/layers/MapGuide/MapGuide.js
Log:
Fixed Ticket #390 Legend: layer's legend icon cannot be loaded if the layer's name contains brackets

Modified: trunk/layers/MapGuide/MapGuide.js
===================================================================
--- trunk/layers/MapGuide/MapGuide.js	2010-04-06 14:04:05 UTC (rev 2133)
+++ trunk/layers/MapGuide/MapGuide.js	2010-04-07 02:48:31 UTC (rev 2134)
@@ -1216,7 +1216,8 @@
             var url = Fusion.getConfigurationItem('mapguide', 'mapAgentUrl');
             url += "?OPERATION=GETLEGENDIMAGE&SESSION=" + layer.oMap.getSessionID();
             url += "&VERSION=1.0.0&SCALE=" + fScale;
-            url += "&LAYERDEFINITION=" + encodeURIComponent(layer.resourceId);
+            op = /\(/g; cp = /\)/g; 
+            url += "&LAYERDEFINITION=" + encodeURIComponent(layer.resourceId).replace(op, "%28").replace(cp, "%29");
             url += "&THEMECATEGORY=" + style.categoryIndex;
             url += "&TYPE=" + style.geometryType;
             url += "&CLIENTAGENT=" + encodeURIComponent(this.clientAgent);



More information about the fusion-commits mailing list