Merge pull request #2121 from oterral/utils_func_cache
Add getters and setters for TileUrlFunction and TileLoadFunction properties
This commit is contained in:
@@ -119,8 +119,38 @@ ol.source.TileImage.prototype.getTile =
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @return {ol.TileLoadFunctionType} TileLoadFunction
|
||||
* @todo api
|
||||
*/
|
||||
ol.source.TileImage.prototype.getTileLoadFunction = function() {
|
||||
return this.tileLoadFunction;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @return {ol.TileUrlFunctionType} TileUrlFunction
|
||||
* @todo api
|
||||
*/
|
||||
ol.source.TileImage.prototype.getTileUrlFunction = function() {
|
||||
return this.tileUrlFunction;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.TileLoadFunctionType} tileLoadFunction Tile load function.
|
||||
* @todo api
|
||||
*/
|
||||
ol.source.TileImage.prototype.setTileLoadFunction = function(tileLoadFunction) {
|
||||
this.tileCache.clear();
|
||||
this.tileLoadFunction = tileLoadFunction;
|
||||
this.dispatchChangeEvent();
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.TileUrlFunctionType} tileUrlFunction Tile URL function.
|
||||
* @todo api
|
||||
*/
|
||||
ol.source.TileImage.prototype.setTileUrlFunction = function(tileUrlFunction) {
|
||||
// FIXME It should be possible to be more intelligent and avoid clearing the
|
||||
|
||||
Reference in New Issue
Block a user