Deprecation warning for map.beforeRender() and ol.animation functions
This commit is contained in:
@@ -512,6 +512,7 @@ ol.Map.prototype.addOverlayInternal_ = function(overlay) {
|
||||
|
||||
|
||||
/**
|
||||
* Deprecated (use {@link ol.View#animate} instead).
|
||||
* Add functions to be called before rendering. This can be used for attaching
|
||||
* animations before updating the map's view. The {@link ol.animation}
|
||||
* namespace provides several static methods for creating prerender functions.
|
||||
@@ -519,6 +520,7 @@ ol.Map.prototype.addOverlayInternal_ = function(overlay) {
|
||||
* @api
|
||||
*/
|
||||
ol.Map.prototype.beforeRender = function(var_args) {
|
||||
ol.DEBUG && console.warn('map.beforeRender() is deprecated. Use view.animate() instead.');
|
||||
this.render();
|
||||
Array.prototype.push.apply(this.preRenderFunctions_, arguments);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user