[fusion-commits] r2995 - in trunk: . layers/MapGuide lib/OpenLayers

svn_fusion at osgeo.org svn_fusion at osgeo.org
Mon Jun 19 05:51:51 PDT 2017


Author: jng
Date: 2017-06-19 05:51:51 -0700 (Mon, 19 Jun 2017)
New Revision: 2995

Modified:
   trunk/
   trunk/layers/MapGuide/MapGuide.js
   trunk/lib/OpenLayers/OpenLayers.js
Log:
Merged revision(s) 2978-2984 from sandbox/adsk/3.2o:
Set projection and units for additional overlay layer.
........
Bing map zoom 0 doesn't work. Set zoom = 1 when the calculated zoom is 0.
........



Property changes on: trunk
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/fusion-mg24:2560
/branches/fusion-mg26:2855,2869
/sandbox/adsk/2.6l:2911
/sandbox/adsk/3.1n:2925-2927
/sandbox/adsk/3.2o:2969-2972,2974
/sandbox/createruntimemap:2699-2708
/sandbox/jxlib-3.0:1957-2248
/sandbox/mgrfc158:2980-2991
/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/adsk/2.6l:2911
/sandbox/adsk/3.1n:2925-2927
/sandbox/adsk/3.2o:2969-2972,2974,2978-2984
/sandbox/createruntimemap:2699-2708
/sandbox/jxlib-3.0:1957-2248
/sandbox/mgrfc158:2980-2991
/sandbox/ol213:2801-2803
/sandbox/robust_error_handling:2818-2825
/sandbox/stamen:2873-2875
/sandbox/tiling:2845-2846

Modified: trunk/layers/MapGuide/MapGuide.js
===================================================================
--- trunk/layers/MapGuide/MapGuide.js	2017-06-19 12:47:33 UTC (rev 2994)
+++ trunk/layers/MapGuide/MapGuide.js	2017-06-19 12:51:51 UTC (rev 2995)
@@ -813,6 +813,10 @@
             //an additional overlay layer to render them on top of the tiles
             if(!this.bSingleTile) {
                 this.oLayerOL2 = this.createOLLayer(this._sMapname + "_DynamicOverlay",true,2,true, "");
+                if (wktProj && wktProj.proj && wktProj.proj.readyToUse) {
+                  this.oLayerOL2.projection = wktProj;
+                  this.oLayerOL2.projection.proj.units = this.mapTag.layerOptions.units;
+                }
                 this.mapWidget.oMapOL.addLayer(this.oLayerOL2);
                 this.oLayerOL2.setVisibility(true);
             }

Modified: trunk/lib/OpenLayers/OpenLayers.js
===================================================================
--- trunk/lib/OpenLayers/OpenLayers.js	2017-06-19 12:47:33 UTC (rev 2994)
+++ trunk/lib/OpenLayers/OpenLayers.js	2017-06-19 12:51:51 UTC (rev 2995)
@@ -10826,7 +10826,9 @@
                     }
                 }
             }
-            zoom = Math.max(0, i-1);
+            zoom = Math.max(0, i-1);
+            if (zoom == 0 && this.CLASS_NAME.indexOf('OpenLayers.Layer.Bing') > -1)
+                zoom = 1;
         }
         return zoom;
     },
@@ -42704,19 +42706,12 @@
                     });
 
           } else {
-            var zoomOffset = 1;
-            if (this.map.baseLayer != null && this.map.baseLayer.CLASS_NAME.indexOf('OpenLayers.Layer.Bing') > -1) {
-                zoomOffset = 2;
-            }
-            var scaleIndex = this.resolutions.length - this.map.zoom - zoomOffset;
-            if (scaleIndex < 0)
-                scaleIndex = 0;
-            url = this.getFullRequestString(
-              {
-                tilecol: colidx,
-                tilerow: rowidx,
-                scaleindex: scaleIndex
-              });
+            url = this.getFullRequestString(
+                   {
+                       tilecol: colidx,
+                       tilerow: rowidx,
+                       scaleindex: this.resolutions.length - this.map.zoom - 1
+                    });
           }
        }
        return url;



More information about the fusion-commits mailing list