Driver Tracking on Delivery App

Hi Guys,

Hope everyone is doing well. I’m currently mid build for an app for a local takeaway. The idea is to have the ability to track the drivers position on a map similar to uber.

We are currently paying for the Mapbox Map Plugin by Zeroqode.

I am really struggling at being able to make this possible. Ive tried running multiple workflows that when the customer clicks, Track order, the map is visible and then would ideally show the icon of a car on the map. And updated every few seconds… dependent on the drivers location.

I was hoping someone with a bit more knowledge on this than me could reach out and help. I would be much appreciative.

I have added a few screenshots of how i’m set up and what data types etc are involved.





Thank you

I’ve never used that plugin, but your first screenshot says “works in combination with the Add live realtime data action” so it sounds like you need to run that action so the map element triggers an event every X seconds.

Then when the event triggers you update the delivery driver’s location with the element’s current location

Then the end customer just has to have a map showing the delivery driver’s location and Bubble will automatically retrieve the new data as it changes

Also keep in mind your data structure is just overwriting old data, maybe you would want to create a database item Location on each update so you have the location history too

Thank you for this,

ive looked into this, as ive added this im getting this error. It appears to be running something in the background as the load bar keeps going across the screen every couple of seconds.

ive attached a screenshot of this error.



Cheers

Looks like something with the plugin is broken :flushed:

Have you tried running location update workflow(saving current users location to db) every second on delivery drivers page?

Yea the “track this order” button, it seems like it should just be retrieving the driver’s location from the database so the customer can view it.

The map plugin should be on the driver’s device logging the location every X seconds. Whether the plugin is broken or it’s not being used correctly is another story

Hi, thanks for coming back to me on this! So ive had a little look. And i cant seem to find a workflow that updates location?

Can you please assist? I am on the drivers dashboard. In the drivers group.

Thank you!

There’s no update location workflow
You need to use Do every X seconds workflow to save Current users(delivery person) location to database

I have adjusted this. How do i then reference this on the mapbox element on the customers screen as this doesnt seem to work.

This is a seperate map element than on the drivers side.

Cheers

Hey man, any idea on this?

Thank you!

It should be “Current user” in the thing to change input.
Then add location as a field and set value to current users location.

Before any of this, I suggest you to spend sometime in the Academy to learn some imp basics

Hi there,

thank you for coming back to me on this! I have added this. Please see here.

However when im looking at my data, it doesnt seem to be adding the delivery drivers data every 5 seconds?

Thank you

It doesn’t add a new address. It just replaces the address that’s already there

This topic was automatically closed after 70 days. New replies are no longer allowed.