Using no buffer by default, because it makes no sense with TileManager

And while we're at it, simplify the example to use the OSM layer and the
new default for transitionEffect.
This commit is contained in:
ahocevar
2013-04-29 14:50:43 +02:00
parent 48efd43250
commit 779c97f43e

View File

@@ -1,21 +1,9 @@
var urls = [
"http://a.tile.openstreetmap.org/${z}/${x}/${y}.png",
"http://b.tile.openstreetmap.org/${z}/${x}/${y}.png",
"http://c.tile.openstreetmap.org/${z}/${x}/${y}.png"
];
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,
attribution: "Data CC-By-SA by <a href='http://openstreetmap.org/'>OpenStreetMap</a>"
}),
new OpenLayers.Layer.XYZ("OSM (without buffer)", urls, {
transitionEffect: "resize", buffer: 0, sphericalMercator: true,
attribution: "Data CC-By-SA by <a href='http://openstreetmap.org/'>OpenStreetMap</a>"
})
new OpenLayers.Layer.OSM("OSM (without buffer)"),
new OpenLayers.Layer.OSM("OSM (with buffer)", null, {buffer: 2})
],
controls: [
new OpenLayers.Control.Navigation({