Bring back throttling for tile loading

In OpenLayers 2.12, only one tile was loaded per animation frame. This
change brings back something similar as part of the tile manager. But we
do not use requestAnimationFrame anymore, because @elemoine pointed out
that browsers may give requestAnimationFrame invoked functions a higher
priority than setTimeout invoked functions.

The reason for this change is
http://lists.osgeo.org/pipermail/openlayers-users/2013-April/028063.html.
This commit is contained in:
ahocevar
2013-04-29 14:20:18 +02:00
parent 142546c6d5
commit 48efd43250
2 changed files with 27 additions and 3 deletions

View File

@@ -6,6 +6,7 @@ var urls = [
var map = new OpenLayers.Map({
div: "map",
tileManager: new OpenLayers.TileManager(),
layers: [
new OpenLayers.Layer.XYZ("OSM (with buffer)", urls, {
transitionEffect: "resize", buffer: 2, sphericalMercator: true,