* zoom * Set/Get the map zoom * @param z2? Number to set the zoom to * @param duration? Duration of the transition in milliseconds, defaults to 0ms (asap) * @return map zoom -or- this
(z2, duration)
| 670 | * @return map zoom -or- this |
| 671 | */ |
| 672 | zoom(z2, duration) { |
| 673 | if (z2 === undefined) { |
| 674 | return this.context.viewport.transform.zoom; |
| 675 | } else { |
| 676 | return this.setMapParams(undefined, z2, undefined, duration ?? 0); |
| 677 | } |
| 678 | } |
| 679 | |
| 680 | |
| 681 | /** |
no test coverage detected