Accurate compass mobile website
I want to make a compass in the browser (mobile website, NOT native applicaton). The purpose is that you have a button "Save current location to localstorage" and when you click on that button you save the latitude & longitude of the current location in the localstorage of the browser.
Then later when you are for example one kilometre from the location saved in the localstorage (for example on a parking) that you have a compass with an arrow headed to the location in your localstorage.
What I do now is save the location in the localstorage. But I don't now how I can make a compass headed to the location?
Can somebody help me? Give me some good search terms or know if this is even possible?
Thanks in advance!
you have to take new coords and convert the distance differences to an angle.
you can use the slope formula to find the x/y movement ratio, and convert that to an angle.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)