Class: ZoomUtils

ZoomUtils

new ZoomUtils()

Utility methods for zoom in/out functions.
Source:

Methods

(static) getNearestZoomLevel(currRatio, constraintZoomLevels) → {Float}

Returns nearest zoom level to current ratio.
Parameters:
Name Type Description
currRatio Float
constraintZoomLevels Array
Source:
Returns:
Type
Float

(static) getNextZoomInRatio(currRatio, step, constraintZoomLevels) → {Float}

Get a predefined ratio that bigger than currRatio, which can be used in usual zoom in function.
Parameters:
Name Type Description
currRatio Float
step Int
constraintZoomLevels Array
Source:
Returns:
Type
Float

(static) getNextZoomOutRatio(currRatio, step, constraintZoomLevels) → {Float}

Get a predefined ratio that smaller than currRatio, which can be used in usual zoom out function.
Parameters:
Name Type Description
currRatio Float
step Int
constraintZoomLevels Array
Source:
Returns:
Type
Float