New tile image cache and tile queue improvements
We now reuse tile images by maintaining a cache of image elements with a simplified LRU expiry policy (by order, not by timestamp). The tile queue is bypassed for images that are available in the cache, so they can be rendered immediately. And the tile queue itself loads more than just one image at a time now (2 per layer url).
This commit is contained in:
@@ -201,13 +201,13 @@ OpenLayers.Layer.Bing = OpenLayers.Class(OpenLayers.Layer.XYZ, {
|
||||
},
|
||||
|
||||
/**
|
||||
* Method: drawTileFromQueue
|
||||
* Draws the first tile from the tileQueue, and unqueues that tile
|
||||
* Method: drawTilesFromQueue
|
||||
* Draws tiles from the tileQueue, and unqueues the tiles
|
||||
*/
|
||||
drawTileFromQueue: function() {
|
||||
drawTilesFromQueue: function() {
|
||||
// don't start working on the queue before we have a url from initLayer
|
||||
if (this.url) {
|
||||
OpenLayers.Layer.XYZ.prototype.drawTileFromQueue.apply(this, arguments);
|
||||
OpenLayers.Layer.XYZ.prototype.drawTilesFromQueue.apply(this, arguments);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user