Search code examples
androidlatitude-longitudegoogle-maps-api-2direction

Directions between points on map?


I need any help in finding directions between path point

the problem is i can find bearing, distance and angles between points this page helped me a lot i have the latitude and longitude of each point on the route

http://www.movable-type.co.uk/scripts/latlong.html

but i want to know how to tell user to turn "left" or turn "right" using these equations if anyone used same functionality in any language just tell me


Solution

  • Assuming 0 degrees is going forward, 180 degrees is going backward, and the angles go clockwise from 0 to 360 degrees.

    340 - 20:  Continue forward
    20 - 60:   Turn slightly right    
    60 - 120:  Turn right
    120 - 160: Turn sharply right
    160 - 200: Turn around
    200 - 240: Turn sharply left
    240 - 300: Turn left
    300 - 340: Turn slightly left