[fusion-commits] r2920 - trunk/layers/MapGuide
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Wed Jan 6 00:25:12 PST 2016
Author: liuar
Date: 2016-01-06 00:25:12 -0800 (Wed, 06 Jan 2016)
New Revision: 2920
Modified:
trunk/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: trunk/layers/MapGuide/MapGuide.js
===================================================================
--- trunk/layers/MapGuide/MapGuide.js 2015-12-08 10:15:10 UTC (rev 2919)
+++ trunk/layers/MapGuide/MapGuide.js 2016-01-06 08:25:12 UTC (rev 2920)
@@ -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