Make tile URL functions more general

This commit is contained in:
Tom Payne
2014-03-25 16:50:16 +01:00
parent 86c5a582c7
commit a31ad69ec4
2 changed files with 8 additions and 15 deletions

View File

@@ -91,6 +91,7 @@ ol.source.BingMaps.prototype.handleImageryMetadataResponse =
this.tileGrid = tileGrid;
var culture = this.culture_;
var sourceProjection = this.getProjection();
this.tileUrlFunction = ol.TileUrlFunction.withTileCoordTransform(
tileGrid.createTileCoordTransform(),
ol.TileUrlFunction.createFromTileUrlFunctions(
@@ -102,7 +103,6 @@ ol.source.BingMaps.prototype.handleImageryMetadataResponse =
.replace('{culture}', culture);
return (
/**
* @this {ol.source.BingMaps}
* @param {ol.TileCoord} tileCoord Tile coordinate.
* @param {number} pixelRatio Pixel ratio.
* @param {ol.proj.Projection} projection Projection.
@@ -110,7 +110,7 @@ ol.source.BingMaps.prototype.handleImageryMetadataResponse =
*/
function(tileCoord, pixelRatio, projection) {
goog.asserts.assert(ol.proj.equivalent(
projection, this.getProjection()));
projection, sourceProjection));
if (goog.isNull(tileCoord)) {
return undefined;
} else {