You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Zoom-in and zoom-out do not invoke any onCameraXXX callbacks #10022
Double-click with a mouse to trigger zoom-in on the map.
Expected behavior
Some onCameraXXX callback should be invoked.
Actual behavior
As far as I can see the only callback being called is OnCameraChangeListener. How is one supposed to handle those events given that aforementioned callback is deprecated?
Let me clarify. I'm aware of the new API and am using it. I created a simple app logging to Logcat whenever any of the camera callbacks fires. Everything works nicely except when I add zoom-in/out icons to the map:
Zooming with double clicking the map triggers a series of callback and eventually OnCameraIdle when the camera move is finished (this is the event I'm interested in and this is the behavior I'd expect).
However, clicking the zoom-in/out buttons only triggers a series of OnCameraMoveStarted (never triggering OnCameraIdle).
Activity
Guardiola31337 commentedon Sep 19, 2017
Hey 👋 @akoprow thanks for reaching out and report your question.
With
5.1.0release, we introduced a new system around camera notifications 👀 Camera Change Listener v2.0 and Camera start, ongoing, and end events notifications tickets.There is an example in the test app (
CameraPositionActivity) showing how to use the new CameraChangeListener API that you can check.Going ahead and close this as the question is answered. Feel free to open new tickets if you have any other questions 😉
akoprow commentedon Sep 19, 2017
Let me clarify. I'm aware of the new API and am using it. I created a simple app logging to Logcat whenever any of the camera callbacks fires. Everything works nicely except when I add zoom-in/out icons to the map:
mMap.getUiSettings().setZoomControlsEnabled(true);Zooming with double clicking the map triggers a series of callback and eventually
OnCameraIdlewhen the camera move is finished (this is the event I'm interested in and this is the behavior I'd expect).However, clicking the zoom-in/out buttons only triggers a series of
OnCameraMoveStarted(never triggeringOnCameraIdle).I doubt this is "Working as intended"?
tobrun commentedon Oct 18, 2017
Thank you for the report @akoprow, fix for this in #10221.
lilykaiser commentedon Nov 2, 2017
Can this be closed?