-
Notifications
You must be signed in to change notification settings - Fork 944
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@turf/rhumb-destination issue at 180th meridian #770
Comments
@DenisCarriere out of curiosity, what does this mean? What tasks? |
Those 3 of 3 tasks show up when you add bullets/lists in your first comment for PRs & Issues.
|
👍 This issue, also this will help calculating distances using both Rhumb Line & Haversine formulas. |
Shall I create a new PR like |
Submitting a new PR is useful to contain all edits related to a specific issue or a new feature. No need to create a new issue. Issues are used as references, something you point your PR to or simply add all the details of the issue in the PR itself. You've already identified the 180th meridian issue here, just reference your PR to this issue since it's practically the same thing. Major ReleaseWe might want to consider doing a breaking change (Major release) for |
The 180th meridian problem
When
rhumb-destination
crosses the 180th meridian from east to west, for example from anorigin
with negative longitude (i.e. -179.5) to a destinationpoint
100 kilometers west of it, it returns a positive longitude for thedestination
, which is generally interpreted by the Map (i.e. Bing/Google) as a point at the other side of the map.Example:
Current output:
//= [ 179.56205350889832, -16.5]
Solution
A quick solution that works for most Web Mercator Maps is to return a longitude value greater than 180 degrees.
Correct/expected output:
//= [-180.4379464911, -16.5]
The text was updated successfully, but these errors were encountered: