Improve type checking in ol.source.WMTS
This commit is contained in:
@@ -73,7 +73,12 @@ ol.source.WMTS = function(options) {
|
|||||||
* @return {ol.TileUrlFunctionType} Tile URL function.
|
* @return {ol.TileUrlFunctionType} Tile URL function.
|
||||||
*/
|
*/
|
||||||
function createFromWMTSTemplate(template) {
|
function createFromWMTSTemplate(template) {
|
||||||
return function(tileCoord) {
|
return (
|
||||||
|
/**
|
||||||
|
* @param {ol.TileCoord} tileCoord Tile coordinate.
|
||||||
|
* @return {string|undefined} Tile URL.
|
||||||
|
*/
|
||||||
|
function(tileCoord) {
|
||||||
if (goog.isNull(tileCoord)) {
|
if (goog.isNull(tileCoord)) {
|
||||||
return undefined;
|
return undefined;
|
||||||
} else {
|
} else {
|
||||||
@@ -93,7 +98,7 @@ ol.source.WMTS = function(options) {
|
|||||||
}
|
}
|
||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
};
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
var tileUrlFunction = ol.TileUrlFunction.nullTileUrlFunction;
|
var tileUrlFunction = ol.TileUrlFunction.nullTileUrlFunction;
|
||||||
|
|||||||
Reference in New Issue
Block a user