www.webdeveloper.com
Results 1 to 2 of 2

Thread: Accurate compass mobile website

Hybrid View

  1. #1
    Join Date
    May 2013
    Posts
    1

    Accurate compass mobile website

    Hi,

    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!

  2. #2
    Join Date
    Jul 2008
    Location
    urbana, il
    Posts
    2,787
    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles