type ZoomToLevelAction = (level, options?) => void | Promise<void>;Action function for setting zoom to a specific level
Zoom levels are per CSS pixel, so 1 is 100% on every screen.
engine.scene.getZoomLevel() is in device pixels: divide it by
window.devicePixelRatio to compare it with these levels.
Parameters#
| Parameter | Type | Description |
|---|---|---|
level |
number |
- |
options? |
{ animate?: |
boolean |
options.animate? |
boolean |
|
options.minZoom? |
number |
Minimum allowed zoom level (default: 0.125) |
options.maxZoom? |
number |
Maximum allowed zoom level (default: 32) |
Returns#
void | Promise<void>