-
Notifications
You must be signed in to change notification settings - Fork 93
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
Bearing destination #27
Bearing destination #27
Conversation
Thank you for this contribution ! It is documented and tested, well done ! Plus, I think that @kirkau will appreciate it for what he was trying to achieve in Leaflet.TextPath makinacorpus/Leaflet.TextPath#26 I let @fredericbonifas review and merge it. Just in case, please ping us here to get things moving :) |
Hi Mathieu, Thank you for the response, and I'm glad it passed and can be useful. However, before you and @fredericbonifas Chris Veness at http://www.movable-type.co.uk/scripts/latlong.html the Wikipedia pages on spherical geometry, and stackoverflow: http://stackoverflow.com/questions/3932502/calcute-angle-between-two-latitude-longitude-points Maybe, if possible, we should attribute Chris Veness (or even bring him on Thanks, On Mon, May 4, 2015 at 3:28 PM, Mathieu Leplatre [email protected]
|
Thank you for this contribution @doublestranded, merged with pleasure! I think these formulas are well-used in the geographic data utils and therefore require no attribution, but I see no problem in referencing your sources of inspiration in the code. You can provide a pull request to add these references if you want. Thanks again :) |
That's great news, thanks! I will provide another pull request with updated On Mon, May 4, 2015 at 5:02 PM, Frederic Bonifas [email protected]
|
👍 |
I am looking to add these (very useful!) methods: bearing and destination. The 'bearing' method calculates the angle between two lat/lngs using spherical approximation, starting at 0 degrees for due north, and increasing clockwise until 180 degrees south, at which point the values are in the range
-180 <= bearing < 0. For example, due west is -90 degrees. Destination calculates an end lat/lng from a start lat/lng, a heading, and a distance.