Success! Looks like we've fixed this one. According to our records the fix was applied for
TOUCH-2804
in
a recent build.
-
[OPEN TOUCH-137] enableHighAccuracy/allowHighAccuracy in GeoLocation
Sencha Touch version tested:
Platform tested against:
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:
Code:
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;
}
});
See this URL for the w3 spec: http://dev.w3.org/geo/api/spec-sourc...#high-accuracy
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.
-
-
2 weeks and not even a tag.
-
How is this fix not a priority?
-
Sencha User
I agree with VinylFox. Please apply the fix.
-
-
Sencha - Engineering Operations
Thank you for reporting this, filed as TOUCH-137
-
Sencha Premium Member
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.
-
Seems that this bug has fallen through the cracks.
This bug still exists in ST 2.x
-
Sencha User
Fixed. Will be in a future version of Sencha Touch 2. Thanks.