[fusion-commits] r2984 - sandbox/adsk/3.2o/lib/OpenLayers
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Fri Apr 21 01:08:40 PDT 2017
Author: liuar
Date: 2017-04-21 01:08:40 -0700 (Fri, 21 Apr 2017)
New Revision: 2984
Modified:
sandbox/adsk/3.2o/lib/OpenLayers/OpenLayers.js
Log:
Bing map zoom 0 doesn't work. Set zoom = 1 when the calculated zoom is 0.
Modified: sandbox/adsk/3.2o/lib/OpenLayers/OpenLayers.js
===================================================================
--- sandbox/adsk/3.2o/lib/OpenLayers/OpenLayers.js 2017-04-20 11:19:47 UTC (rev 2983)
+++ sandbox/adsk/3.2o/lib/OpenLayers/OpenLayers.js 2017-04-21 08:08:40 UTC (rev 2984)
@@ -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;
},
@@ -41520,19 +41522,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