New TileManager

This removes all tile queueing/loading specific code from Layer.Grid
and creates a new class that manages tile loading and caching.
This commit is contained in:
ahocevar
2012-11-29 14:52:53 -06:00
parent 2ee362a79b
commit 80fa251649
16 changed files with 499 additions and 311 deletions

View File

@@ -3,7 +3,7 @@
var apiKey = "AqTGBsziZHIJYYxgivLBf0hVdrAk9mWO5cQcb8Yux8sW5M8c8opEC2lZqKR1ZZXf";
// initialize map when page ready
var map;
var map, tileManager;
var gg = new OpenLayers.Projection("EPSG:4326");
var sm = new OpenLayers.Projection("EPSG:900913");
@@ -85,6 +85,7 @@ var init = function (onSelectFeatureFunction) {
center: new OpenLayers.LonLat(0, 0),
zoom: 1
});
tileManager = new OpenLayers.TileManager({map: map});
var style = {
fillOpacity: 0.1,

View File

@@ -1,4 +1,4 @@
var map;
var map, tileManager;
(function() {
// Set document language for css content
@@ -124,6 +124,7 @@ var map;
}
}
});
tileManager = new OpenLayers.TileManager({map: map});
layerPanel.activateControl(mapButton);
layerPanel.activateControl(labelButton);