Use simple tile sizes for Bing maps by default

This commit is contained in:
Andreas Hocevar
2015-04-15 08:12:17 +02:00
parent 0d53edfa21
commit 9c415ac9da
2 changed files with 3 additions and 2 deletions

View File

@@ -118,7 +118,7 @@ size of a sub-rectangle in an image sprite.
### Support for non-square tiles
When using ´ol.tilegrid.TileGrid#getTileSize` on the tile grid of an `ol.source.BingMaps`, the return value will now be an `ol.Size` array instead of a number.
The return value of ´ol.tilegrid.TileGrid#getTileSize()` will now be an `ol.Size` array instead of a number if non-square tiles (i.e. an `ol.Size` array instead of a number as `tilsSize`) are used. To always get an `ol.Size`, the new `ol.size.toSize()` was added.
### v3.4.0

View File

@@ -107,7 +107,8 @@ ol.source.BingMaps.prototype.handleImageryMetadataResponse =
extent: ol.tilegrid.extentFromProjection(sourceProjection),
minZoom: resource.zoomMin,
maxZoom: maxZoom,
tileSize: [resource.imageWidth, resource.imageHeight]
tileSize: resource.imageWidth == resource.imageHeight ?
resource.imageWidth : [resource.imageWidth, resource.imageHeight]
});
this.tileGrid = tileGrid;