unable to cope with the asynchronous nature of navigator.geolocation.
- by Raja
Hi all
I'm using the navigator.geolocation.getCurrentPosition(function) api in firefox 3.6. When i try to call this method repeatedly I see that sometimes it works and sometimes it doesn't. I figured that the problem is because of its asynchronous callback nature. I can see that the callback function is being called at some point but my outer function is already exiting so i cannot catch the values of the position coordinates.
I'm pretty new to javascript so i'm assuming other javascript coders might have already figured out how to deal with it. Please help.
Thanks