Pull up r2181:r2229 to 2.3 branch. Includes fixes for:

#429 fix panning for odd size viewport
#478 Double clicking overview map expand/contract button zooms in Safari
#484 conflict between _addButton of MouseToolbar and PanZoom
#485 null pointer exception on CTRL+F5 in IE for WMS.Untiled
#486 add a few sanity checks to overview map
#489 requires tag incorrect in OverviewMap.js   
#498 overviewmap: rectangle has minimum height in IE



git-svn-id: http://svn.openlayers.org/branches/openlayers/2.3@2230 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Schuyler Erle
2007-02-16 19:08:01 +00:00
parent 7232cfa3a0
commit b7bf7d5436
6 changed files with 100 additions and 20 deletions
+20 -3
View File
@@ -30,7 +30,10 @@ OpenLayers.Layer.WMS.Untiled.prototype =
/** @type OpenLayers.Tile.Image */
tile: null,
/** did the image finish loading before a new draw was initiated?
* @type Boolean */
doneLoading: false,
/**
* @constructor
@@ -63,8 +66,10 @@ OpenLayers.Layer.WMS.Untiled.prototype =
*
*/
destroy: function() {
this.tile.destroy();
this.tile = null;
if (this.tile) {
this.tile.destroy();
this.tile = null;
}
OpenLayers.Layer.HTTPRequest.prototype.destroy.apply(this, arguments);
},
@@ -108,6 +113,10 @@ OpenLayers.Layer.WMS.Untiled.prototype =
* @param {Boolean} dragging
*/
moveTo:function(bounds, zoomChanged, dragging) {
if (!this.doneLoading) {
this.events.triggerEvent("loadcancel");
this.doneLoading = true;
}
OpenLayers.Layer.HTTPRequest.prototype.moveTo.apply(this,arguments);
if (bounds == null) {
@@ -155,10 +164,18 @@ OpenLayers.Layer.WMS.Untiled.prototype =
this.tile = null;
}
this.events.triggerEvent("loadstart");
this.doneLoading = false;
if (!this.tile) {
this.tile = new OpenLayers.Tile.Image(this, pos, tileBounds,
url, tileSize);
this.tile.draw();
var onload = function() {
this.doneLoading = true;
this.events.triggerEvent("loadend");
}
OpenLayers.Event.observe(this.tile.imgDiv, 'load',
onload.bindAsEventListener(this));
} else {
this.tile.moveTo(tileBounds, pos);
}