venerdì 23 settembre 2011

GET GPS x y

navigator.geolocation.getCurrentPosition(foundLocation, noLocation);

 function foundLocation(position)
 {
   var lat = position.coords.latitude;
   var long = position.coords.longitude;
   alert('Found location: ' + lat + ', ' + long);
 }
 function noLocation()
 {
   alert('Could not find location');
 }

Nessun commento:

Posta un commento