Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Next you want to enhance your PhoneGap app to do some of the things your mobile app can do and some of the things it can't do, such as access your phone's camera.
Note You might want to target your iPhone or iPad device when you try these as the simulator might give you errors.
PhoneGap uses the same objects as Mobile Safari; there's no need to change any syntax as PhoneGap just overrides these functions to call native code.
function testGeo( {
navigator.geolocation.getCurrentPosition(geoSuccess, allError);
}
function geoSuccess(position) {
alert('Latitude: ' + position.coords.latitude + '\n' +
'Longitude: ' + position.coords.longitude + '\n' +
'Altitude: ' + position.coords.altitude + '\n' +
'Accuracy: ' + position.coords.accuracy + '\n' +
'Altitude Accuracy: ' + position.coords.altitudeAccuracy + '\n' +
'Heading: ' + position.coords.heading + '\n' +
'Speed: ' + position.coords.speed + '\n' +
'Timestamp: ' + new Date(position.timestamp) + '\n');
}