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.
Hi
I just updated from 5.1.3 to 5.1.4 and the zoom function gesture performance are worst than before.
It takes around 500ms delay for the map to start the zoom after the gesture. It was not the case before ( tested with nexus5x and galaxyS5 ). Moreover I am no more able to completely zoom out. At some point I am blocked and I need to start a new gesture to zoom out again.
Same issue regqrding the delay with the 5.2.0-SNAPSHOT. (but less delay - around 200ms);
Edit: The zoom seems not blocked with the snapshot version.
The zoom level is blocked at some point with a single gesture on the snapshot version too.
Using the same devices with the mapbox demo app (version 5.1.3) I get no delay at all during the gesture.
However, regarding this closed issue #9413, it's definitely better. I can now zoom and drag at the same time ;)
Thank you for writing up this ticket @paulVulog. First want to clarify there isn't any difference in the gesture performance (in which I mean the time needed to execute a gesture). The difference you are noticing is the change in touch slop (the barrier the touch interaction need to cross before executing the gesture). The code related to this can be found here. I'm unable to revert that value back to half as this wasn't working correctly with the issue the PR was solving. I'm now looking into finding a value in between that provides a better UX for the issue in OP + that works well with the issue #10026 was solving.
@paulVulog re. the zoom level is blocked at some point with a single gesture on the snapshot version too. I haven't been able to reproduce this, can you share the steps needed to reproduce it?
for the first issue (delay) I don't know if the snapshot already contains the last fix, but it's definitely better than the 5.1.4 version. (the delay is now acceptable !)
For the second issue, here are my findings (version 5.1.4 -> Nexus 5x (Oreo)):
First, let's split the zoom behavior in three gestures :
The Pinch gesture (Pinch to zoom out and Pinch out to zoom in)
The Tap & Drag gesture (drag down to zoom in and up to zoom out)
1 - The Tap & Drag gesture :
The result is perfect. below is a log during the gesture:
11:55:13.283 / MapboxMap.setOnCameraMoveStartedListener() / zoom = 11,000000
11:55:17.848 / MapboxMap.setOnCameraIdleListener() / zoom = 7,229478
2 - The Double Tap
The first gesture return:
14:12:25.370 / MapboxMap.setOnCameraMoveStartedListener() / zoom = 12,635269
14:12:25.686 / MapboxMap.setOnCameraIdleListener() / zoom = 12,001105
Then, successive Double Tap gesture don't trigger the methods (no logs) but perform the map zoom out in the MapView.
So it looks perfect in the UI but the methods workflow is broken.
3 - The Pinch gesture
I think I understand what's appends. It seems that if my two fingers are too close:
the gesture does not start in case of pinch out (zoom in)
the gesture stop (idle) unexpectedly in case of pinch (zoom out)
The two fingers need to be about 400 pixels distance (on my nexus 5x) to work properly. (It is definitely a lot !)
-> You can reproduce it using the MapBox demo app (5.1.3)
Just open a mep activity, zoom in starting with your two fingers glued together or zoom out until your fingers are glued.
You will notice that the gesture is blocked at some points.
Having fingers close isn't an issue with the SDK but with the Android scale gesture detector: I looked into this here in case you are interested in the additional background.
@paulVulog : could you please add steps for a reproducible test for The zoom level is blocked at some point with a single gesture. I haven't been able to reproduce this and would love to get this resolved so we can ship a fix with 5.1.5.
Regarding the Double tap gesture, I was not clear enough.
The Double Tap to zoom in works fine ( one finger gesture )
However, the gesture to zoom out ( double tap with two fingers ) is not working as expected and the camera callback doesn't return the camera changes.
Activity
tobrun commentedon Oct 5, 2017
Thank you for writing up this ticket @paulVulog. First want to clarify there isn't any difference in the gesture performance (in which I mean the time needed to execute a gesture). The difference you are noticing is the change in touch slop (the barrier the touch interaction need to cross before executing the gesture). The code related to this can be found here. I'm unable to revert that value back to half as this wasn't working correctly with the issue the PR was solving. I'm now looking into finding a value in between that provides a better UX for the issue in OP + that works well with the issue #10026 was solving.
tobrun commentedon Oct 5, 2017
in #10134 I have fine tuned the gesture variables. Are you able to test this? Once merged, this will be available in the 5.2.0-SNAPSHOT build.
tobrun commentedon Oct 5, 2017
@paulVulog re.
the zoom level is blocked at some point with a single gesture on the snapshot version too.I haven't been able to reproduce this, can you share the steps needed to reproduce it?paulVulog commentedon Oct 6, 2017
Hi @tobrun,
for the first issue (delay) I don't know if the snapshot already contains the last fix, but it's definitely better than the 5.1.4 version. (the delay is now acceptable !)
For the second issue, here are my findings (version 5.1.4 -> Nexus 5x (Oreo)):
First, let's split the zoom behavior in three gestures :
I will link my findings to the three listeners :
1 - The Tap & Drag gesture :
The result is perfect. below is a log during the gesture:
11:55:13.283 / MapboxMap.setOnCameraMoveStartedListener() / zoom = 11,000000
11:55:17.848 / MapboxMap.setOnCameraIdleListener() / zoom = 7,229478
2 - The Double Tap
The first gesture return:
14:12:25.370 / MapboxMap.setOnCameraMoveStartedListener() / zoom = 12,635269
14:12:25.686 / MapboxMap.setOnCameraIdleListener() / zoom = 12,001105
Then, successive Double Tap gesture don't trigger the methods (no logs) but perform the map zoom out in the MapView.
So it looks perfect in the UI but the methods workflow is broken.
3 - The Pinch gesture
I think I understand what's appends. It seems that if my two fingers are too close:
The two fingers need to be about 400 pixels distance (on my nexus 5x) to work properly. (It is definitely a lot !)
-> You can reproduce it using the MapBox demo app (5.1.3)
Just open a mep activity, zoom in starting with your two fingers glued together or zoom out until your fingers are glued.
You will notice that the gesture is blocked at some points.
paulVulog commentedon Oct 23, 2017
Hi !
any update @tobrun ?
tobrun commentedon Oct 24, 2017
Sorry for the delay on this.
re.
@paulVulog : could you please add steps for a reproducible test for
The zoom level is blocked at some point with a single gesture. I haven't been able to reproduce this and would love to get this resolved so we can ship a fix with 5.1.5.paulVulog commentedon Oct 24, 2017
Hi @tobrun,
Regarding the pinch gesture issue, this is exactly what you are targetting : #8403
This is what I call :
So at the end it is an Android issue and we can do almost nothing :(
Works fine on Android before Nougat.
https://issuetracker.google.com/issues/37131665
Regarding the Double tap gesture, I was not clear enough.
The Double Tap to zoom in works fine ( one finger gesture )
However, the gesture to zoom out ( double tap with two fingers ) is not working as expected and the camera callback doesn't return the camera changes.
Let me know if I am not clear enough.
Thanks !
tobrun commentedon Oct 24, 2017
@paulVulog thank you for the clarification, for the 5.2.0 release the double tap zoom out doesn't seem to be broken:
Will look into reproducing with the 5.1.4 codebase.
tobrun commentedon Oct 24, 2017
With the 5.1.4 codebase I'm seeing output as:
So this indicates to me that everything is working as expected.
We are currently working on something else related to gestures (adding velocity), feel free to look into the PR here and provide feedback.
Long term goal is to rewrite gestures from scratch in #10016.
Thank you for reaching out but closing as not reproducible or not actionable (scalegesturedetector issue).