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
This commit is contained in:
@@ -85,10 +85,12 @@ OpenLayers.Layer.UntiledWMS.prototype =
|
|||||||
return new OpenLayers.Tile.Image(this, position, bounds,
|
return new OpenLayers.Tile.Image(this, position, bounds,
|
||||||
url, this.map.getSize());
|
url, this.map.getSize());
|
||||||
},
|
},
|
||||||
moveTo:function(bounds,zoomChanged) {
|
moveTo:function(bounds,zoomChanged, minor) {
|
||||||
this.div.innerHTML = "";
|
if (!minor) {
|
||||||
tile = this.addTile(bounds, new OpenLayers.Pixel(-parseInt(this.map.layerContainerDiv.style.left), -parseInt(this.map.layerContainerDiv.style.top)));
|
this.div.innerHTML = "";
|
||||||
tile.draw();
|
tile = this.addTile(bounds, new OpenLayers.Pixel(-parseInt(this.map.layerContainerDiv.style.left), -parseInt(this.map.layerContainerDiv.style.top)));
|
||||||
|
tile.draw();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
/** @final @type String */
|
/** @final @type String */
|
||||||
CLASS_NAME: "OpenLayers.Layer.UntiledWMS"
|
CLASS_NAME: "OpenLayers.Layer.UntiledWMS"
|
||||||
|
|||||||
@@ -475,7 +475,7 @@ OpenLayers.Map.prototype = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!minor) this.events.triggerEvent("movestart");
|
if (!minor) this.events.triggerEvent("movestart");
|
||||||
this.moveToNewExtent(zoomChanged);
|
this.moveToNewExtent(zoomChanged, minor);
|
||||||
if (!minor) this.events.triggerEvent("moveend");
|
if (!minor) this.events.triggerEvent("moveend");
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -483,7 +483,7 @@ OpenLayers.Map.prototype = {
|
|||||||
* ZOOM TO BOUNDS FUNCTION
|
* ZOOM TO BOUNDS FUNCTION
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
moveToNewExtent: function (zoomChanged) {
|
moveToNewExtent: function (zoomChanged, minor) {
|
||||||
if (zoomChanged != null) { // reset the layerContainerDiv's location
|
if (zoomChanged != null) { // reset the layerContainerDiv's location
|
||||||
this.layerContainerDiv.style.left = "0px";
|
this.layerContainerDiv.style.left = "0px";
|
||||||
this.layerContainerDiv.style.top = "0px";
|
this.layerContainerDiv.style.top = "0px";
|
||||||
@@ -496,7 +496,7 @@ OpenLayers.Map.prototype = {
|
|||||||
}
|
}
|
||||||
var bounds = this.getExtent();
|
var bounds = this.getExtent();
|
||||||
for (var i = 0; i < this.layers.length; i++) {
|
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");
|
this.events.triggerEvent("move");
|
||||||
if (zoomChanged != null)
|
if (zoomChanged != null)
|
||||||
|
|||||||
Reference in New Issue
Block a user