call stopObserving before setting img.src to blank image as well

This commit is contained in:
Pierre GIRAUD
2012-09-21 11:32:48 +02:00
parent 9a93e58080
commit 8d8abac32a

View File

@@ -324,6 +324,7 @@ OpenLayers.Tile.Image = OpenLayers.Class(OpenLayers.Tile, {
if (img.getAttribute("src") == this.blankImageUrl) {
load();
} else {
OpenLayers.Event.stopObservingElement(img);
OpenLayers.Event.observe(img, "load", load);
OpenLayers.Event.observe(img, "error", load);
if (this.crossOriginKeyword) {