Replace ol.tilegrid.XYZ with an ol.tilegrid.createXYZ function
This commit is contained in:
@@ -12,7 +12,6 @@ goog.require('ol.proj');
|
||||
goog.require('ol.source.State');
|
||||
goog.require('ol.source.TileImage');
|
||||
goog.require('ol.tilecoord');
|
||||
goog.require('ol.tilegrid.XYZ');
|
||||
|
||||
|
||||
|
||||
@@ -103,18 +102,20 @@ ol.source.BingMaps.prototype.handleImageryMetadataResponse =
|
||||
var maxZoom = this.maxZoom_ == -1 ? resource.zoomMax : this.maxZoom_;
|
||||
|
||||
var sourceProjection = this.getProjection();
|
||||
var tileGrid = new ol.tilegrid.XYZ({
|
||||
extent: ol.tilegrid.extentFromProjection(sourceProjection),
|
||||
var extent = ol.tilegrid.extentFromProjection(sourceProjection);
|
||||
var tileSize = resource.imageWidth == resource.imageHeight ?
|
||||
resource.imageWidth : [resource.imageWidth, resource.imageHeight];
|
||||
var tileGrid = ol.tilegrid.createXYZ({
|
||||
extent: extent,
|
||||
minZoom: resource.zoomMin,
|
||||
maxZoom: maxZoom,
|
||||
tileSize: resource.imageWidth == resource.imageHeight ?
|
||||
resource.imageWidth : [resource.imageWidth, resource.imageHeight]
|
||||
tileSize: tileSize
|
||||
});
|
||||
this.tileGrid = tileGrid;
|
||||
|
||||
var culture = this.culture_;
|
||||
this.tileUrlFunction = ol.TileUrlFunction.withTileCoordTransform(
|
||||
tileGrid.createTileCoordTransform(),
|
||||
ol.tilegrid.createOriginTopLeftTileCoordTransform(tileGrid),
|
||||
ol.TileUrlFunction.createFromTileUrlFunctions(
|
||||
goog.array.map(
|
||||
resource.imageUrlSubdomains,
|
||||
|
||||
Reference in New Issue
Block a user