Class CameraMovementDetector

The CameraMovementDetector class checks for changes in camera position and orientation, to detect continuous movements without the animation mode activated in MapView. If the interaction is not continuous enough, you can use a throttling timer to reduce the number of callbacks.

Hierarchy

  • CameraMovementDetector

Constructors

  • Initializes the detector with timeout value and callbacks. MapView also provides events for client code to be notified when these cues occur.

    Parameters

    • m_throttlingTimeout: undefined | number

      The delay, in milliseconds, between the last user interaction detected and the call to m_movementFinishedFunc; the default is 300.

    • m_movementStartedFunc: undefined | (() => void)

      Callback function, called when the user starts interacting.

    • m_movementFinishedFunc: undefined | (() => void)

      Callback function, called when the user stops interacting.

    Returns CameraMovementDetector

Accessors

Methods

  • Checks if the camera has moved since the last time it was checked. The m_movementStartedFunc is called when a movement starts. If no movement is detected, a timer for m_movementFinishedFunc starts.

    Parameters

    • mapView: MapView

      [[Mapview]]'s position and camera are checked for modifications.

    • now: number

    Returns boolean

Generated using TypeDoc