Angles on Google Maps

4,260 views
Skip to first unread message

dr. Turtev

unread,
Jan 5, 2011, 10:42:06 AM1/5/11
to google-map...@googlegroups.com
Hello everyone,
I am new here so please excuse me if I do something wrong.
I need some help of you folks. I have C# desktop app that uses Google Maps. I have two points (with GPS coordinates) and a line between them. What I can't figure how to do is how can I draw line (beam) that starts from one of these points and is at some angle from the first line. The problem is that I don't have any points for the second line - only the starting point. I don't care how long will be the second line - it can be just a beam.

Thanks and best regards!

Andrew Leach

unread,
Jan 5, 2011, 11:04:24 AM1/5/11
to google-map...@googlegroups.com

dr. Turtev

unread,
Jan 5, 2011, 11:23:24 AM1/5/11
to google-map...@googlegroups.com
Thanks a lot, man! I think this is what I need.

geoco...@gmail.com

unread,
Jan 5, 2011, 11:25:22 AM1/5/11
to Google Maps JavaScript API v3
Try computeOffset() in the Geometry Library:
http://code.google.com/apis/maps/documentation/javascript/geometry.html#Navigation

+ Given a particular heading, an origin location, and the distance to
travel (in meters), you can calculate the
+ destination coordinates using computeOffset().

-- Larry

dr. Turtev

unread,
Jan 5, 2011, 5:43:21 PM1/5/11
to google-map...@googlegroups.com
I made several functions to do the job based on the formulas here:
http://www.movable-type.co.uk/scripts/latlong.html
... and everything is working perfectly :)

Best regards!
Reply all
Reply to author
Forward
0 new messages