Location of users

Hello everybody.
I want to store a user’s last location in a field in a table and see all user locations. How do I do that? Can you guide me in this direction?

Hello,

I assume your client app is done with UI builder. In there you can get user’s location and store it in the database with an API call.

Here’s a video how to get user’s location:

And one how to save data in the database:

Regards,
Mark


Hi Mark, thank you for your answer. I would, however, like to update a user’s location at a certain time, not to create a location table.

Using the API you can update user’s location at any time in any table.


I tried this option, but it doesn’t work. I keep spinning in a circle … :woozy_face:

Could you please describe that logic using words? Ideally with this format:

  1. Do X
  2. Do Y
    3…
  1. at an interval of 5 sec do this:
  2. set the currentLocation property in Page Data.
  3. Save in the “Livratori(Deliverers)” table to the currentLocation property related to deliveryBoy which is currentUser.

At least that’s what I want to happen …

I do not understand why you are loading table objects…

Well, I want to get the object to update with the new location. I don’t understand something…
Anyway, how should I proceed?

Hi, @Mihaltan_Horea

Correct me, if I misunderstand you. You want to have a user login, and then invoke a method that will determine his current location and update it in the currentLocation column.

Regards,
Marina

I want to store and update at a certain time interval, in the currentLocation in the Users table the current location of a user of each onLine, and then I can see on the map the locations of the users

So? Can someone help me please? :slightly_smiling_face:

You are almost there. I’d recommend simplifying logic for updating the location in the database. Use the “Bulk Update” object where you can specify a query identifying the object you need to update. It will be much simpler codeless logic altogether.


Is that a solution ok?

@Mihaltan_Horea

Using the logic you posted above are you getting the expected result?

Regards, Inna

That would be okay. I also want to attach a label to each marker. How do I do that?

Please clarify what you mean by “label” and “each marker”.

image
I mean an info label for marker

image
and I have a marker at the current location for each user