Improve type checking in ol.source.BingMaps
This commit is contained in:
@@ -88,7 +88,13 @@ ol.source.BingMaps.prototype.handleImageryMetadataResponse =
|
|||||||
var imageUrl = resource.imageUrl
|
var imageUrl = resource.imageUrl
|
||||||
.replace('{subdomain}', subdomain)
|
.replace('{subdomain}', subdomain)
|
||||||
.replace('{culture}', culture);
|
.replace('{culture}', culture);
|
||||||
return function(tileCoord, projection) {
|
return (
|
||||||
|
/**
|
||||||
|
* @param {ol.TileCoord} tileCoord Tile coordinate.
|
||||||
|
* @param {ol.Projection} projection Projection.
|
||||||
|
* @return {string|undefined} Tile URL.
|
||||||
|
*/
|
||||||
|
function(tileCoord, projection) {
|
||||||
goog.asserts.assert(ol.projection.equivalent(
|
goog.asserts.assert(ol.projection.equivalent(
|
||||||
projection, this.getProjection()));
|
projection, this.getProjection()));
|
||||||
if (goog.isNull(tileCoord)) {
|
if (goog.isNull(tileCoord)) {
|
||||||
@@ -97,7 +103,7 @@ ol.source.BingMaps.prototype.handleImageryMetadataResponse =
|
|||||||
return imageUrl.replace(
|
return imageUrl.replace(
|
||||||
'{quadkey}', tileCoord.quadKey());
|
'{quadkey}', tileCoord.quadKey());
|
||||||
}
|
}
|
||||||
};
|
});
|
||||||
})));
|
})));
|
||||||
|
|
||||||
var transform = ol.projection.getTransformFromProjections(
|
var transform = ol.projection.getTransformFromProjections(
|
||||||
|
|||||||
Reference in New Issue
Block a user