Add option to Zoomify source for setting custom extent.

https://github.com/openlayers/openlayers/issues/7390
This commit is contained in:
Lasse Laakkonen
2017-10-25 22:19:02 +03:00
parent 1a1d45fdd1
commit eefb3f9207
3 changed files with 44 additions and 1 deletions

View File

@@ -33,6 +33,7 @@ ol.source.Zoomify = function(opt_options) {
var imageWidth = size[0];
var imageHeight = size[1];
var extent = options.extent || [0, -size[1], size[0], 0];
var tierSizeInTiles = [];
var tileSize = options.tileSize || ol.DEFAULT_TILE_SIZE;
var tileSizeForTierSizeCalculation = tileSize;
@@ -79,7 +80,6 @@ ol.source.Zoomify = function(opt_options) {
}
resolutions.reverse();
var extent = [0, -size[1], size[0], 0];
var tileGrid = new ol.tilegrid.TileGrid({
tileSize: tileSize,
extent: extent,