Respect the tileSize option for XYZ grids
This commit is contained in:
@@ -24,18 +24,16 @@ goog.require('ol.tilegrid.TileGrid');
|
||||
* @api
|
||||
*/
|
||||
ol.tilegrid.XYZ = function(options) {
|
||||
// TODO: accept a tileSize option
|
||||
var tileSize = ol.DEFAULT_TILE_SIZE;
|
||||
var extent = goog.isDef(options.extent) ?
|
||||
options.extent : ol.proj.EPSG3857.EXTENT;
|
||||
var resolutions = ol.tilegrid.resolutionsFromExtent(
|
||||
extent, options.maxZoom, tileSize);
|
||||
extent, options.maxZoom, options.tileSize);
|
||||
|
||||
goog.base(this, {
|
||||
minZoom: options.minZoom,
|
||||
origin: ol.extent.getCorner(extent, ol.extent.Corner.TOP_LEFT),
|
||||
resolutions: resolutions,
|
||||
tileSize: tileSize
|
||||
tileSize: options.tileSize
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user