New TileManager
This removes all tile queueing/loading specific code from Layer.Grid and creates a new class that manages tile loading and caching.
This commit is contained in:
@@ -197,20 +197,12 @@ OpenLayers.Layer.Bing = OpenLayers.Class(OpenLayers.Layer.XYZ, {
|
||||
res.zoomMax + 1 - res.zoomMin, this.numZoomLevels
|
||||
)
|
||||
}, true);
|
||||
if (!this.isBaseLayer) {
|
||||
this.redraw();
|
||||
}
|
||||
this.updateAttribution();
|
||||
},
|
||||
|
||||
/**
|
||||
* Method: drawTilesFromQueue
|
||||
* Draws tiles from the tileQueue, and unqueues the tiles
|
||||
*/
|
||||
drawTilesFromQueue: function() {
|
||||
// don't start working on the queue before we have a url from initLayer
|
||||
if (this.url) {
|
||||
OpenLayers.Layer.XYZ.prototype.drawTilesFromQueue.apply(this, arguments);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* Method: getURL
|
||||
*
|
||||
@@ -218,6 +210,9 @@ OpenLayers.Layer.Bing = OpenLayers.Class(OpenLayers.Layer.XYZ, {
|
||||
* bounds - {<OpenLayers.Bounds>}
|
||||
*/
|
||||
getURL: function(bounds) {
|
||||
if (!this.url) {
|
||||
return;
|
||||
}
|
||||
var xyz = this.getXYZ(bounds), x = xyz.x, y = xyz.y, z = xyz.z;
|
||||
var quadDigits = [];
|
||||
for (var i = z; i > 0; --i) {
|
||||
|
||||
Reference in New Issue
Block a user