Merge pull request #998 from bartvde/tilemgrdefault
enable TileManager by default as suggested by @marcjansen and @bartvde ... (r=@ahocevar)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user