# \[Solved\] How can I identify which map marker was clicked?

**URL:** <https://community.thunkable.com/t/solved-how-can-i-identify-which-map-marker-was-clicked/1775376>\
**Category:** Questions about Thunkable X\
**Tags:** solved\
**Created:** [March 9, 2022, 6:53pm UTC](https://community.thunkable.com/t/solved-how-can-i-identify-which-map-marker-was-clicked/1775376 "2022-03-09T18:53:58Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![freekapeldoorn5o5](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/freekapeldoorn5o5/32/128329_2.png) [@freekapeldoorn5o5](https://community.thunkable.com/u/freekapeldoorn5o5)\
**Post date:** [March 9, 2022, 6:53pm UTC](https://community.thunkable.com/t/solved-how-can-i-identify-which-map-marker-was-clicked/1775376/1 "2022-03-09T18:53:58Z")

</div>

Hello, i’ve been trying to make an app that sends you to another page when you click on a marker. I also need to know in which row of my airtable the marker was. I’ve been looking a lot in the community but i still can’t seem to get it working

 ![Knipsel](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/2/d20dadf71b61a4c06a1e2f57aaecb759d101d64a.jpeg)  
Already thanks to all the support!

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [March 9, 2022, 7:10pm UTC](https://community.thunkable.com/t/solved-how-can-i-identify-which-map-marker-was-clicked/1775376/2 "2022-03-09T19:10:40Z")

</div>

Have you verified that the “latitude” and “longitude” values of the green event block **exactly** match values in your Airtable column? Have you assigned labels to each of the four values (two lat/lon pairs) you’re testing to make sure you’re seeing what you expect them to be?

Your blocks look really convoluted to me. Why not just use “find first occurrence of” block in the List drawer to see if the “list of values” from Airtable contains the lat/lon value you are getting from the event block? If the result of the “find first occurrence” block is 0, it isn’t found. If it’s a number greater than 0 then it refers to the row it was found in.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/4/d430d0845b6c1412c9187c875338f1ed8f1b77a6.png)

If “longitude found in row #” equals “latitude found in row #” then you know the same row had matching longitude and latitude values.

---

<div class="post-metadata">

**Author:** ![freekapeldoorn5o5](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/freekapeldoorn5o5/32/128329_2.png) [@freekapeldoorn5o5](https://community.thunkable.com/u/freekapeldoorn5o5)\
**Post date:** [March 9, 2022, 8:52pm UTC](https://community.thunkable.com/t/solved-how-can-i-identify-which-map-marker-was-clicked/1775376/3 "2022-03-09T20:52:26Z")

</div>

Thank you so much! u fixed one of my problems i was trying to fix for 5 hours in 2 minutes.

I have 1 other problem how would i make it output a variable saying in which row it was found?

Greetings,Freek Apeldoorn

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [March 9, 2022, 9:26pm UTC](https://community.thunkable.com/t/solved-how-can-i-identify-which-map-marker-was-clicked/1775376/4 "2022-03-09T21:26:42Z")

</div>

You can assign the “longitude found in row #” variable to a label’s text to display it to the user.

---

<div class="post-metadata">

**Author:** ![freekapeldoorn5o5](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/freekapeldoorn5o5/32/128329_2.png) [@freekapeldoorn5o5](https://community.thunkable.com/u/freekapeldoorn5o5)\
**Post date:** [March 10, 2022, 6:30am UTC](https://community.thunkable.com/t/solved-how-can-i-identify-which-map-marker-was-clicked/1775376/5 "2022-03-10T06:30:25Z")

</div>

Ahhhh, thank you so much!

---

<div class="post-metadata">

**Author:** ![freekapeldoorn5o5](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/freekapeldoorn5o5/32/128329_2.png) [@freekapeldoorn5o5](https://community.thunkable.com/u/freekapeldoorn5o5)\
**Post date:** [March 11, 2022, 3:41pm UTC](https://community.thunkable.com/t/solved-how-can-i-identify-which-map-marker-was-clicked/1775376/6 "2022-03-11T15:41:02Z")

</div>

Hello,

When i click on a marker my program is supposed to save from which row it was and set the row in which it was found to a variable. But when i get to another page and i try to use the variable again it seems that it has reset to 0. So i’m not sure what to do with this!

 ![Knipsel](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/8/68f51a83cc66ab0343e46f39c625ca88ded9e4d2.jpeg)

Greetings,  
Freek Apeldoorn

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [March 11, 2022, 4:32pm UTC](https://community.thunkable.com/t/solved-how-can-i-identify-which-map-marker-was-clicked/1775376/7 "2022-03-11T16:32:29Z")

</div>

Can you post a screenshot of the blocks on the Winkel info screen?

How have you verified that _app variable found in row #_ is a non-zero integer before you change screens? And after you change screens?

---

<div class="post-metadata">

**Author:** ![freekapeldoorn5o5](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/freekapeldoorn5o5/32/128329_2.png) [@freekapeldoorn5o5](https://community.thunkable.com/u/freekapeldoorn5o5)\
**Post date:** [March 11, 2022, 4:39pm UTC](https://community.thunkable.com/t/solved-how-can-i-identify-which-map-marker-was-clicked/1775376/8 "2022-03-11T16:39:08Z")

</div>

> [@tatiang](#):
>
> non-zero intege

I’ve been using this as a simple test!

And i have no idea what that even is 😅. So i’m guessing that is the problem!  
 ![Knipsel](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/0/e0a79c021ab70a7705b9070b22b5ed7b6389b2ae.jpeg)  
`

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [March 11, 2022, 4:46pm UTC](https://community.thunkable.com/t/solved-how-can-i-identify-which-map-marker-was-clicked/1775376/9 "2022-03-11T16:46:30Z")

</div>

Stored variables are a special situation. You have to check to see if they are null when the screen opens and if so, set them to an initial value (e.g. 0). I don’t know why this is and it’s something Thunkable should just do in the background.

Let’s remove the stored variable and see if that’s the problem. What happens when you set a label’s text to _app variable found in row #_ in the original screen and in the Winkel info screen? What are the two values that you see?

---

<div class="post-metadata">

**Author:** ![freekapeldoorn5o5](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/freekapeldoorn5o5/32/128329_2.png) [@freekapeldoorn5o5](https://community.thunkable.com/u/freekapeldoorn5o5)\
**Post date:** [March 11, 2022, 4:49pm UTC](https://community.thunkable.com/t/solved-how-can-i-identify-which-map-marker-was-clicked/1775376/10 "2022-03-11T16:49:23Z")

</div>

Hey, sadly enough it still says 0 when i test it!

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [March 11, 2022, 4:53pm UTC](https://community.thunkable.com/t/solved-how-can-i-identify-which-map-marker-was-clicked/1775376/11 "2022-03-11T16:53:47Z")

</div>

I don’t know what that means. For me to help you, I need to know the answer to my specific question. Is it showing zero on both screens? Have you removed the stored variable blocks?

> [@tatiang](#):
>
> What happens when you set a label’s text to _app variable found in row #_ in the original screen and in the Winkel info screen? What are the **two values** that you see?

Can you share the project link with me? It’s hard to troubleshoot without seeing what you’re seeing.

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [March 11, 2022, 5:31pm UTC](https://community.thunkable.com/t/solved-how-can-i-identify-which-map-marker-was-clicked/1775376/13 "2022-03-11T17:31:43Z")

</div>

If your _app variable found in row #_ equals zero then it means that the lat/lon value was not found in your database when you used the “find first occurrence” block. So you need to figure out why those values are not matching.

I just noticed a problem with your blocks. You are finding the first occurrence of _app variable ThisLong_ for both longitude **and** latitude.

 ![68f51a83cc66ab0343e46f39c625ca88ded9e4d2](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/f/4f68424497a6f4251c768a43f8a2dbc110deecf3.jpeg)

---

<div class="post-metadata">

**Author:** ![freekapeldoorn5o5](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/freekapeldoorn5o5/32/128329_2.png) [@freekapeldoorn5o5](https://community.thunkable.com/u/freekapeldoorn5o5)\
**Post date:** [March 11, 2022, 5:33pm UTC](https://community.thunkable.com/t/solved-how-can-i-identify-which-map-marker-was-clicked/1775376/14 "2022-03-11T17:33:40Z")

</div>

Ahhhhhhhh, thank you sooo much! not just for this fix but for all of them! ur a lifesaver.

So simple but so destructive 😂

Well thank you so much!

---

<div class="post-metadata">

**Author:** ![freekapeldoorn5o5](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/freekapeldoorn5o5/32/128329_2.png) [@freekapeldoorn5o5](https://community.thunkable.com/u/freekapeldoorn5o5)\
**Post date:** [March 12, 2022, 3:41pm UTC](https://community.thunkable.com/t/solved-how-can-i-identify-which-map-marker-was-clicked/1775376/15 "2022-03-12T15:41:02Z")

</div>

Hey,  
So i tought i got it working. But it’s not now so i really don’t understand why it can’t find the cordinate’s! I really tried everything i tought might be the error.  
 ![Knipsel](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/d/cdcd379b1a2f05863c47c88279fc08e92ffa0d90.jpeg)

 ![Knipsel](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/9/6989fcb12dd3d9c399396e25345dcc0cd17abade.jpeg)

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [March 12, 2022, 3:45pm UTC](https://community.thunkable.com/t/solved-how-can-i-identify-which-map-marker-was-clicked/1775376/16 "2022-03-12T15:45:15Z")

</div>

What lat/lon values are you getting when you run the app?

Can you share the project link?

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [March 12, 2022, 4:37pm UTC](https://community.thunkable.com/t/solved-how-can-i-identify-which-map-marker-was-clicked/1775376/18 "2022-03-12T16:37:52Z")

</div>

Property names are case-sensitive. Longitude needs to be lowercase. See the “On User Location Change” section in the [documentation](https://docs.thunkable.com/v/drag-and-drop/map#on-user-location-change).

---

<div class="post-metadata">

**Author:** ![freekapeldoorn5o5](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/freekapeldoorn5o5/32/128329_2.png) [@freekapeldoorn5o5](https://community.thunkable.com/u/freekapeldoorn5o5)\
**Post date:** [March 12, 2022, 4:50pm UTC](https://community.thunkable.com/t/solved-how-can-i-identify-which-map-marker-was-clicked/1775376/20 "2022-03-12T16:50:50Z")

</div>

Hmm… sadly enough this still hasn’t fixed the issue. It did make it output the cordinates but it seems like it can’t find the cordinates in the airtable and i really don’t understand why it doesn’t find them…

[https://x.thunkable.com/copy/e50298e1087f02a8f588d92f36880441](https://x.thunkable.com/copy/e50298e1087f02a8f588d92f36880441)  
 ![Knipsel](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/c/3cfad137dd14582be0d96e63576e9509a34dd241.jpeg)

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [March 12, 2022, 5:00pm UTC](https://community.thunkable.com/t/solved-how-can-i-identify-which-map-marker-was-clicked/1775376/21 "2022-03-12T17:00:27Z")

</div>

This is entirely dependent on the level of accuracy of the comparison.

For example, if the `onMarkerPress` gives you a `Lat` value of 51.284080201 and your Airtable has 51.28408020 (without the last **1** ) then there will be **No Match**.

Best is to show the numbers obtained from the `onMarkerPress` and check if they really are available in your table.

---

<div class="post-metadata">

**Author:** ![freekapeldoorn5o5](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/freekapeldoorn5o5/32/128329_2.png) [@freekapeldoorn5o5](https://community.thunkable.com/u/freekapeldoorn5o5)\
**Post date:** [March 12, 2022, 5:04pm UTC](https://community.thunkable.com/t/solved-how-can-i-identify-which-map-marker-was-clicked/1775376/22 "2022-03-12T17:04:36Z")

</div>

Ohhh, this might explain it. Because it looks like my output is more specific than my airtable. But how would i make airtable more exact or onmarkerpress less acurate?

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [March 12, 2022, 5:17pm UTC](https://community.thunkable.com/t/solved-how-can-i-identify-which-map-marker-was-clicked/1775376/23 "2022-03-12T17:17:22Z")

</div>

> [@freekapeldoorn5o5](#):
>
> how would i make airtable more exact or onmarkerpress less acurate?

Use the` round` block  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/a/0ae9e3f59a02f52718e9b376814eb3edbd758728.png)  
to make the `onMarkerPress` less accurate. Round it to the same number of decimals of what you have in your table.

[Next page](https://community.thunkable.com/t/solved-how-can-i-identify-which-map-marker-was-clicked/1775376.md?page=2)
