ZoomAnimationOptions | MapGL | 2GIS Documentation


Animation options for zoom.


Determines if the transform should be animated.


Duration of the animation in milliseconds.

Easing function to be used with the animation.


Intermediate zoom values will be calculated using camera's height.

  • false (default): zoom values will be calculated using provided easing function.
  • true: intermediate camera height calculated then converted into zoom.

Initial and final zoom values are same for both modes, only timing function changes.

true value is useful for simultaneous animation of map's center and zoom. In that case camera will fly in a straight line.

Example: map.setCenter([82.920412, 55.030111], {easing: 'easeOutCubic', duration: 800}); map.setZoom(18, {easing: 'easeOutCubic', useHeightForAnimation: true, duration: 800});