From 4a3651b7da2bde1ae3026ad36fc86d6a9a7f81e8 Mon Sep 17 00:00:00 2001 From: ahocevar Date: Mon, 7 Jan 2013 15:30:05 +0100 Subject: [PATCH] Release notes and additional in-line comment As suggested by @bartvde. --- lib/OpenLayers/TileManager.js | 2 ++ notes/2.13.md | 14 ++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/lib/OpenLayers/TileManager.js b/lib/OpenLayers/TileManager.js index 31dc12a5a3..3805c2a883 100644 --- a/lib/OpenLayers/TileManager.js +++ b/lib/OpenLayers/TileManager.js @@ -342,6 +342,8 @@ OpenLayers.TileManager = OpenLayers.Class({ img.style.visibility = 'hidden'; } tile.setImage(img); + // LRU - move tile to the end of the array to mark it as the most + // recently used OpenLayers.Util.removeItem(this.tileCacheIndex, tile.url); this.tileCacheIndex.push(tile.url); } diff --git a/notes/2.13.md b/notes/2.13.md index 8fdaf0a1d0..198a4c530c 100644 --- a/notes/2.13.md +++ b/notes/2.13.md @@ -37,6 +37,20 @@ Corresponding issues/pull requests: # Behavior Changes from Past Releases +## Layer.Grid: Tile queue and tileLoadingDelay changes + +With the introduction of OpenLayers.TileManager, tile queueing has become optional. The default behavior is back to how it was in OpenLayers 2.11. To use a tile queue in 2.13, the map needs to be configured with a tileManager, e.g.: + + var map = new OpenLayers.Map('map', { + tileManager: new OpenLayers.TileManager() + }); + +The tile queue also works differently than before: it no longer loads one tile at a time. Instead, it waits after a zoom or pan, and loads all tiles after a delay. This has the same effect as previously (less burden on the server), but makes use of the browser's request management. The delay can be configured separately for zooming and moving the map, using the `zoomDelay` (default: 200 ms) and `moveDelay` (default: 100 ms) config options of the TileManager. + +The `moveDelay` is the replacement for the `tileLoadingDelay` layer config option, which has been removed. There is no magic any more to only use the delay when requestAnimationFrame is not natively available. + +In general, when targeting mobile devices or when using slow servers or connections for tiled layers, it is recommended to configure the map with a TileManager. + ## window.$ is no longer an alias for OpenLayers.Util.getElement We do no longer create a global variable '$' when such a symbol isn't already