Fixing origin for default tile grid
We count tiles from bottom to top, so we want the origin in the bottom left corner, not the top left corner.
This commit is contained in:
@@ -368,7 +368,7 @@ ol.tilegrid.createForProjection =
|
||||
resolutions[z] = size / Math.pow(2, z);
|
||||
}
|
||||
return new ol.tilegrid.TileGrid({
|
||||
origin: projectionExtent.getTopLeft(),
|
||||
origin: projectionExtent.getBottomLeft(),
|
||||
resolutions: resolutions,
|
||||
tileSize: tileSize
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user