# Show a screen when user is closer than x to a point on the map

**URL:** <https://community.glideapps.com/t/show-a-screen-when-user-is-closer-than-x-to-a-point-on-the-map/64452>\
**Category:** Ask for Help\
**Created:** [July 28, 2023, 11:20am UTC](https://community.glideapps.com/t/show-a-screen-when-user-is-closer-than-x-to-a-point-on-the-map/64452 "2023-07-28T11:20:36Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![martintondel](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/martintondel/32/59469_2.png) [@martintondel](https://community.glideapps.com/u/martintondel)\
**Post date:** [July 28, 2023, 11:20am UTC](https://community.glideapps.com/t/show-a-screen-when-user-is-closer-than-x-to-a-point-on-the-map/64452/1 "2023-07-28T11:20:36Z")

</div>

I want to show a screen when a user gets closer than forexample 700m to cordinates registered to an item in the database. The screen should ask the user, a yes or no question. if yes, update the timestamp on the item to “Now” if no delete the item. Or forexample after x amount of users answered no delete the item.

---

<div class="post-metadata">

**Author:** ![Eric\_Penn](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/eric_penn/32/73888_2.png) [@Eric\_Penn](https://community.glideapps.com/u/Eric_Penn)\
**Post date:** [July 28, 2023, 11:45am UTC](https://community.glideapps.com/t/show-a-screen-when-user-is-closer-than-x-to-a-point-on-the-map/64452/2 "2023-07-28T11:45:01Z")

</div>

This column calculates the distance “How the crow flies”

> **[Glide • Distance](https://www.glideapps.com/docs/reference/computed-columns/distance-to-location)**
>
> Calculate the distance between two locations.

This column calculates this distance if you were to travel by road (under calculate distance)

> **[Glide • Radar](https://www.glideapps.com/docs/reference/integrations/radar)**
>
> Get coordinates, auto-complete addresses, and determine distances.

---

<div class="post-metadata">

**Author:** ![martintondel](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/martintondel/32/59469_2.png) [@martintondel](https://community.glideapps.com/u/martintondel)\
**Post date:** [July 28, 2023, 11:47am UTC](https://community.glideapps.com/t/show-a-screen-when-user-is-closer-than-x-to-a-point-on-the-map/64452/3 "2023-07-28T11:47:02Z")

</div>

Yes but for the one made by radar, i need to set an origin. i do not know how to set the origin to the users current position, and ofc it needs to keep updating live.

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [July 28, 2023, 11:58am UTC](https://community.glideapps.com/t/show-a-screen-when-user-is-closer-than-x-to-a-point-on-the-map/64452/4 "2023-07-28T11:58:32Z")

</div>

Would the Distance column not be sufficient enough for what you need? Only difference is that it’s straight line distance, but we are talking about 700m here, so I wouldn’t think distance by road is necessarily important just to use for conditions.

---

<div class="post-metadata">

**Author:** ![martintondel](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/martintondel/32/59469_2.png) [@martintondel](https://community.glideapps.com/u/martintondel)\
**Post date:** [July 28, 2023, 12:02pm UTC](https://community.glideapps.com/t/show-a-screen-when-user-is-closer-than-x-to-a-point-on-the-map/64452/5 "2023-07-28T12:02:34Z")

</div>

The distance Column is what i currently use, and it works fine. The real problem is. How can i show a screen/overlay when a user enters the 700m radius and then let then let them click yes or no to a promt saying something like “was this warning correct?” yes no, if yes update timestamp to “now” if no, delete that item. i also tried to make it so that if there is an item within 1000m, a red blicking card warning them about the item forexample an animal in the road, but i have a problem with that also, since it only works on the item first added to the table. @Jeff_Hager

---

<div class="post-metadata">

**Author:** ![martintondel](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/martintondel/32/59469_2.png) [@martintondel](https://community.glideapps.com/u/martintondel)\
**Post date:** [July 28, 2023, 12:03pm UTC](https://community.glideapps.com/t/show-a-screen-when-user-is-closer-than-x-to-a-point-on-the-map/64452/6 "2023-07-28T12:03:21Z")

</div>

Maybe i could screenshare and show it to you, kind of hard to explain in text haha

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [July 28, 2023, 12:22pm UTC](https://community.glideapps.com/t/show-a-screen-when-user-is-closer-than-x-to-a-point-on-the-map/64452/7 "2023-07-28T12:22:10Z")

</div>

It depends on how your data and screens are structured. Screenshots would definitely be useful, but it sounds like you are making a Google Maps or Waze style app to report hazards on the road to other drivers.

You can’t automatically trigger an action based on the distance changing, so getting an overlay to pop up won’t happen. But an initial thought would be to have a custom collection sourced from the table that contains the distance, but filter it to only show items with a distance less than 0.7km. When you get close enough, those items should show up in the custom collection. Inside the custom collection container, you can add buttons.

Another thought is to have a Query column that finds items with a distance less than 0.7km. Then add a Single Value column that gets the first matching ‘Whole Row’ from the query. Then you can display buttons on a screen based on the query being not empty, and you can set up your buttons to Set Columns or Delete Row directly through the Single Value → Whole Row.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [July 29, 2023, 12:22pm UTC](https://community.glideapps.com/t/show-a-screen-when-user-is-closer-than-x-to-a-point-on-the-map/64452/8 "2023-07-29T12:22:53Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
