Improve type checking in ol.source.BingMaps
This commit is contained in:
@@ -88,16 +88,22 @@ 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 (
|
||||||
goog.asserts.assert(ol.projection.equivalent(
|
/**
|
||||||
projection, this.getProjection()));
|
* @param {ol.TileCoord} tileCoord Tile coordinate.
|
||||||
if (goog.isNull(tileCoord)) {
|
* @param {ol.Projection} projection Projection.
|
||||||
return undefined;
|
* @return {string|undefined} Tile URL.
|
||||||
} else {
|
*/
|
||||||
return imageUrl.replace(
|
function(tileCoord, projection) {
|
||||||
'{quadkey}', tileCoord.quadKey());
|
goog.asserts.assert(ol.projection.equivalent(
|
||||||
}
|
projection, this.getProjection()));
|
||||||
};
|
if (goog.isNull(tileCoord)) {
|
||||||
|
return undefined;
|
||||||
|
} else {
|
||||||
|
return imageUrl.replace(
|
||||||
|
'{quadkey}', tileCoord.quadKey());
|
||||||
|
}
|
||||||
|
});
|
||||||
})));
|
})));
|
||||||
|
|
||||||
var transform = ol.projection.getTransformFromProjections(
|
var transform = ol.projection.getTransformFromProjections(
|
||||||
|
|||||||
Reference in New Issue
Block a user