How to get directions on iPhone or iPad

Hi, I would like my app to display something like: you are 400 feet northwest.

I am currently using the getDistanceFrom method, but that only gives me legs between two locations.

Thank you for your help.

+3
source share
1 answer

You probably should just use the equations of longitude latitude to calculate the bearing, and then set certain bearing ranges as SW, S, SE, etc.

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

+7
source

Source: https://habr.com/ru/post/1740945/


All Articles