[fusion-commits] r2890 - sandbox/adsk/3.0m/lib/OpenLayers
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Wed Mar 4 19:06:03 PST 2015
Author: liuar
Date: 2015-03-04 19:06:03 -0800 (Wed, 04 Mar 2015)
New Revision: 2890
Modified:
sandbox/adsk/3.0m/lib/OpenLayers/OpenLayers.js
Log:
#631: Base maps are shifted with scale < 1000 and have wrong size.
http://trac.osgeo.org/fusion/ticket/631, Submit on behalf of Andy Zhang.
When scale < 1000, the zoom level of base map exceeds its max zoom level. So base map is displayed with its max zoom level, which is different from the zoom level of vector layers.
Now we set the visibility of base map to false when the zoom level of base map is too big.
Modified: sandbox/adsk/3.0m/lib/OpenLayers/OpenLayers.js
===================================================================
--- sandbox/adsk/3.0m/lib/OpenLayers/OpenLayers.js 2015-02-12 06:50:15 UTC (rev 2889)
+++ sandbox/adsk/3.0m/lib/OpenLayers/OpenLayers.js 2015-03-05 03:06:03 UTC (rev 2890)
@@ -8727,8 +8727,11 @@
var bounds = this.getExtent();
- //send the move call to the baselayer and all the overlays
-
+ //send the move call to the baselayer and all the overlays
+ if (zoom >= this.baseLayer.MAX_ZOOM_LEVEL)
+ this.baseLayer.setVisibility(false);
+ else
+ this.baseLayer.setVisibility(true);
if(this.baseLayer.visibility) {
this.baseLayer.moveTo(bounds, zoomChanged, options.dragging);
options.dragging || this.baseLayer.events.triggerEvent(
@@ -9110,6 +9113,10 @@
if (map.baseLayer.wrapDateLine) {
zoom = map.adjustZoom(zoom);
}
+ if (zoom >= map.baseLayer.MAX_ZOOM_LEVEL)
+ map.baseLayer.setVisibility(false);
+ else
+ map.baseLayer.setVisibility(true);
if (map.zoomTween) {
var currentRes = map.getResolution(),
targetRes = map.getResolutionForZoom(zoom),
More information about the fusion-commits
mailing list