Improve type checking in ol.source.BingMaps

This commit is contained in:
Tom Payne
2013-04-30 21:33:36 +02:00
parent fe9fee1609
commit 65f891a30d

View File

@@ -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(