-
14 Apr 2011 4:20 PM #1
[OPEN TOUCH-137] enableHighAccuracy/allowHighAccuracy in GeoLocation
[OPEN TOUCH-137] enableHighAccuracy/allowHighAccuracy in GeoLocation
Sencha Touch version tested:
- 1.1
Platform tested against:- Android 2.2 (PhoneGap)
Description:- The setting used to enable high accuracy (GPS based) geolocation was changed in 0.99 release to be 'allowHighAccuracy' instead of the standardized 'enableHighAccuracy' property that is defined in the w3c spec. This typo makes it impossible to get a GPS based location update when using PhoneGap, since PhoneGap follows the specifications exactly and will not access the GPS for a location unless 'enableHighAccuracy' is set to true. The change was made in the 0.99 release and has been that way ever since. The following override fixes this problem - I just made the minimal change to get it working, but you might consider fixing the name of the property as it's used in the GeoLocation configuration to match the standard 'enableHighAccuracy' property.
Fix:
See this URL for the w3 spec: http://dev.w3.org/geo/api/spec-sourc...#high-accuracyCode:Ext.override(Ext.util.GeoLocation,{ parseOptions: function(){ var ret = { maximumAge: this.maximumAge, enableHighAccuracy: this.allowHighAccuracy }; //Google doesn't like Infinity if(this.timeout !== Infinity){ ret.timeout = this.timeout; } return ret; } });
My Git repo is all messed up right now, so I can't commit this change myself, hopefully someone else can take care of it for me.-Shea
My Blog:VinylFox | Twitter:@VinylFox | JavaScript Magazine:JSMag | Curator of the Baltimore/DC JavaScript Meetup | Author: Learning ExtJS 3.x Book
ExtJS Extensions & Plugins: GMapPanel UX | HtmlEditor Buttons Plugin | Selection Enabler Plugin | Grid DataDrop Plugin | Additional Ext.Fx
Sencha Touch Plugins: Swipe Tabs | List Pull Refresh | Accelerometer Tabs
-
20 Apr 2011 6:55 AM #2
Bump
-Shea
My Blog:VinylFox | Twitter:@VinylFox | JavaScript Magazine:JSMag | Curator of the Baltimore/DC JavaScript Meetup | Author: Learning ExtJS 3.x Book
ExtJS Extensions & Plugins: GMapPanel UX | HtmlEditor Buttons Plugin | Selection Enabler Plugin | Grid DataDrop Plugin | Additional Ext.Fx
Sencha Touch Plugins: Swipe Tabs | List Pull Refresh | Accelerometer Tabs
-
27 Apr 2011 5:50 AM #3
2 weeks and not even a tag.
-Shea
My Blog:VinylFox | Twitter:@VinylFox | JavaScript Magazine:JSMag | Curator of the Baltimore/DC JavaScript Meetup | Author: Learning ExtJS 3.x Book
ExtJS Extensions & Plugins: GMapPanel UX | HtmlEditor Buttons Plugin | Selection Enabler Plugin | Grid DataDrop Plugin | Additional Ext.Fx
Sencha Touch Plugins: Swipe Tabs | List Pull Refresh | Accelerometer Tabs
-
4 May 2011 2:53 AM #4
How is this fix not a priority?
-Shea
My Blog:VinylFox | Twitter:@VinylFox | JavaScript Magazine:JSMag | Curator of the Baltimore/DC JavaScript Meetup | Author: Learning ExtJS 3.x Book
ExtJS Extensions & Plugins: GMapPanel UX | HtmlEditor Buttons Plugin | Selection Enabler Plugin | Grid DataDrop Plugin | Additional Ext.Fx
Sencha Touch Plugins: Swipe Tabs | List Pull Refresh | Accelerometer Tabs
-
4 May 2011 7:18 AM #5
I agree with VinylFox. Please apply the fix.
-
5 Jun 2011 4:38 AM #6
*bump*
-Shea
My Blog:VinylFox | Twitter:@VinylFox | JavaScript Magazine:JSMag | Curator of the Baltimore/DC JavaScript Meetup | Author: Learning ExtJS 3.x Book
ExtJS Extensions & Plugins: GMapPanel UX | HtmlEditor Buttons Plugin | Selection Enabler Plugin | Grid DataDrop Plugin | Additional Ext.Fx
Sencha Touch Plugins: Swipe Tabs | List Pull Refresh | Accelerometer Tabs
-
5 Jun 2011 7:23 AM #7
Thank you for reporting this, filed as TOUCH-137
-
12 Oct 2011 6:48 AM #8
I have encountered this same issue. We were working on an application and wanted the application to use a higher accuracy GPS if it was available. After digging in the source we saw the issue that @VinylFox has stated here. After changing the #Sencha source the GPS functionality improved dramatically.
-
12 Oct 2011 6:57 AM #9
Seems that this bug has fallen through the cracks.
This bug still exists in ST 2.x-Shea
My Blog:VinylFox | Twitter:@VinylFox | JavaScript Magazine:JSMag | Curator of the Baltimore/DC JavaScript Meetup | Author: Learning ExtJS 3.x Book
ExtJS Extensions & Plugins: GMapPanel UX | HtmlEditor Buttons Plugin | Selection Enabler Plugin | Grid DataDrop Plugin | Additional Ext.Fx
Sencha Touch Plugins: Swipe Tabs | List Pull Refresh | Accelerometer Tabs
-
19 Apr 2012 2:58 PM #10
Fixed. Will be in a future version of Sencha Touch 2. Thanks.
Sencha Inc.
Robert Dougan - @rdougan
Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.
Success! Looks like we've fixed this one. According to our records the fix was applied for
TOUCH-2804
in
a recent build.
Similar Threads
-
Issue with Android geolocation...
By JoshAAiM in forum Sencha Touch 1.x: DiscussionReplies: 2Last Post: 3 Jul 2011, 4:41 AM -
Ext.Map with geolocation problem
By NitrOuS in forum Sencha Touch 1.x: DiscussionReplies: 6Last Post: 19 Jan 2011, 1:04 PM -
Phonegap and geolocation?
By johnwards in forum Sencha Touch 1.x: DiscussionReplies: 3Last Post: 14 Nov 2010, 3:41 PM -
Ext.util.GeoLocation and .99
By xnakxx in forum Sencha Touch 1.x: DiscussionReplies: 9Last Post: 5 Nov 2010, 1:31 PM




Reply With Quote