cordova - Geolocation plugin permission alert on iPhone with PhoneGap -


two time alert show first alert correct second alert generate string use current location.

how change string on alert saying: /var/mobile/applications/157eb70d-4aa7-826e-690f0cbe0f/appname.app/www/index.html

someone having idea?

try use following code on device ready:

document.addeventlistener('deviceready', ondeviceready, false);  function ondeviceready() {    navigator.geolocation.getcurrentposition(onsuccess, onerror); }  function onsuccess(position) {    //retrieve latitude as: alert(position.coords.latitude);    //retrieve longitude as: alert(position.coords.longitude); }  function onerror(error) {    console.log('code: ' + error.code + '\n' + 'message: ' + error.message + '\n'); } 

Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -