Deprecation warning for map.beforeRender() and ol.animation functions

This commit is contained in:
Tim Schaub
2016-11-06 17:00:23 -07:00
parent 7fde4a48f4
commit ea9fea000a
3 changed files with 12 additions and 1 deletions

View File

@@ -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);
};