For AI agents: a documentation index is available at /llms.txt. Markdown versions of all pages are available by appending .md to any URL.
Class TwoFingersTouchZoomRotateHandler
Constructors
constructor
-
new TwoFingersTouchZoomRotateHandler(
el: HTMLElement,
touchZoom: TwoFingersTouchZoomHandler,
touchRotate: TwoFingersTouchRotateHandler,
tapDragZoom: TapDragZoomHandler,
): TwoFingersTouchZoomRotateHandlerParameters
- el: HTMLElement
- touchZoom: TwoFingersTouchZoomHandler
- touchRotate: TwoFingersTouchRotateHandler
- tapDragZoom: TapDragZoomHandler
Returns TwoFingersTouchZoomRotateHandler
Methods
disable
disableRotation
enable
-
Enables the "pinch to rotate and zoom" interaction.
Parameters
Optionaloptions: boolean | AroundCenterOptions | nullOptions object.
Returns void
enableRotation
isActive
-
Returns true if the handler is enabled and has detected the start of a zoom/rotate gesture.
Returns boolean
trueif the handler is active,falseotherwise
isEnabled
-
Returns a Boolean indicating whether the "pinch to rotate and zoom" interaction is enabled.
Returns boolean
trueif the "pinch to rotate and zoom" interaction is enabled.
setZoomRate
setZoomThreshold
-
Sets the threshold before a pinch gesture starts zooming.
Parameters
OptionalzoomThreshold: number0.1 The minimum zoom delta before the pinch gesture becomes active. Set to
undefinedto restore the default.
Returns void
The
TwoFingersTouchZoomRotateHandlerallows the user to zoom and rotate the map by pinching on a touchscreen.They can zoom with one finger by double tapping and dragging. On the second tap, hold the finger down and drag up or down to zoom in or out.