Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 

 2 Answer(s)

  • You can use watchPosition of geolocation API of HTML5. Which continuously watches the users location.

    <script> var x = document.getElementById("demoDiv"); if (navigator.geolocation) { navigator.geolocation.watchPosition(showPosition); } else { x.innerHTML = "Geolocation is not supported by this browser."; } function showPosition(position) { x.innerHTML = "Latitude: " + position.coords.latitude + "
    Longitude: " + position.coords.longitude; } </script>

    Find more info here

  • Are you talking about geolocation?

    The geolocation API allows the user to provide their location to web applications. You can get user lat & long and update it via background call (AJAX).

    Reference: https://developer.mozilla.org/en-US/docs/Web/API/Geolocation/Using_geolocation

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: