Fixing KaMap layer

This also fixes an issue that has gone unnoticed for a while: the grid did
not cover the bottom of the map viewport, but instead covered an invisible
area above the top of the map viewport.
This commit is contained in:
ahocevar
2012-10-11 23:54:04 +02:00
parent e7292ecbe2
commit 7df5e3ca8e
2 changed files with 29 additions and 9 deletions

View File

@@ -154,9 +154,9 @@
var m = new OpenLayers.Map('map', {adjustZoom: function(z) {return z;}});
m.addLayer(layer);
m.zoomToMaxExtent();
t.eq(layer.grid[5][7].url, "http://www.openlayers.org/world/index.php?g=satellite&map=world&i=jpeg&t=0&l=-256&s=221471921.25", "grid[5][7] kamap is okay");
t.eq(layer.grid[5][6].url, "http://www.openlayers.org/world/index.php?g=satellite&map=world&i=jpeg&t=0&l=0&s=221471921.25", "grid[5][6] kamap is okay");
t.eq(layer.grid[5][5].url, "http://www.openlayers.org/world/index.php?g=satellite&map=world&i=jpeg&t=0&l=-256&s=221471921.25", "grid[5][5] is okay");
t.eq(layer.grid[4][7].url, "http://www.openlayers.org/world/index.php?g=satellite&map=world&i=jpeg&t=0&l=-256&s=221471921.25", "grid[5][7] kamap is okay");
t.eq(layer.grid[4][6].url, "http://www.openlayers.org/world/index.php?g=satellite&map=world&i=jpeg&t=0&l=0&s=221471921.25", "grid[5][6] kamap is okay");
t.eq(layer.grid[4][5].url, "http://www.openlayers.org/world/index.php?g=satellite&map=world&i=jpeg&t=0&l=-256&s=221471921.25", "grid[5][5] is okay");
t.ok(layer.grid[7][6].url == null, "no latitudinal wrapping - tile not loaded if outside maxExtent");
m.destroy();
}