From 6b28c78655ea492ad6a55ce2cf30303613e932a9 Mon Sep 17 00:00:00 2001 From: crschmidt Date: Thu, 22 Jun 2006 15:35:33 +0000 Subject: [PATCH] Make the UntiledWMS work better. This changes the API for an internal function (moveToNewExtent), but doesn't break any existing code. git-svn-id: http://svn.openlayers.org/trunk/openlayers@674 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Layer/UntiledWMS.js | 10 ++++++---- lib/OpenLayers/Map.js | 6 +++--- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/lib/OpenLayers/Layer/UntiledWMS.js b/lib/OpenLayers/Layer/UntiledWMS.js index b6431d5808..5a5eebb676 100644 --- a/lib/OpenLayers/Layer/UntiledWMS.js +++ b/lib/OpenLayers/Layer/UntiledWMS.js @@ -85,10 +85,12 @@ OpenLayers.Layer.UntiledWMS.prototype = return new OpenLayers.Tile.Image(this, position, bounds, url, this.map.getSize()); }, - moveTo:function(bounds,zoomChanged) { - this.div.innerHTML = ""; - tile = this.addTile(bounds, new OpenLayers.Pixel(-parseInt(this.map.layerContainerDiv.style.left), -parseInt(this.map.layerContainerDiv.style.top))); - tile.draw(); + moveTo:function(bounds,zoomChanged, minor) { + if (!minor) { + this.div.innerHTML = ""; + tile = this.addTile(bounds, new OpenLayers.Pixel(-parseInt(this.map.layerContainerDiv.style.left), -parseInt(this.map.layerContainerDiv.style.top))); + tile.draw(); + } }, /** @final @type String */ CLASS_NAME: "OpenLayers.Layer.UntiledWMS" diff --git a/lib/OpenLayers/Map.js b/lib/OpenLayers/Map.js index 6c1e45d6bc..bcb3087be6 100644 --- a/lib/OpenLayers/Map.js +++ b/lib/OpenLayers/Map.js @@ -475,7 +475,7 @@ OpenLayers.Map.prototype = { } if (!minor) this.events.triggerEvent("movestart"); - this.moveToNewExtent(zoomChanged); + this.moveToNewExtent(zoomChanged, minor); if (!minor) this.events.triggerEvent("moveend"); }, @@ -483,7 +483,7 @@ OpenLayers.Map.prototype = { * ZOOM TO BOUNDS FUNCTION * @private */ - moveToNewExtent: function (zoomChanged) { + moveToNewExtent: function (zoomChanged, minor) { if (zoomChanged != null) { // reset the layerContainerDiv's location this.layerContainerDiv.style.left = "0px"; this.layerContainerDiv.style.top = "0px"; @@ -496,7 +496,7 @@ OpenLayers.Map.prototype = { } var bounds = this.getExtent(); for (var i = 0; i < this.layers.length; i++) { - this.layers[i].moveTo(bounds, (zoomChanged != null)); + this.layers[i].moveTo(bounds, (zoomChanged != null), minor); } this.events.triggerEvent("move"); if (zoomChanged != null)