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

@@ -54,9 +54,12 @@ ol.TileUrlFunction.createFromTemplate = function(template) {
} else {
return template.replace(zRegEx, tileCoord[0].toString())
.replace(xRegEx, tileCoord[1].toString())
.replace(yRegEx, tileCoord[2].toString())
.replace(yRegEx, function() {
var y = -tileCoord[2] - 1;
return y.toString();
})
.replace(dashYRegEx, function() {
var y = (1 << tileCoord[0]) - tileCoord[2] - 1;
var y = (1 << tileCoord[0]) + tileCoord[2];
return y.toString();
});
}