We have built a simple front-end application where you can see the data on a map.
We also have a back-end AWS Lamda function that is connecting to the Real-Time Locations API and upserting into a Hosted Feature Layer in ArcGIS Online.
Our first observation is that it looks like we have too many vehicles to what we would expect.
Is this something we have done wrong on our side, or at the API end?
- Poll every 30 seconds the API
- Using Vehicle_ID as unique field
- Checking for duplicates on the API responses
- Upserting into the Esri layer
- Every minute we check for any records older than 1 minute and delete
We initially spotted that vehicle_id is not always unique. In one request, often getting a number of duplicates with different timestamps, but same vehicle_id.
We also spotted that sometimes the vehicle_id sends through a really long string. Is this expected?
label: "06:28 Perth Station to Central Station "