From 6e1f049456cf6bfd56b016467616280b8e3225e3 Mon Sep 17 00:00:00 2001 From: Tom Payne Date: Tue, 30 Apr 2013 21:33:55 +0200 Subject: [PATCH] Improve type checking in ol.source.StaticImage --- src/ol/source/staticimagesource.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/ol/source/staticimagesource.js b/src/ol/source/staticimagesource.js index 74dd079a63..17791719fd 100644 --- a/src/ol/source/staticimagesource.js +++ b/src/ol/source/staticimagesource.js @@ -60,7 +60,14 @@ ol.source.StaticImage.prototype.getImage = * @return {ol.ImageUrlFunctionType} Function. */ ol.source.StaticImage.createImageFunction = function(url) { - return function(extent, size, projection) { - return url; - }; + return ( + /** + * @param {ol.Extent} extent Extent. + * @param {ol.Size} size Size. + * @param {ol.Projection} projection Projection. + * @return {string|undefined} URL. + */ + function(extent, size, projection) { + return url; + }); };