School bus app help needed

Hi I’m trying to make the below school bus app but just can’t make it work. Can anyone help me here? I’m new to Python and Anvil Works

Hi @yeeping50,

I think you might need to be a bit more specific about what you need help with.
What’s not working and what have you tried?

here’s a guide on how to ask a good question

2 Likes

Hi!

After looking at your code, i can see that you rely on navigator.geolocation.getCurrentPosition() in browser.
Ofc i dont know your main goal for the application, but personally, i would not rely on the browser to report GPS data. I would use dedicated hardware to report GPS data to anvil - preferably you can setup a api endpoint in anvil in order to receive GPS data.

Fyi
I have made a fleet tracking application for industrial trucks (sadly not with anvil) and we used either Teltonika Routers or Rapsberry Pi’s to report GPS data to a server.

Good luck your app :slight_smile:

1 Like

I’m curious, what’s wrong with a browser? What about a native phone app reporting it?

Its not wrong, dont get me wrong :slight_smile: - but i dont find it reliable to report GPS data 24/7 using web browser on a phone.

A dedicated/native mobile app would be ok i guess, especially for proof of concept or homelab.

Perhaps i have bad experience with android and especially ios devices - they always tend to have some sort of power saving feature that mess things up :slight_smile:

Thats why i recommend dedicated hardware like raspberry pi - they are pretty cheap and you also have full control over the device.

1 Like