Hi,
When I try to get current location (single spot only, not continuous), I found that a single call of following only return (0,0) coordinate. I have tried to use a "for" loop with some "sleep()" inside to get the location, but all failed.
But call of same code in the succeeding events get the current location correctly.
It seems to be that the GPS location collection is available only when triggered in more than one event, which is quite weired..
But according to SDK,
Any advice for this please? Thanks a lot.
When I try to get current location (single spot only, not continuous), I found that a single call of following only return (0,0) coordinate. I have tried to use a "for" loop with some "sleep()" inside to get the location, but all failed.
Code:
[locationManager startUpdatingLocation];
[locationManager stopUpdatingLocation];
[locationManager startUpdatingLocation];
But call of same code in the succeeding events get the current location correctly.
It seems to be that the GPS location collection is available only when triggered in more than one event, which is quite weired..
But according to SDK,
Calling stopUpdatingLocation in between, however, does cause a new initial event to be sent the next time you call this method.
Any advice for this please? Thanks a lot.