Check if Geolocation is supported
If supported, run the getCurrentPosition() method. If not, display a message to the user
If the getCurrentPosition() method is successful, it returns a coordinates object to the function specified in the parameter ( showPosition )
The showPosition() function gets the displays the Latitude and Longitude
The example above is a very basic Geolocation script, with no error handling.