[fusion-commits] r2918 - sandbox/adsk/3.0m/layers/MapGuide

svn_fusion at osgeo.org svn_fusion at osgeo.org
Thu Oct 15 00:56:05 PDT 2015


Author: liuar
Date: 2015-10-15 00:56:05 -0700 (Thu, 15 Oct 2015)
New Revision: 2918

Modified:
   sandbox/adsk/3.0m/layers/MapGuide/MapGuide.js
Log:
#634, http://trac.osgeo.org/fusion/ticket/634
It is because Fusion.Lib.MGRequest.MGQueryMapFeatures2 has a parameter 'selText', which is too long when selecting multiple features. We have to use 'post' in this case. 

Modified: sandbox/adsk/3.0m/layers/MapGuide/MapGuide.js
===================================================================
--- sandbox/adsk/3.0m/layers/MapGuide/MapGuide.js	2015-06-14 14:08:48 UTC (rev 2917)
+++ sandbox/adsk/3.0m/layers/MapGuide/MapGuide.js	2015-10-15 07:56:05 UTC (rev 2918)
@@ -1276,7 +1276,14 @@
                                                                  this.selectionColor,
                                                                  this.selectionImageFormat);
             var callback = OpenLayers.Function.bind(this.onNativeSelectionUpdate, this, zoomTo, returnAttributes);
+            // use 'post' when the length is too long that exceeds the URL length limit
+            var method = Fusion.oBroker.method;
+            if (selText.length > 2000) {
+                Fusion.oBroker.method = 'post';
+                r.options.contentType = 'application/x-www-form-urlencoded';
+            }
             Fusion.oBroker.dispatchRequest(r, callback);
+            Fusion.oBroker.method = method;
         } else {
             var sl = Fusion.getScriptLanguage();
             var updateSelectionScript = 'layers/' + this.arch + '/' + sl  + '/SaveSelection.' + sl;



More information about the fusion-commits mailing list