I am trying to get a fix on mobile devices, of course if they agree to their location to be given out.
Just like some websites ask if my pc's location can be given out. But when I allow my pc's location it always shows a location in London, being my ISP, which must mean that the location is got using my IP address.
check out this doc: http://dev.w3.org/geo/api/spec-source.html
and here's nice demo with sources on github: http://html5demos.com/geo
yes it's that simple. paste it INSIDE document's body and open ;)
document.writeln('accuracy: ' + data.coords.accuracy + '<br />');
document.writeln('altitude: ' + data.coords.altitude + '<br />');
document.writeln('altitude accuracy: ' + data.coords.altitudeAccuracy + '<br />');
document.writeln('heading: ' + data.coords.heading + '<br />');
document.writeln('latitude: ' + data.coords.latitude + '<br />');
document.writeln('longitude: ' + data.coords.longitude + '<br />');
document.writeln('speed: ' + data.coords.speed + '<br />');
document.writeln('timestamp: ' + data.timestamp);