I have a list of areas and latitudes / longitudes that I ask the user to choose their location when they get to my site. I would like their location to be pre-populated using HTML5 geolocation if possible, but I'm not quite sure if this is the best way to do this. It seems that there are no tutorials on the Internet, at least from what I can find. Has anyone done this? Do you know a good tutorial / resource?
Update
If I have the coordinates of a bunch of cities, how can I use javascript to determine the closest location?
jquery html5 geolocation
Webnet
source share