Don't create unnecessary closure

This commit is contained in:
Frederic Junod
2014-08-19 11:39:44 +02:00
parent 59826ce490
commit 35e4134047

View File

@@ -99,6 +99,16 @@ ol.renderer.Map.prototype.disposeInternal = function() {
};
/**
* @param {ol.Map} map Map.
* @param {olx.FrameState} frameState Frame state.
* @private
*/
ol.renderer.Map.expireIconCache_ = function(map, frameState) {
ol.style.IconImageCache.getInstance().expire();
};
/**
* @param {ol.Coordinate} coordinate Coordinate.
* @param {olx.FrameState} frameState FrameState.
@@ -256,14 +266,7 @@ ol.renderer.Map.prototype.removeUnusedLayerRenderers_ =
* @protected
*/
ol.renderer.Map.prototype.scheduleExpireIconCache = function(frameState) {
frameState.postRenderFunctions.push(
/**
* @param {ol.Map} map Map.
* @param {olx.FrameState} frameState Frame state.
*/
function(map, frameState) {
ol.style.IconImageCache.getInstance().expire();
});
frameState.postRenderFunctions.push(ol.renderer.Map.expireIconCache_);
};