<! Doctype html> <html> <gead> <meta charset = UTF-8> <Title> Compass Example </Title> <Script Type = Text/Javascript Charset = UTF-8 src = Cordova .js> </script> <Script type = Text/Javascript Charset = UTF-8> Document.adDeventListener (DeviceReady, onDeviceReady, FALSE); sitION ();} // Get the current location information function getposition () {navigator.Geolocation.getcurrentposition (onSuccess,onError); } //错误的回调function onError(error) { alert('code:'+error.code+'/n'+'message:'+error.message+'/n'); } // Successful recovery funion onSuccess (POSITION) {Alert ('Latitude:'+Position.coords.latitude+'/N'+'LONGITUDE:'+POSITION.LONGITUDE+'/ '+' Altitude: '+ Position.Coords. Altitude+'/N'+'Accuracy:'+Position.Coords.accuracy+'/N'+'ACCURACY:'+POSITION.COORDS.ALTITUCCUARACY+'/N '+' Heading: '+POSITION.COORDS.HEADING+'/N '+' Speed: '+Position.Coords.Speed+'/N '+' Timestamp: '+New Date (POSITION.TIMESTAMP)+'/N '); on Onclick = getposition ();> Start Watching </Button> </Body> </html>The implementation method of obtaining location information using PhoneGAP above is all the contents of the editor shared with you. I hope to give you a reference, and I hope that everyone will support VEVB Wulin.com.