Skip to content
This repository has been 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

Closed
akoprow opened this issue Sep 18, 2017 · 4 comments
Closed

Zoom-in and zoom-out do not invoke any onCameraXXX callbacks #10022

akoprow opened this issue Sep 18, 2017 · 4 comments
Labels
Android Mapbox Maps SDK for Android

Comments

@akoprow
Copy link

akoprow commented Sep 18, 2017

Platform: Android
Mapbox SDK version: 5.1.3

Steps to trigger behavior

  1. 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?

@Guardiola31337 Guardiola31337 added the Android Mapbox Maps SDK for Android label Sep 19, 2017
@Guardiola31337
Copy link
Contributor

Hey 👋 @akoprow thanks for reaching out and report your question.

With 5.1.0 release, 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
Copy link
Author

akoprow commented 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 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).

I doubt this is "Working as intended"?

@tobrun
Copy link
Member

tobrun commented Oct 18, 2017

Thank you for the report @akoprow, fix for this in #10221.

@tobrun tobrun added this to the android-v5.2.0 milestone Oct 18, 2017
@lilykaiser
Copy link

Can this be closed?

@tobrun tobrun closed this as completed Nov 3, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android
Projects
None yet
Development

No branches or pull requests

4 participants