Merge pull request #998 from bartvde/tilemgrdefault

enable TileManager by default as suggested by @marcjansen and @bartvde ... (r=@ahocevar)
This commit is contained in:
Bart van den Eijnden
2013-06-06 05:17:19 -07:00
parent 4d52d4aeb5
commit 1c21d9cc15
18 changed files with 51 additions and 34 deletions

View File

@@ -10,6 +10,7 @@
* @requires OpenLayers/Events.js
* @requires OpenLayers/Tween.js
* @requires OpenLayers/Projection.js
* @requires OpenLayers/TileManager.js
*/
/**
@@ -372,15 +373,15 @@ 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. Note: make sure that OpenLayers/TileManager.js is included in
* your build profile.
* {<OpenLayers.TileManager>|Object} By default the map will use the TileManager
* to queue image requests and to cache tile image elements. To create a
* map without a TileManager configure the map with tileManager: null.
* To create a TileManager with non-default options, supply the options
* instead or alternatively supply an instance of {<OpenLayers.TileManager>}.
*/
tileManager: null,
/**
* APIProperty: fallThrough
@@ -613,7 +614,10 @@ OpenLayers.Map = OpenLayers.Class({
{includeXY: true}
);
if (this.tileManager) {
if (this.tileManager !== null) {
if (!(this.tileManager instanceof OpenLayers.TileManager)) {
this.tileManager = new OpenLayers.TileManager(this.tileManager);
}
this.tileManager.addMap(this);
}