Geometry library: computeHeading does not work as documented
129 views
Skip to first unread message
Joseph Elfelt
unread,
Jul 7, 2012, 10:16:19 AM7/7/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to google-map...@googlegroups.com
If you use the computeHeading feature of the geometry library, then you should be aware that it does not work as described in the documentation. The documentation for computeHeading states: "Returns the heading (expressed in degrees clockwise from north) from one LatLng to another LatLng."
However, instead of returning bearings in the range 180 to 360, computeHeading uses counterclockwise rotation and returns bearings in the range *minus* 180 to zero.
Personally, I do not care how it works as long as the workings and documentation are consistent. After all, I can code for it either way.