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

svn_fusion at osgeo.org svn_fusion at osgeo.org
Sun Mar 29 17:43:53 PDT 2015


Author: liuar
Date: 2015-03-29 17:43:53 -0700 (Sun, 29 Mar 2015)
New Revision: 2895

Modified:
   sandbox/adsk/3.0m/layers/MapGuide/MapGuide.js
Log:
#632: Select feature doesn't work well in IE11.
IE11 doesn't recognize method JSON.stringify. An 'object not supported' exception is thrown when selecting features. Use OpenLayers.Format.JSON.write instead of JSON.stringify to fix the defect.

Modified: sandbox/adsk/3.0m/layers/MapGuide/MapGuide.js
===================================================================
--- sandbox/adsk/3.0m/layers/MapGuide/MapGuide.js	2015-03-23 11:53:52 UTC (rev 2894)
+++ sandbox/adsk/3.0m/layers/MapGuide/MapGuide.js	2015-03-30 00:43:53 UTC (rev 2895)
@@ -68,6 +68,7 @@
       edit: true
     },
     alternateHostNames: null, //a comma-delimited list of alternate host names to use
+    jsonParser: null,
 
     initialize: function(map, mapTag, isMapWidgetLayer) {
         // console.log('MapGuide.initialize');
@@ -79,7 +80,7 @@
           //clear the query param after it has been used once 
           Fusion.queryParams['theme'] = null;
         }
-
+        this.jsonParser = new OpenLayers.Format.JSON();
         this.registerEventID(Fusion.Event.MAP_SESSION_CREATED);
 
         this.mapInfo = mapTag.mapInfo;
@@ -1446,7 +1447,7 @@
         if (this.previousAttributes) {
             resp.extents = this.previousAttributes.extents;
         }
-        r.responseText = JSON.stringify(resp);
+        r.responseText = jsonParser.write(resp);
         this.renderSelection(zoomTo, r);
         this.processSelectedFeaturePropertiesNode(this.previousAttributes);
     },



More information about the fusion-commits mailing list