Initializes the detector with timeout value and callbacks. MapView also provides events for client code to be notified when these cues occur.
The delay, in milliseconds, between the last user interaction
detected and the call to m_movementFinishedFunc
; the default is 300
.
Callback function, called when the user starts interacting.
Callback function, called when the user stops interacting.
Returns true
if the camera of this MapView is currently moving. In this case the
m_movementFinishedFunc
is waiting to be called after the throttling timer runs out.
Returns true
if the camera has moved in the last frame.
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.
[[Mapview]]'s position and camera are checked for modifications.
Reset the saved camera position. Next time checkCameraMoved is called, it will return
false
.
Generated using TypeDoc
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.