[fusion-commits] r2903 - in branches/fusion-mg26: . layers/MapGuide lib

svn_fusion at osgeo.org svn_fusion at osgeo.org
Sun Apr 26 09:10:02 PDT 2015


Author: jng
Date: 2015-04-26 09:10:02 -0700 (Sun, 26 Apr 2015)
New Revision: 2903

Modified:
   branches/fusion-mg26/
   branches/fusion-mg26/layers/MapGuide/MapGuide.js
   branches/fusion-mg26/lib/Map.js
Log:
Merged revision(s) 2893-2897 from trunk:
#610: The zoom level is not correct with Google and Bing base maps.
It is because all the maps are using same resolutions, but the resolutions of Google and Bing map are different. We need to set the map resolutions according to the map itself.
........
#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.
........



Property changes on: branches/fusion-mg26
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/fusion-mg24:2560
/sandbox/createruntimemap:2699-2708
/sandbox/jxlib-3.0:1957-2248
/sandbox/ol213:2801-2803
/sandbox/robust_error_handling:2818-2825
/trunk:2847,2850,2857,2859,2862-2863,2872,2877,2880,2882,2884
   + /branches/fusion-mg24:2560
/sandbox/createruntimemap:2699-2708
/sandbox/jxlib-3.0:1957-2248
/sandbox/ol213:2801-2803
/sandbox/robust_error_handling:2818-2825
/trunk:2847,2850,2857,2859,2862-2863,2872,2877,2880,2882,2884,2893-2897,2899

Modified: branches/fusion-mg26/layers/MapGuide/MapGuide.js
===================================================================
--- branches/fusion-mg26/layers/MapGuide/MapGuide.js	2015-04-24 04:38:37 UTC (rev 2902)
+++ branches/fusion-mg26/layers/MapGuide/MapGuide.js	2015-04-26 16:10:02 UTC (rev 2903)
@@ -66,6 +66,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');
@@ -77,7 +78,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;
@@ -631,13 +632,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
@@ -1422,7 +1422,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);
     },

Modified: branches/fusion-mg26/lib/Map.js
===================================================================
--- branches/fusion-mg26/lib/Map.js	2015-04-24 04:38:37 UTC (rev 2902)
+++ branches/fusion-mg26/lib/Map.js	2015-04-26 16:10:02 UTC (rev 2903)
@@ -602,6 +602,8 @@
                 if (this.aMaps[i].arch == 'Generic') {
                     var oLayer = this.aMaps[i].oLayerOL;
                     oLayer.serverResolutions = oLayer.resolutions;
+                    // We need to set new resolutions to null because the resolutions of each Map may be not same e.g. Google and Bing map.
+                    newResolutions = null;
                     if (newResolutions == null) {
                         newResolutions = [];
                         for (var j = 0; j < oLayer.serverResolutions.length; j++) {



More information about the fusion-commits mailing list