Grabbing longitude and Latitude value from a function
问题 Please how do i get the value of "lat" and "lon" outside their function to use else where on the page. navigator.geolocation.getCurrentPosition(handle_geolocation_query,handle_errors); function handle_errors(error) { switch(error.code) { case error.PERMISSION_DENIED: alert("user did not share geolocation data"); break; case error.POSITION_UNAVAILABLE: alert("could not detect current position"); break; case error.TIMEOUT: alert("retrieving position timed out"); break; default: alert("unknown