[fusion-commits] r2900 - in branches/fusion-mg30: . layers/MapGuide

svn_fusion at osgeo.org svn_fusion at osgeo.org
Tue Apr 21 05:30:59 PDT 2015


Author: jng
Date: 2015-04-21 05:30:59 -0700 (Tue, 21 Apr 2015)
New Revision: 2900

Modified:
   branches/fusion-mg30/
   branches/fusion-mg30/layers/MapGuide/MapGuide.js
Log:
Merged revision(s) 2896-2899 from trunk:
#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.
........
#632: Fix an error.
........
#566: Allow buffer/redline and other widgets that introduce temporary layers to work against fully tiled maps
........



Property changes on: branches/fusion-mg30
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/fusion-mg24:2560
/branches/fusion-mg26:2855,2869
/sandbox/createruntimemap:2699-2708
/sandbox/jxlib-3.0:1957-2248
/sandbox/ol213:2801-2803
/sandbox/robust_error_handling:2818-2825
/sandbox/stamen:2873-2875
/sandbox/tiling:2845-2846
   + /branches/fusion-mg24:2560
/branches/fusion-mg26:2855,2869
/sandbox/createruntimemap:2699-2708
/sandbox/jxlib-3.0:1957-2248
/sandbox/ol213:2801-2803
/sandbox/robust_error_handling:2818-2825
/sandbox/stamen:2873-2875
/sandbox/tiling:2845-2846
/trunk:2896-2899

Modified: branches/fusion-mg30/layers/MapGuide/MapGuide.js
===================================================================
--- branches/fusion-mg30/layers/MapGuide/MapGuide.js	2015-04-21 12:28:08 UTC (rev 2899)
+++ branches/fusion-mg30/layers/MapGuide/MapGuide.js	2015-04-21 12:30:59 UTC (rev 2900)
@@ -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;
@@ -638,13 +639,12 @@
                 }                               
             }
             
-            //if we have a tiled map that also contains dynamic layers, we need to create
-            //an additional overlay layer to render them on top of the tiles
-            if(!this.bSingleTile && o.hasDynamicLayers) {
-                this.oLayerOL2 = this.createOLLayer(this._sMapname + "_DynamicOverlay",true,2,true, "");
-                this.mapWidget.oMapOL.addLayer(this.oLayerOL2);
-                this.oLayerOL2.setVisibility(true);
-            }
+            // Whether this tiled map has untiled layers or not, create a dynamic overlay anyways
+            // so that buffer, redline and other tools whose changes will only be visible in a dynamic
+            // overlay will be visible
+            this.oLayerOL2 = this.createOLLayer(this._sMapname + "_DynamicOverlay",true,2,true, "");
+            this.mapWidget.oMapOL.addLayer(this.oLayerOL2);
+            this.oLayerOL2.setVisibility(true);
         }
         
         //Fix Defect: the Base Layer Group should be invisible when the "initially visiable in map" is set to false
@@ -1446,7 +1446,7 @@
         if (this.previousAttributes) {
             resp.extents = this.previousAttributes.extents;
         }
-        r.responseText = JSON.stringify(resp);
+        r.responseText = this.jsonParser.write(resp);
         this.renderSelection(zoomTo, r);
         this.processSelectedFeaturePropertiesNode(this.previousAttributes);
     },



More information about the fusion-commits mailing list