Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Here is the link for the geolocation sample in Windows 8: <a href="http://code.msdn.microsoft.com/windowsapps/Geolocation-2483de66" rel="nofollow noreferrer">Windows 8 Geolocation Sample</a></p> <p>You can check the samples in C#, JavaScript, and C++. Below is the specific part where it shows the latitude and longitude in JavaScript. You can find the corresponding in C++/C# by browsing through the code samples:</p> <p><strong>JavaScript</strong></p> <pre><code>function getPositionHandler(pos) { document.getElementById('latitude').innerHTML = pos.coordinate.latitude; document.getElementById('longitude').innerHTML = pos.coordinate.longitude; document.getElementById('accuracy').innerHTML = pos.coordinate.accuracy; document.getElementById('geolocatorStatus').innerHTML = getStatusString(loc.locationStatus); } </code></pre> <p>Regarding location of Trafalgar Square, I'm sure Bing Maps API or Google Maps API, or any Maps API will help in finding the specific longitude and latitude.</p> <p>I also suggest you take a look at this StackOverflow post regarding longi/latitude: <a href="https://stackoverflow.com/questions/8914580/get-users-location-latitude-longitude-with-bing-or-google-maps-api">Link</a></p> <p>I also have given a link for a code snippet to find lat/long using Google Maps API: <a href="http://aspsnippets.com/Articles/Google-Maps-API-V3-Get-Latitude-and-Longitude-of-a-location-from-Address-using-JavaScript.aspx" rel="nofollow noreferrer">Link</a></p> <p>To parse the direction, you might have to write your own function, which shouldn't be too difficult.</p> <p>Hope this helps in your app development!</p> <p><strong>Edit</strong>: I have also attached two links for determining distance and bearing with two latitudes. They are both pretty much the same: <a href="http://www.yourhomenow.com/house/haversine.html" rel="nofollow noreferrer">Link 1</a>, <a href="http://www.movable-type.co.uk/scripts/latlong.html" rel="nofollow noreferrer">Link 2</a>. They explain the concepts very well.</p> <p><strong>Second Edit</strong>: Did you catch your pun? >> <em>How on <strong>earth</strong> do I get access to the tablet's location to then calculate where it is, relative to that location?</em></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload