Game Development Reference
In-Depth Information
Although each browser implements this request step slightly differently, especially
with regards to how this notification and request is graphically conveyed to the user,
there is no way for the application to use the geolocation API to forcefully or secretly
collect this piece of information.
function getGeo(position) {
var geo = document.createElement("ul");
var lat = document.createElement("li");
var lon = document.createElement("li");
lat.textContent = "Latitude: " +
position.coords.latitude;
lon.textContent = "Longitude: " +
position.coords.longitude;
geo.appendChild(lat);
geo.appendChild(lon);
document.body.appendChild(geo);
Search WWH ::




Custom Search