Hello bubblers, I am building a social network application I am not able to create a feature where a user can see total number of all online users within 100 km of his radius.
Thanks,
There is a built in search constraint when you constrain by a data field that is of geographic location, to constrain by some number of either kilometers or miles.
Do you have data field of geographic location on the user datatype?
No I donāt have
First step. Add a data field of geographic location to the user data type.
Next will we have to update his location , say every 2 mins in the database ???
I guess if you are trying to track the user. I initially thought it was meant to be a āstaticā position in which you can say you store in the DB their āhomeā address or something like that.
Getting to track your users location you can use the ācurrent users locationā feature.
You can only do that when the app is āonlineā you canāt run something in the backend every 2 minutes to find the location. You will just find the location of the AWS Bubble server in Portland !
So run it on page action action instead.
An alternative is to use IP address of the user, and use a plugin to work out approximate location.
This topic was automatically closed after 70 days. New replies are no longer allowed.