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 currRatioFloat constraintZoomLevelsArray - 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 currRatioFloat stepInt constraintZoomLevelsArray - 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 currRatioFloat stepInt constraintZoomLevelsArray - Source:
Returns:
- Type
- Float