Your browser lacks required capabilities. Please upgrade it or switch to another to continue.
Loading…
<<linkreplace "Ask for permission">>
<<script>>
State.variables.geoLocationAvailable = window.geolocation.available();
if(window.geolocation.available()) {
State.variables.location = window.geolocation.getLocation();
}
<</script>>
[[Show results]]
<</linkreplace>>
<<script>>
State.variables.geoLocationAvailable = window.geolocation.available();
if(window.geolocation.available()) {
State.variables.location = window.geolocation.getLocation();
}
<</script>>
Is geolocation available? $geoLocationAvailable
If so, what is the current location?
Latitude: $location.latitude
Longitude: $location.longitude
Are we in the approximate location of Stonehenge (51.1788853, -1.828409)?
<<set $approxLat to window.geolocation.approximateLocation(State.variables.location.latitude, 51.1788853) >>
<<set $approxLong to window.geolocation.approximateLocation(State.variables.location.longitude, -1.828409) >>
Latitude: $approxLat
Longitude: $approxLong