First we add a the $(document).ready() function to the beginning of our script
Next, we add the code that will instruct the browser to get the current location
The getCurrentPosition(successCallback, failureCallback) function instructs the browser to retrieve the current location. It accepts 2 parameters: the success callback and the error callback. See code below for details.
latitude, longitude, altitude, accuracy, altitudeAccuracy, heading, and speed. Once the success function is called, it is up to you to do whatever you like with the data.

No comments:
Post a Comment