-
4 Nov 2010 1:47 PM #1
Ext.util.GeoLocation and .99
Ext.util.GeoLocation and .99
using virtually the same code as in the docs, the location is never being prompted for.
also the "message" var is returned as "Result of expression".
any idea's or updated docs?Code:var geo = new Ext.util.GeoLocation({ autoUpdate: false, listeners: { locationupdate: function (geo) { alert('New latitude: ' + geo.latitude); }, locationerror: function (geo, bTimeout, bPermissionDenied, bLocationUnavailable, message) { if (bTimeout) { Ext.Msg.alert(message, 'Oh noes! Your device has not reported back a location in a timley mannor . Doing search based off of our Home Office.', Ext.emptyFn); } else if (bPermissionDenied) { Ext.Msg.alert(message, 'Oh noes! Access to your location has been denied. Doing search based off of our Home Office.', Ext.emptyFn); }else if (bLocationUnavailable) { Ext.Msg.alert(message, 'Oh noes! We are unable to determin your location. Doing search based off of our Home Office.', Ext.emptyFn); } else { Ext.Msg.alert(message, 'Oh noes! We couldn\'t find you. Doing search based off of our Home Office.', Ext.emptyFn); } } } });
-
4 Nov 2010 3:28 PM #2
autoUpdate is off. Are you invoking updateLocation?
Aaron Conran
@aconran
Sencha Architect Development Team
-
4 Nov 2010 3:37 PM #3
I'm sorry.
yes i am calling a geo.updateLocation() in the main panel's beforeshow
same code worked in .98
only diffence that i can remember making is the Ext.lib.Container.prototype.bubbleEvents = []; you had me add to address another issue.
-
4 Nov 2010 3:39 PM #4
Hrm any more information? I did a trivial example plus verified its working in GeoCongress.
Aaron Conran
@aconran
Sencha Architect Development Team
-
4 Nov 2010 3:39 PM #5
even if autoupdate was turned off, would that automatically call the locationerror:bLocationUnavailable?
i should of mentioned that this is what happens
-
4 Nov 2010 3:40 PM #6
ill get my dev app online. and post here.
-
4 Nov 2010 3:55 PM #7
I'm sorry I only have my phone rt now so hacking together a sample would be kinda cumbersome.
Http://apps.PMZ.com/mobile/test-mobile
Search-->nearby
The nearby.js has the relevant code.
As u can see it errors out without prompting.
Any help would be appreciated.
-
5 Nov 2010 11:44 AM #8
got it.
if i instantiate the GeoLocation object in my Ext.Setup as opposed to in the included js it works.
donno why but it works.
-
5 Nov 2010 11:59 AM #9
Ext.setup and onReady wait until the dom is ready. This needs to happen to interact with the geolocation object. Happy that you got this working
Aaron Conran
@aconran
Sencha Architect Development Team
-
5 Nov 2010 1:31 PM #10
same here. one of my last hurtles moving to .99
if ur going to the SenchaCon, hit me up i owe ya a beer
Similar Threads
-
Geolocation issue when app saved to homescreen on iPhone
By MrNibbles in forum Sencha Touch 1.x: DiscussionReplies: 9Last Post: 8 Jan 2012, 11:56 PM -
Ext.util.GeoLocation is not working
By gmanraj in forum Sencha Touch 1.x: DiscussionReplies: 11Last Post: 26 Oct 2010, 4:42 PM -
Geolocation working on Android? Timeline on release for camera access
By olin in forum Sencha Touch 1.x: DiscussionReplies: 0Last Post: 10 Aug 2010, 12:32 AM -
Ext.util.GeoLocation tweeking
By crp_spaeth in forum Sencha Touch 1.x: DiscussionReplies: 3Last Post: 17 Jun 2010, 5:23 AM


Reply With Quote