On this page

Class TwoFingersTouchZoomHandler

The TwoFingersTouchHandlers allows the user to zoom the map two fingers

Hierarchy (View Summary)

Index

Constructors

Methods

  • Disables the "drag to pitch" interaction.

    Returns void

    map.touchPitch.disable();
    
  • Returns a Boolean indicating whether the "drag to pitch" interaction is active, i.e. currently being used.

    Returns boolean

    true if the "drag to pitch" interaction is active.

  • Returns a Boolean indicating whether the "drag to pitch" interaction is enabled.

    Returns boolean

    true if the "drag to pitch" interaction is enabled.

  • reset can be called by the manager at any time and must reset everything to it's original state

    Returns void

  • Sets the zoom rate of touch gestures.

    Parameters

    • OptionalzoomRate: number

      1 The rate used to scale touch movement to a zoom value. Set to undefined to restore the default.

    Returns void

    Slow down touch zoom

    map.touchZoomRotate.setZoomRate(0.5);
    
  • Sets the threshold before a pinch gesture starts zooming.

    Parameters

    • OptionalzoomThreshold: number

      0.1 The minimum zoom delta before the pinch gesture becomes active. Set to undefined to restore the default.

    Returns void

    Make pinch zoom less sensitive

    map.touchZoomRotate.setZoomThreshold(0.3);
    
Was this helpful?
SDK JS
Reference
TwoFingersTouchZoomHandler