Hi,
I am trying to make a if then for a google map heading to return 0 to
360 degrees, I am reading my first book on this subject and am not
proficient yet.
Something goes wrong obviously, however I do not understand why:
var heading = google.maps.geometry.spherical.computeHeading(path[0],
path[1]); if (heading>0) return Math.round(heading);
else if (heading<=0) return Math.round(360-heading);
return heading;
Thanks for any replies.
--
You received this message because you are subscribed to the Google Groups
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-maps-js-api-v3?hl=en.