On page https://github.com/estebanav/javascript-mobile-desktop-geolocation in the function success_callback the comments on how to get the coordinates should be p.coords.latitude and not p.latitude