TileManager dependency management
If the build does not contain TileManager.js, do not create a TileManager instance for the map. If the build does not contain Layer/Grid.js, do not try to add Grid layer instances to the list of layers managed by the TileManager.
This commit is contained in:
committed by
Bart van den Eijnden
parent
1c21d9cc15
commit
f4f72d5eeb
@@ -10,7 +10,6 @@
|
||||
* @requires OpenLayers/Events.js
|
||||
* @requires OpenLayers/Tween.js
|
||||
* @requires OpenLayers/Projection.js
|
||||
* @requires OpenLayers/TileManager.js
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -376,11 +375,12 @@ OpenLayers.Map = OpenLayers.Class({
|
||||
|
||||
/**
|
||||
* APIProperty: tileManager
|
||||
* {<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>}.
|
||||
* {<OpenLayers.TileManager>|Object} By default, and if the build contains
|
||||
* TileManager.js, 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>}.
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -615,7 +615,8 @@ OpenLayers.Map = OpenLayers.Class({
|
||||
);
|
||||
|
||||
if (this.tileManager !== null) {
|
||||
if (!(this.tileManager instanceof OpenLayers.TileManager)) {
|
||||
if (OpenLayers.TileManager &&
|
||||
!(this.tileManager instanceof OpenLayers.TileManager)) {
|
||||
this.tileManager = new OpenLayers.TileManager(this.tileManager);
|
||||
}
|
||||
this.tileManager.addMap(this);
|
||||
|
||||
Reference in New Issue
Block a user