How to calculate and display distance from user without exposing members' addresses?

hi Bubblers !

I’ m working on an app and I’d like to calculate and display the distance between the logged in user and the other members.
To calculate the distance between members, I need to use their address. But I don’t want this address to be publicly accessible.
Do you think there is a way to conceal the geographic address of members while using it to calculate the distance between one member and the others? when I use the privacy settings to hide the address, the distance isn’t visible to other members, does anyone have an idea of a workaround ?


Thank you for your help !

I’d love to know more about it, how can we calculate the exact distance between two addresses if we want to keep both addresses or at least one private for the client-side user?
Is there any way to do the calculation server-side maybe?

Any chance you have an idea? @J805 @johnny @mvandrei @Jici

Cheers :beer:

1 Like

Hello @nathan.stern welcome to the community!

Perhaps the way to go is to avoid placing the geo field in the user object. Create a separate data type to hold that geo address, call it “address”, add it to the user as field address of type “address”, and apply privacy rules to that data type.

When you need the geo address for distance calcs just look it up and run them server side (if things do not work in browser due to the privacy rules).


Hey :wave: @vnihoul77, thanks for the ping.

My only thought is to do what other companies do and maybe have another field called approximateLocation. Then update that every minute with something more general. Depending on how aproxímate you want it to be. Just extract the city or something. Then you can expose the city field only and do the distance based off of that. Would that work?

Hope that helps! :blush:


For All Your No-Code Education Needs:

  • One-on-One Tutoring
  • eLearning Hub
  • Video Tutorials

Thank you so much , Carlos !

I’m going to try this promising workaround and tell you if I manage to edit the server-side workflow I need to get the right level of privacy.

1 Like

Sure, it helps a lot ! It will be my back-up plan if I can’t solve my problem throught the first solution !

Thank you Jason !

1 Like

No problem. :blush: Hope you get it working.

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