Add getTileLoadFunction and setTileLoadFunction in ol.source.TileImage

This commit is contained in:
oterral
2014-05-07 09:18:41 +02:00
parent c4f7ebb571
commit f3be970f17

View File

@@ -119,17 +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 stability experimental
* @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