Android Question Google Maps

Andrew (Digitwell)

Well-Known Member
Licensed User
Longtime User
This is in the main program, I just carelessly transferred it to the example.

For the same reason :)

Никогда не использовал его раньше. Подскажите пожалуйста, как это сделать правильно.
Спасибо за участие и советы!
there example of timers in the B4X manual
 
Upvote 0

Sergey_New

Well-Known Member
Licensed User
Longtime User
I made an example using a timer (MyLocation). I conduct a survey every second, everything is fine.
I tried using ResumableSub (MyLocation2).
Works only when in debug mode if you create a breakpoint on the line
B4X:
If gmap.MyLocation.IsInitialized Then
Applying a delay doesn't help. What am I doing wrong?
 

Attachments

  • MyLocation.zip
    4 KB · Views: 4
  • MyLocation2.zip
    4 KB · Views: 5
Upvote 0

Andrew (Digitwell)

Well-Known Member
Licensed User
Longtime User
The time only needs to be initialized once the

I think that your problem is that it is taking a while for your GPS to get a fix. Just waiting for 200ms may not be enough.
I would suggest that you add a log instead of reinitializing the timer, which is unnecessary.
That will tell you how many times the timer ticked before the location was available.

With the Wait for you only check once and if the location is not available then you stop. So that is the key difference.
 
Upvote 0
Top