Displaying pins on the map within a specified area

Friends, please tell me how to implement the display of labels on the map within a given area?

For example, a user indicates that he needs to see placemarks on the map within a radius of 10 kilometers from his current location …? How to implement this?

You would need to use an API that returns data based on lat/lon values. Once you have the values, you could create a pin for each one.

If you can’t use an API, then you would need to create a data source that has lat/lon values and calculate distances using the haversine formula.

2 Likes

Xano and backendless. Both, offer geoquery capabilities.

If you have lat/long, you can do it yourself. What’s your preference? This is less efficient if you are querying a large dataset.

1 Like

I am making an application that will show a list of users at a distance of 5/10 kilometers from the user.

Those. the logic is like this:

  • the user is authorized in the application, and we get his current coordinates, which we write to the database.
  • our user has the ability to select other users at some distance from himself (for this we use his current location + a list of coordinates of other users.

I am trying to find the optimal solution …

Okay, for that I would use the Haversine formula. It’s a little easier but potentially a little slower to do this using a formula in Google Sheets. I prefer to code it within Thunkable but it’s quite complex to set up the blocks. I’ve done this for an app that finds the closest air quality sensor to the user.

This topic includes some interesting suggestions and also a link to info about the Haversine formula in my post within that topic:

3 Likes

Thanks! I looked at your link - and found an interesting solution to my problem :slight_smile:

3 Likes