Merge pull request #702 from ahocevar/smart-queue
New tile image cache and tile queue improvements. r=@bartvde,@elemoine
This commit is contained in:
@@ -370,6 +370,14 @@ OpenLayers.Map = OpenLayers.Class({
|
||||
* property at the time the control is added to the map.
|
||||
*/
|
||||
displayProjection: null,
|
||||
|
||||
/**
|
||||
* APIProperty: tileManager
|
||||
* {<OpenLayers.TileManager>} If configured at construction time, the map
|
||||
* will use the TileManager to queue image requests and to cache tile image
|
||||
* elements.
|
||||
*/
|
||||
tileManager: null,
|
||||
|
||||
/**
|
||||
* APIProperty: fallThrough
|
||||
@@ -579,6 +587,10 @@ OpenLayers.Map = OpenLayers.Class({
|
||||
this, this.viewPortDiv, null, this.fallThrough,
|
||||
{includeXY: true}
|
||||
);
|
||||
|
||||
if (this.tileManager) {
|
||||
this.tileManager.addMap(this);
|
||||
}
|
||||
|
||||
// the layerContainerDiv is the one that holds all the layers
|
||||
id = this.id + "_OpenLayers_Container";
|
||||
@@ -778,6 +790,11 @@ OpenLayers.Map = OpenLayers.Class({
|
||||
this.viewPortDiv.parentNode.removeChild(this.viewPortDiv);
|
||||
}
|
||||
this.viewPortDiv = null;
|
||||
|
||||
if (this.tileManager) {
|
||||
this.tileManager.removeMap(this);
|
||||
this.tileManager = null;
|
||||
}
|
||||
|
||||
if(this.eventListeners) {
|
||||
this.events.un(this.eventListeners);
|
||||
|
||||
Reference in New Issue
Block a user