Once we have determined that the visitor's device has the ability to geolocate via the navigator.geolocation method, the next question is whether or not that information has been retrieved.
navigator.geolocation.getCurrentPosition is the method that will tell used whether or not the geolocation of the visitor has been determined. We will also need to pass an argument to the getCurrentPosition so if successful, it will know what to do next.
Source Code:
http://dragosbogdan.net/html5/basic-g...
Additional Resources:
http://dev.w3.org/geo/api/spec-source...
On this page of the site you can watch the video online (4/6) Implementing geolocation.getCurrentPosition in Script - HTML5 Geolocation with a duration of hours minute second in good quality, which was uploaded by the user Code Cascade 31 October 2012, share the link with friends and acquaintances, this video has already been watched 2,046 times on youtube and it was liked by 5 viewers. Enjoy your viewing!