Sanal MS
Sanal MS

Reputation: 2504

phonegap Application Location Accessing Issue?

In my phonegap iPhone app, while i am trying to load a html with google maps acces using sencha-touch. A notification shows "/iphone simulator/...../index.html access your Location" . How can i change the html file name to application name?.

Upvotes: 0

Views: 528

Answers (1)

yoheis
yoheis

Reputation: 26

Make sure you are calling "navigator.geolocation.getCurrentPosition" after phonegap initialization is done. So for example:

document.addEventListener('deviceready', function () {
navigator.geolocation.getCurrentPosition(successCallback, errorCallback);
}, false);

If that still doesn't do the trick, try adding a delay.

Upvotes: 1

Related Questions