ios - Google maps api directions JSON output get parameter of compass? -
i'm working on new app in ios dev need using google maps api. read google maps api web services,json , there outputs parameters:"route","legs","step",etc. in app have 1 leg (no waypoints) , x steps & each step calculate compass angle - not in true time (getheading() or something). say, getting angle (clockwise north) in point of view of specific step , use later goal.
so how compass parameter in json output? worng exp:
{ "staus":"ok", "routes": [{ .... "legs":[{ "steps":[{... "start_location": "end_location": /*------------------------*\ ??? "compass_angle": ??? /*------------------------*\ ]} ]} ]} }
you use formula here calculate initial bearing between 2 coordinates:
Comments
Post a Comment