# Finding whether the current location is inside a polygon

**URL:** <https://community.thunkable.com/t/finding-whether-the-current-location-is-inside-a-polygon/498627>\
**Category:** Questions about Thunkable X\
**Created:** [March 4, 2020, 7:57pm UTC](https://community.thunkable.com/t/finding-whether-the-current-location-is-inside-a-polygon/498627 "2020-03-04T19:57:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mvgeek](https://avatars.discourse-cdn.com/v4/letter/m/779978/32.png) [@mvgeek](https://community.thunkable.com/u/mvgeek)\
**Post date:** [March 4, 2020, 7:57pm UTC](https://community.thunkable.com/t/finding-whether-the-current-location-is-inside-a-polygon/498627/1 "2020-03-04T19:57:44Z")

</div>

Hi, I’d like to know whether it would be possible to check whether the user’s location is inside a polygon.  
I have a few polygons and If the user’s location is in either one of those polygons I want to set a variable which from a proper inside the polygon json data. If anyone has experience in this or even if you know its possible to do this inside thunkable functions :slightly\_smiling and map component please give me some tips.

Thanks 🙂

---

<div class="post-metadata">

**Author:** ![domhnallohanlon](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/domhnallohanlon/32/29554_2.png) [@domhnallohanlon](https://community.thunkable.com/u/domhnallohanlon)\
**Post date:** [March 5, 2020, 9:15am UTC](https://community.thunkable.com/t/finding-whether-the-current-location-is-inside-a-polygon/498627/2 "2020-03-05T09:15:44Z")

</div>

Are you drawing the polygons with the Thunkable map component @mvgeek?

I’d imagine if you have the corner points then you could write your own function to check if the current location is less then the max value and greater than the min value, right?

---

<div class="post-metadata">

**Author:** ![mvgeek](https://avatars.discourse-cdn.com/v4/letter/m/779978/32.png) [@mvgeek](https://community.thunkable.com/u/mvgeek)\
**Post date:** [March 5, 2020, 9:32am UTC](https://community.thunkable.com/t/finding-whether-the-current-location-is-inside-a-polygon/498627/3 "2020-03-05T09:32:00Z")

</div>

I can draw the polygons on thukable too, there are around 10 polygons, all of them are located next to each other meaning there are lots of corners.

So I should calculate and compute the area and check and compare users location? is that what you mean?

---

<div class="post-metadata">

**Author:** ![domhnallohanlon](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/domhnallohanlon/32/29554_2.png) [@domhnallohanlon](https://community.thunkable.com/u/domhnallohanlon)\
**Post date:** [March 5, 2020, 1:34pm UTC](https://community.thunkable.com/t/finding-whether-the-current-location-is-inside-a-polygon/498627/4 "2020-03-05T13:34:00Z")

</div>

> [@mvgeek](#):
>
> polygons

D’oh! 🙈 When I read this first I just assumed that it was a rectangle. Yeah, I guess it’s still possible, albeit somewhat more complex, for any polygon.

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 11:40am UTC](https://community.thunkable.com/t/finding-whether-the-current-location-is-inside-a-polygon/498627/5 "2024-11-08T11:40:37Z")

</div>


