Asynchronous geolocation

Is there a way to get geolocation data asynchronously?  The implementation of the HTML5 method navigator.geolocation.getCurrentPosition() seems to be blocking in RhoE 1.0.3.11, which deems it unusable in my application, and I would expect the same to be true for most applications that require regular location updates and a responsive user interface.

If I'm wrong about the current implementation, please let me know.  This is going to become a major decision point soon if I can't work out a solution.  If it is something that is planned for a future release, or will never be available for some reason, that would be very useful information as well.

Robin West
Check out the RhoMobile docs
Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Dave Causey
Thanks for that info.  I'm

Thanks for that info.  I'm still trying hard to understand why a simple JavaScript API (like the HTML5 standard) would be out of the question.  Is there a JavaScript API provided by rhogeolocation-wm.js, or maybe some reference for using the AJAX call directly?

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Robert Galvin
DaveHave you tried using

Dave

Have you tried using WebWorkers to get the location? http://www.html5rocks.com/en/tutorials/workers/basics/

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Dave Causey
Not yet, but it's worth a try

Not yet, but it's worth a try.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Dave Causey
Ok, I finally spent some time

Ok, I finally spent some time investigating this and have not been able to get it to work.  The navigator.geolocation reference is not accessible (null) within a worker thread.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Log in to post comments