-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Map jumps from one position to another #4214
Conversation
I was able to
|
👀 @kkaefer |
@brunoabinader, can you add a blurb to the Android and iOS sections of the changelog? Thanks. |
af7ad29
to
ecf8a9f
Compare
ecf8a9f
to
68a262d
Compare
68a262d
to
bbf1366
Compare
I retested but still seeing the issue: |
bbf1366
to
d5ece03
Compare
b13b810
to
5aca28c
Compare
5aca28c
to
bb8b1d4
Compare
bb8b1d4
to
12e9309
Compare
@tobrun I've updated the PR and tested it on GLFW & iOS. Could you please check it on Android? Thanks! |
@brunoabinader yes this issue is no longer reproducible 🙇 |
FWIW I retested #4155 and this is still an issue |
- Make returning LatLngs unwrapped by default. - PointAnnotation and ShapeAnnotation are always wrapped so they can be selected via intersection from the visible tile boundaries. - Fixes LatLng::wrap() calculation. - Fixes LatLng::unwrapForShortestPath() calculation. The new unwrapForShortestPath algorithm unwraps the start coordinate either forwards or backwards depending on the end coordinate value, so we can always cross the antimeridian when needed and still obtain a wrapped end coordinate in the end. Fixes #4214.
vec2<T>::operator bool() checks for NaNs already.
12e9309
to
949ed9e
Compare
If the center and point coordinates are not in the same side of the antimeridian, we need to unwrap the point longitude to make sure it can still be seen from the visible side of the antimeridian that is opposite to the center side. Fixes #4155.
949ed9e
to
1a4b8f3
Compare
@@ -517,7 +527,7 @@ double Transform::getAngle() const { | |||
#pragma mark - Pitch | |||
|
|||
void Transform::setPitch(double pitch, const Duration& duration) { | |||
setPitch(pitch, {NAN, NAN}, duration); | |||
setPitch(pitch, ScreenCoordinate {}, duration); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So if you don’t specify an anchor
for a setPitch()
call, we assume the gesture is anchored in the top-left corner of the view?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we don't specify a valid anchor (by valid I mean an anchor that does not contain any NaN and contains at least one non-zero value on its axis), these are simply not taken in consideration in startTransition()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I originally made the change to rely on NaN for anchors because anchoring at the origin (or somewhere on the top or left side) may be a valid use case. Though it may be difficult to trigger such a transition via a gesture, it may still be possible to do so in the iOS SDK with some combination of edge insets, user location or course tracking, and zooming or rotation gestures. Moreover, it’s only a matter of time before we need to allow arbitrary anchor points for programmatic animations in the mobile SDKs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When panning the map jumps from on location to another.
I'm guessing it's something related to the dateline.
You can see the bug in action here