The {ol.animation} static methods are designed to be used with the ol.Map#beforeRender method. For example:
var map = new ol.Map({ ... });
var zoom = ol.animation.zoom({
resolution: map.getView().getResolution()
});
map.beforeRender(zoom);
map.getView().setResolution(map.getView().getResolution() * 2);- Source:
- animation.jsdoc, line 1
Methods
-
<static> bounce
Stability: experimental -
Parameters:
Name Type Description optionsolx.animation.BounceOptions Bounce options.
- Source:
- animation.js, line 15
Returns:
Pre-render function.
- Type
- ol.PreRenderFunction
-
<static> pan
Stability: experimental -
Parameters:
Name Type Description optionsolx.animation.PanOptions Pan options.
- Source:
- animation.js, line 50
Returns:
Pre-render function.
- Type
- ol.PreRenderFunction
-
<static> rotate
Stability: experimental -
Parameters:
Name Type Description optionsolx.animation.RotateOptions Rotate options.
- Source:
- animation.js, line 89
Returns:
Pre-render function.
- Type
- ol.PreRenderFunction
-
<static> zoom
Stability: experimental -
Parameters:
Name Type Description optionsolx.animation.ZoomOptions Zoom options.
- Source:
- animation.js, line 126
Returns:
Pre-render function.
- Type
- ol.PreRenderFunction
OpenLayers 3