Merge pull request #1018 from ahocevar/tilemanager-image-only

UTFGrid examples broken because of TileManager. r=@bartvde
This commit is contained in:
ahocevar
2013-06-25 02:29:58 -07:00
committed by Bart van den Eijnden
parent c8d4105d23
commit d020e8f666
+14 -7
View File
@@ -8,6 +8,8 @@
* @requires OpenLayers/Util.js
* @requires OpenLayers/BaseTypes.js
* @requires OpenLayers/BaseTypes/Element.js
* @requires OpenLayers/Layer/Grid.js
* @requires OpenLayers/Tile/Image.js
*/
/**
@@ -300,13 +302,18 @@ OpenLayers.TileManager = OpenLayers.Class({
* evt - {Object} The listener argument
*/
addTile: function(evt) {
evt.tile.events.on({
beforedraw: this.queueTileDraw,
beforeload: this.manageTileCache,
loadend: this.addToCache,
unload: this.unloadTile,
scope: this
});
if (evt.tile instanceof OpenLayers.Tile.Image) {
evt.tile.events.on({
beforedraw: this.queueTileDraw,
beforeload: this.manageTileCache,
loadend: this.addToCache,
unload: this.unloadTile,
scope: this
});
} else {
// Layer has the wrong tile type, so don't handle it any longer
this.removeLayer({layer: evt.tile.layer});
}
},
/**