Merge pull request #998 from bartvde/tilemgrdefault
enable TileManager by default as suggested by @marcjansen and @bartvde ... (r=@ahocevar)
This commit is contained in:
@@ -193,6 +193,7 @@
|
||||
// test that events.on is called at map construction
|
||||
var options = {
|
||||
eventListeners: {foo: "bar"},
|
||||
tileManager: null,
|
||||
controls: []
|
||||
};
|
||||
OpenLayers.Events.prototype.on = function(obj) {
|
||||
@@ -207,7 +208,7 @@
|
||||
OpenLayers.Events.prototype.on = function(obj) {
|
||||
t.fail("events.on called without eventListeners");
|
||||
}
|
||||
var map2 = new OpenLayers.Map("map", {controls: []});
|
||||
var map2 = new OpenLayers.Map("map", {tileManager: null, controls: []});
|
||||
OpenLayers.Events.prototype.on = method;
|
||||
map2.destroy();
|
||||
}
|
||||
@@ -2249,6 +2250,20 @@
|
||||
map.destroy();
|
||||
}
|
||||
|
||||
function test_tileManager(t) {
|
||||
t.plan(3);
|
||||
var map = new OpenLayers.Map('map');
|
||||
t.ok(map.tileManager instanceof OpenLayers.TileManager, "Default tileManager created");
|
||||
map.destroy();
|
||||
map = new OpenLayers.Map('map', {tileManager: null});
|
||||
t.ok(map.tileManager === null, "No tileManager created");
|
||||
map.destroy();
|
||||
var options = {cacheSize: 512};
|
||||
map = new OpenLayers.Map('map', {tileManager: options});
|
||||
t.eq(map.tileManager.cacheSize, 512, "cacheSize taken from options");
|
||||
map.destroy();
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
Reference in New Issue
Block a user