My application is in spring-hibernate.I am also using spring mobile for mobile specific design,we want to trace the location of our user on web application so that it shows particular data.How can i get the location of mobile in spring application.Thanks
the code is from w3school:
<script>
var x=document.getElementById("demo");
function getLocation()
{
if (navigator.geolocation)
{
navigator.geolocation.getCurrentPosition(showPosition);
}
else{x.innerHTML="Geolocation is not supported by this browser.";}
}
function showPosition(position)
{
x.innerHTML="Latitude: " + position.coords.latitude +
"<br>Longitude: " + position.coords.longitude;
}
</script>