navigator.geolocation.getCurrentPosition(onPositionUpdate); function onPositionUpdate(position) { }