2

I have an expensive operation I want to run only when the camera is idle. I am using the Mapbox v10-rc.5 SDK on Android. With the Google Maps SDK, I can set up an onCameraIdleListener, and I see that there was a similar thing in previous versions of the Mapbox SDK. How can I do this in v10?

I tried calling addCameraAnimationsLifecycleListener and responding in onAnimatorEnding, but this seems to trigger every frame when the user is doing pinch-to-zoom. I tried checking isGestureInProgress or isUserAnimationInProgress, but they are either always or never true in this case (I forget which). I see there is also addMapIdleListener, but it looks like that triggers when all the tiles are loaded, which is not what I want.

Andrew Kirmse
  • 53
  • 1
  • 4

0 Answers0