This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Wrap coordinates converted from points#4464
Merged
1ec5 merged 1 commit intoMar 25, 2016
Merged
Conversation
Contributor
|
👍 |
fc76689 to
2a56565
Compare
Contributor
Author
|
The Android build failure is #4473. Merging. |
Contributor
|
Looks good, @1ec5! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The release-ios-3.2.0-android-4.0.0 branch includes #4275 but not #4285, meaning that
-[MGLMapView convertPoint:toCoordinateFromView:]and dependent methods return latitudes that aren’t wrapped to ±180°. This change restores the wrapping on an interim basis.@jfirebaugh has made the point that this method shouldn’t wrap anyways, but we don’t want to bump the major version number so close to a release. Although the wrapping isn’t documented anywhere, it’s consistent with MapKit, and it’s very likely that developers have come to rely on this behavior (as has iosapp). We can revisit unwrapping in a future release.
If a developer needs an unwrapped coordinate, they can detect this edge case by comparing the return values of
-[MGLMapView convertPoint:toCoordinateFromView:]for two different points on screen (and accounting for rotation and pitch of course). In fact, this is what-convertRect:toRectToView:does (although that may be dead code due to 63820d1 for #3401)./ref #4444
/cc @brunoabinader @bleege @boundsj