HOW TO: Display a button based on user location

Hey guys,

I’m building this app for a restaurant and I want to display the delivery button only when the user is within a certain radius from the restaurant.

Is there a way to make this happen?

1 Like

Create a distance column and add a visibility condition if the distance is less than whatever value you choose.

Is there a specific tab sheet that needs to host this column?

No, it’s a column type. Just create it in your restaurant sheet and point it to the address of the restaurant and the user’s current location.

https://docs.glideapps.com/all/reference/data-editor/computed-columns/distance-to-location

1 Like

Yeah I did that. but how do I set the condition on the button

https://docs.glideapps.com/all/reference/conditions/component-visibility

You could set the visibility to only show the button if the distance column value is less than 10 for example.

1 Like