4

I am using sencha touch 2 framework to build my app. The problem is i am displaying map in the application, where the pop up window is displaying twice in the ipad. Ideally the location pop up is expected to show once,please can i know any settings is triggering this pop up window twice , or is their any coding changes through sencha touch framework has triggered this occurence.

enter image description here

mahesh
  • 3,067
  • 16
  • 69
  • 127
  • reffer to this http://stackoverflow.com/questions/8967173/ios-why-does-turn-on-location-services-alert-show-twice-upon-startup – hacker Jun 21 '12 at 09:42

2 Answers2

2

I had a similar problem. I found the following info on the phonegap wiki that might help you as well.

http://wiki.phonegap.com/w/page/16494770/FAQ

The interesting part is:

The latest solution for iPhone OS 4.x and PhoneGap 0.9.x is to follow the example of the docs for and add an event listener that waits for the device to be ready, otherwise the native navigator.geolocation is used and you get an alert like this: "var/mobile/Applications/UUID/appname.app/www/index.html" Would Like To Use Your Current Location.

Tommy Strand
  • 1,384
  • 2
  • 14
  • 15
0

Here is the code I used to solve this in PhoneGap 2.1.0 . You can just drop it into your index.js exactly as-is, and put your own code in the myCustomJS() callback handler. It will work in desktop and mobile browsers and within PhoneGap / Cordova apps.

Community
  • 1
  • 1
cobberboy
  • 5,598
  • 2
  • 25
  • 22