Allow to refresh a source and reload its data.
Provide an API to refresh a source and reload its data in an associated layer, as for example already loaded tiles in a ol.source.Tile source are not refreshed. Additionally a test for the new ol.source.Source.refresh() function is provided. Currently internal state is not cleaned up, e.g. already loaded tiles in a `ol.source.Tile` source are still cached and not reloaded at all. github issue #4867 (https://github.com/openlayers/ol3/issues/4867)
This commit is contained in:
@@ -150,6 +150,15 @@ ol.source.Source.prototype.getWrapX = function() {
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Refreshes the source and finally dispatches a 'change' event.
|
||||
* @api
|
||||
*/
|
||||
ol.source.Source.prototype.refresh = function() {
|
||||
this.changed();
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Set the attributions of the source.
|
||||
* @param {Array.<ol.Attribution>} attributions Attributions.
|
||||
|
||||
Reference in New Issue
Block a user