http://code.coronalabs.com/code/update-gps-every-x-seconds
this code also avoids battery draining for searching your GPS.
http://code.coronalabs.com/code/update-gps-every-x-seconds
this code also avoids battery draining for searching your GPS.
Is there a way to draw a path from point A to point B?
Corona SDK cannot draw lines on top of native.* objects.
This is a very useful thread. Thank you very much for sharing.
Thanks, no problem. Glad it helps.
Is there a way to draw a path from point A to point B?
Corona SDK cannot draw lines on top of native.* objects.
This is a very useful thread. Thank you very much for sharing.
Thanks, no problem. Glad it helps.
Apologies for replying to an inactive thread, but when I test this on my Android phone, I get an error saying :attempt to index local “from” (a nil value). This is from the Calculate Distance function, although it works fine with no errors on Corona viewer. Does anyone know what I’m doing wrong?
There are several blocks of code in the thread and we certainly don’t know how you’ve applied it to your application. What will be really helpful is if you copy/pasted your code here (make sure to use the <> button in the edit bar to paste the code in).
We don’t need your whole app, just the relevant code. When you get the error, you should be getting a line number and a stack trace too. You may have to look in your console log to find it.
We also need to know what version of Corona SDK you’re running and the platform.
Rob
Sorry, I figured it out. The GPS couldn’t get a signal, so just returned nil as the co-ordinates, but failed to print an error message, it’s working fine now.
Apologies for replying to an inactive thread, but when I test this on my Android phone, I get an error saying :attempt to index local “from” (a nil value). This is from the Calculate Distance function, although it works fine with no errors on Corona viewer. Does anyone know what I’m doing wrong?
There are several blocks of code in the thread and we certainly don’t know how you’ve applied it to your application. What will be really helpful is if you copy/pasted your code here (make sure to use the <> button in the edit bar to paste the code in).
We don’t need your whole app, just the relevant code. When you get the error, you should be getting a line number and a stack trace too. You may have to look in your console log to find it.
We also need to know what version of Corona SDK you’re running and the platform.
Rob
Sorry, I figured it out. The GPS couldn’t get a signal, so just returned nil as the co-ordinates, but failed to print an error message, it’s working fine now.