Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

One-finger pinch gesture moves zoom origin in opposite direction #4315

Closed
mourner opened this issue Mar 15, 2016 · 8 comments
Closed

One-finger pinch gesture moves zoom origin in opposite direction #4315

mourner opened this issue Mar 15, 2016 · 8 comments
Labels
bug iOS Mapbox Maps SDK for iOS

Comments

@mourner
Copy link
Member

mourner commented Mar 15, 2016

  • Steps to reproduce: put two fingers on the map and then pinch by moving one of the fingers
  • Expected behavior: geographic locations under both fingers stay approximately the same as the map zooms
  • Actual behavior: the locations are off under the fingers, so it appears to be using an incorrect zoom origin

You can confirm that this is a bug by doing the same in Apple/Google maps — they behave correctly in this case.

I'm not sure whether this is reproducible on Android since I'm only testing on iOS, but it's worth making sure too. cc @bleege

cc @1ec5

@mourner mourner added bug iOS Mapbox Maps SDK for iOS labels Mar 15, 2016
@1ec5
Copy link
Contributor

1ec5 commented Mar 15, 2016

I’m not reproducing this issue in 3.2.0-pre.3. Are you testing on master or on the release-ios-3.2.0-android-4.0.0 branch? Is user tracking enabled? (When the map is tracking the user location, pinching, rotating, and tilting gestures should all be centered around the user dot.)

@mourner
Copy link
Member Author

mourner commented Mar 15, 2016

@1ec5 user tracking disabled, and I'm using the latest Sirius for iOS.

@1ec5
Copy link
Contributor

1ec5 commented Mar 15, 2016

I still can’t reproduce. Can you link to a screen recording? Does it seem to matter what area the map is showing?

@bleege
Copy link
Contributor

bleege commented Mar 22, 2016

Confirming that I'm also not seeing this in the latest TestApp (which is basically Android 4.0.0-beta.2 in #4419 ). Happy to investigate further if a screen recording can be made.

@mourner
Copy link
Member Author

mourner commented Mar 22, 2016

Unfortunately QuickTime iPhone screen recorder doesn't show touches, so it's hard to demonstrate a video where you can see the problem, but it's definitely there. I'm coming to SF next week so I can demonstrate to @1ec5 live.

@1ec5
Copy link
Contributor

1ec5 commented Mar 22, 2016

I can reproduce a discrepancy after all. If you place two fingers on the screen such that they straddle a coordinate on the map, then move one of the fingers outward – not both – then the zoom anchor moves in a direction opposite to how it moves in MapKit and Google Maps. For example, if you place your index finger to the left of a POI and your middle finger to the right of it, then move your middle finger to the right, the POI should move to the right as the map zooms in. Instead, it moves to the left.

Note that this doesn’t reproduce in the OS X SDK because both fingers must be moved in order for a pinch gesture to be recognized on that platform.

@1ec5 1ec5 changed the title Pinch zoom origin is off on iOS Pinch gesture moves zoom origin in opposite direction Mar 22, 2016
@mourner
Copy link
Member Author

mourner commented Mar 22, 2016

@1ec5 exactly, that's what I described in the initial report:

put two fingers on the map and then pinch by moving one of the fingers

@1ec5 1ec5 changed the title Pinch gesture moves zoom origin in opposite direction One-finger pinch gesture moves zoom origin in opposite direction Mar 22, 2016
1ec5 added a commit that referenced this issue Mar 22, 2016
The gesture recognizer only reports the gesture’s current center point, so use the previous center point to anchor the transition.

Fixes #4315.
@friedbunny
Copy link
Contributor

Fixed by #4427, which will be in v3.2.0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug iOS Mapbox Maps SDK for iOS
Projects
None yet
Development

No branches or pull requests

4 participants