# How to get the closest distance to my point

**URL:** <https://community.thunkable.com/t/how-to-get-the-closest-distance-to-my-point/791117>\
**Category:** Questions about Thunkable X\
**Tags:** map\
**Created:** [September 3, 2020, 9:26pm UTC](https://community.thunkable.com/t/how-to-get-the-closest-distance-to-my-point/791117 "2020-09-03T21:26:36Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [October 4, 2020, 2:27pm UTC](https://community.thunkable.com/t/how-to-get-the-closest-distance-to-my-point/791117/5 "2020-10-04T14:27:57Z")

</div>

I’m working on the tutorial for this!!!

[UPDATE]  
you’re looking to get a response like [this](https://api.backendless.com/34292C6A-B3A7-83DD-FF79-EF9E6913F900/FD17E678-AFB3-49F3-9663-8CF8D54CE7C7/data/thunkableLocations?where=distanceOnSphere(%27POINT(-85.73455637260194%2042.46124149689038)%27%2C%20location)%20%3C%20mi(33.48396187841322)%20&props=distanceOnSphere(%27POINT(-85.66061443893842%2042.375649975692355)%27,%20location)%20*%200.000621371%20as%20milesToPoint,city,state&sortBy=milesToPoint) back, right?

i create the milesToPoint property everytime the database is called using the URL scheme above.  
i include only milesToPoint,state,city,objectId. everything done very quickly by the DB server. The search was conducted using arbitrary coordinates near my home!

 ![Screen Shot 2020-10-04 at 1.00.51 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/5/b5a214f45bce5483dca28525fe35ce3ecc69b7fe.png)

without any fancy querying the response looks like this.

 ![Screen Shot 2020-10-04 at 1.05.47 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/a/2ad3e8ba13ea8df79d4b1b663a87586a99793550.png)

---

_[View the full topic](https://community.thunkable.com/t/how-to-get-the-closest-distance-to-my-point/791117)._
