Improve type checking in ol.source.WMTS

This commit is contained in:
Tom Payne
2013-04-30 21:34:23 +02:00
parent 6e1f049456
commit 0e69af847e
+7 -2
View File
@@ -73,7 +73,12 @@ ol.source.WMTS = function(options) {
* @return {ol.TileUrlFunctionType} Tile URL function.
*/
function createFromWMTSTemplate(template) {
return function(tileCoord) {
return (
/**
* @param {ol.TileCoord} tileCoord Tile coordinate.
* @return {string|undefined} Tile URL.
*/
function(tileCoord) {
if (goog.isNull(tileCoord)) {
return undefined;
} else {
@@ -93,7 +98,7 @@ ol.source.WMTS = function(options) {
}
return url;
}
};
});
}
var tileUrlFunction = ol.TileUrlFunction.nullTileUrlFunction;