Fix {-y} template calculation for custom (TMS) tile grids

Previously, {-y} only worked for the standard web mercator tile grid. Now
a tile grid with an extent is required (which we get from
ol.tilegrid.createXYZ() anyway), and then the y calculation for TMS style
tile grids works as expected.
This commit is contained in:
Andreas Hocevar
2015-09-28 16:37:21 +02:00
parent 79766ad25c
commit 8248ec63ba
6 changed files with 58 additions and 25 deletions

View File

@@ -136,7 +136,8 @@ ol.source.TileUTFGrid.prototype.handleTileJSONResponse = function(tileJSON) {
return;
}
this.tileUrlFunction_ = ol.TileUrlFunction.createFromTemplates(grids);
this.tileUrlFunction_ =
ol.TileUrlFunction.createFromTemplates(grids, tileGrid);
if (tileJSON.attribution !== undefined) {
var attributionExtent = extent !== undefined ?