Do not transform tile coordinates for tileUrlFunction

This commit is contained in:
Andreas Hocevar
2015-06-18 09:09:21 +02:00
parent 2249c82ac2
commit af319c259b
19 changed files with 58 additions and 308 deletions

View File

@@ -67,17 +67,17 @@ describe('ol.source.XYZ', function() {
var projection = xyzTileSource.getProjection();
var tileUrl = xyzTileSource.tileUrlFunction(
xyzTileSource.getTileCoordForTileUrlFunction(
[6, -31, 41], projection));
[6, -31, -23], projection));
expect(tileUrl).to.eql('6/33/22');
tileUrl = xyzTileSource.tileUrlFunction(
xyzTileSource.getTileCoordForTileUrlFunction(
[6, 33, 41], projection));
[6, 33, -23], projection));
expect(tileUrl).to.eql('6/33/22');
tileUrl = xyzTileSource.tileUrlFunction(
xyzTileSource.getTileCoordForTileUrlFunction(
[6, 97, 41], projection));
[6, 97, -23], projection));
expect(tileUrl).to.eql('6/33/22');
});
@@ -89,17 +89,17 @@ describe('ol.source.XYZ', function() {
var projection = xyzTileSource.getProjection();
var tileUrl = xyzTileSource.tileUrlFunction(
xyzTileSource.getTileCoordForTileUrlFunction(
[6, 33, 150], projection));
[6, 33, 0], projection));
expect(tileUrl).to.be(undefined);
tileUrl = xyzTileSource.tileUrlFunction(
xyzTileSource.getTileCoordForTileUrlFunction(
[6, 33, 41], projection));
[6, 33, -23], projection));
expect(tileUrl).to.eql('6/33/22');
tileUrl = xyzTileSource.tileUrlFunction(
xyzTileSource.getTileCoordForTileUrlFunction(
[6, 33, -23], projection));
[6, 33, -65], projection));
expect(tileUrl).to.be(undefined);
});