I am developing a delivery application and I need to calculate the distance between the user and the drivers to assign the closest one
I am using firebase, as follows.,
main tag: “active drivers”
subtag: “delivery_id”
and within the subtag I’m saving the lat/long values, but when I request a delivery person I get all the information together of the subtag and the value
Hi, I can’t see any block about the project bucket.
When user selects a driver you have to change the bucket to show only the information about that driver o only the driver position.
I was already able to obtain the list of active users as I needed and their coordinates, now I have to calculate the distance between driver and user, do you recommend that I save the driver’s location separately lat/lng or save the coordinates as a single value?
Now that is my problem to calculate distances, I can’t figure out the logic.