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:
@@ -75,7 +75,8 @@ ol.source.TileJSON.prototype.handleTileJSONResponse = function(tileJSON) {
|
||||
});
|
||||
this.tileGrid = tileGrid;
|
||||
|
||||
this.tileUrlFunction = ol.TileUrlFunction.createFromTemplates(tileJSON.tiles);
|
||||
this.tileUrlFunction =
|
||||
ol.TileUrlFunction.createFromTemplates(tileJSON.tiles, tileGrid);
|
||||
|
||||
if (tileJSON.attribution !== undefined &&
|
||||
goog.isNull(this.getAttributions())) {
|
||||
|
||||
Reference in New Issue
Block a user