The OpenLayers server threw a disk, and clobbered another, resulting in a loss

of data up to our last backup. In the previous subversion repository, this was
r1694->r1777. I'm sorry to all those of you who might have checked out that 
code, as this will surely cause problems for you. We're currently working to
figure out what went wrong, and how to prevent it in the future.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@1695 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2006-10-13 20:41:21 +00:00
parent 60ba893119
commit 7c2a8a0cab
38 changed files with 1477 additions and 1279 deletions

View File

@@ -26,7 +26,7 @@ OpenLayers.Tile.Image.prototype =
initialize: function(layer, position, bounds, url, size) {
OpenLayers.Tile.prototype.initialize.apply(this, arguments);
},
/**
*
*/
@@ -47,7 +47,11 @@ OpenLayers.Tile.Image.prototype =
if (this.imgDiv == null) {
this.initImgDiv();
}
if (this.layer != this.layer.map.baseLayer && this.layer.reproject) {
this.bounds = this.getBoundsFromBaseLayer(this.position);
}
this.url = this.layer.getURL(this.bounds);
this.imgDiv.style.display = "none";
if (this.layer.displayOutsideMaxExtent || (this.layer.maxExtent &&
(this.bounds.intersectsBounds(this.layer.maxExtent,false))
@@ -79,6 +83,9 @@ OpenLayers.Tile.Image.prototype =
* @param {Boolean} redraw
*/
moveTo: function (bounds, position, redraw) {
if (this.layer != this.layer.map.baseLayer && this.layer.reproject) {
bounds = this.getBoundsFromBaseLayer(position);
}
this.url = this.layer.getURL(bounds);
OpenLayers.Tile.prototype.moveTo.apply(this, arguments);
},
@@ -107,6 +114,15 @@ OpenLayers.Tile.Image.prototype =
null,
true);
}
this.imgDiv.className = 'olTileImage';
/* checkImgURL *should* pretty predictably get called after the
createImage / createAlphaImageDiv onLoad handler */
OpenLayers.Event.observe( this.imgDiv, "load",
this.checkImgURL.bindAsEventListener(this) );
this.layer.div.appendChild(this.imgDiv);
if(this.layer.opacity != null) {
@@ -116,6 +132,23 @@ OpenLayers.Tile.Image.prototype =
}
},
/**
* Make sure that the image that just loaded is the one this tile is meant
* to display, since panning/zooming might have changed the tile's URL in
* the meantime. If the tile URL did change before the image loaded, set
* the imgDiv display to 'none', as either (a) it will be reset to visible
* when the new URL loads in the image, or (b) we don't want to display
* this tile after all because its new bounds are outside our maxExtent.
*
* @private
*/
checkImgURL: function () {
var loaded = this.layer.alpha ? this.imgDiv.firstChild.src : this.imgDiv.src;
if (loaded != this.url) {
this.imgDiv.style.display = "none";
}
},
/** @final @type String */
CLASS_NAME: "OpenLayers.Tile.Image"
}