Add setters and getters for imageLoadFunction

This commit is contained in:
Bart van den Eijnden
2015-02-05 10:45:22 +01:00
parent f117cddb34
commit ce8d57b534
2 changed files with 42 additions and 0 deletions

View File

@@ -160,6 +160,15 @@ ol.source.ImageMapGuide.prototype.getImage =
};
/**
* @return {ol.ImageLoadFunctionType} The image load function.
* @api
*/
ol.source.ImageMapGuide.prototype.getImageLoadFunction = function() {
return this.imageLoadFunction_;
};
/**
* @param {ol.Extent} extent The map extents.
* @param {ol.Size} size the viewport size.
@@ -221,3 +230,15 @@ ol.source.ImageMapGuide.prototype.getUrl =
goog.object.extend(baseParams, params);
return goog.uri.utils.appendParamsFromMap(baseUrl, baseParams);
};
/**
* @param {ol.ImageLoadFunctionType} imageLoadFunction Image load function.
* @api
*/
ol.source.ImageMapGuide.prototype.setImageLoadFunction = function(
imageLoadFunction) {
this.image_ = null;
this.imageLoadFunction_ = imageLoadFunction;
this.changed();
};