# \[Solved\] How do the event blocks for the Map component work?

**URL:** <https://community.thunkable.com/t/solved-how-do-the-event-blocks-for-the-map-component-work/73742>\
**Category:** Questions about Thunkable X\
**Tags:** solved\
**Created:** [March 30, 2019, 9:39am UTC](https://community.thunkable.com/t/solved-how-do-the-event-blocks-for-the-map-component-work/73742 "2019-03-30T09:39:57Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![KaneoheKid](https://avatars.discourse-cdn.com/v4/letter/k/d07c76/32.png) [@KaneoheKid](https://community.thunkable.com/u/KaneoheKid)\
**Post date:** [March 30, 2019, 9:39am UTC](https://community.thunkable.com/t/solved-how-do-the-event-blocks-for-the-map-component-work/73742/1 "2019-03-30T09:39:57Z")

</div>

What is the Event block (onPress, onLongPress, onCalloutPress) for and how is it used?

---

<div class="post-metadata">

**Author:** ![IWS](https://avatars.discourse-cdn.com/v4/letter/i/50afbb/32.png) [@IWS](https://community.thunkable.com/u/IWS)\
**Post date:** [May 1, 2019, 2:01pm UTC](https://community.thunkable.com/t/solved-how-do-the-event-blocks-for-the-map-component-work/73742/2 "2019-05-01T14:01:27Z")

</div>

bump!

---

<div class="post-metadata">

**Author:** ![Mark](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/mark/32/18133_2.png) [@Mark](https://community.thunkable.com/u/Mark)\
**Post date:** [May 1, 2019, 6:57pm UTC](https://community.thunkable.com/t/solved-how-do-the-event-blocks-for-the-map-component-work/73742/3 "2019-05-01T18:57:47Z")

</div>

Those blocks are triggered, respectively, when a user clicks on a map, long presses on a map (i.e. clicks and holds their finger down) or clicks on the the “bubble” that appears when they click on a marker.

Unfortunately, there are a few known issues with the Map event blocks. One is that the onCalloutPress doesn’t appear to work at all. Another is that the output blocks for the events (e.g., `"coordinate", "position" and "event"`) are either incorrectly named, unhelpfully named or simply unusable.

I’ve created a sample project that you can use that shows how, despite the issues mentioned above, to get latitude and longitude for the onPress, onLongPress, onMarkerPress blocks: [Thunkable](https://x.thunkable.com/copy/91f287542b31aa70b14d50c1229f40b6)

If you just want to see the blocks, here’s a screenshot:

 ![53%20AM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f4258ff7aaf77d21cf18f7c832f32b02da78729.png)

I hope this helps.

-Mark

---

<div class="post-metadata">

**Author:** ![IWS](https://avatars.discourse-cdn.com/v4/letter/i/50afbb/32.png) [@IWS](https://community.thunkable.com/u/IWS)\
**Post date:** [May 2, 2019, 12:36pm UTC](https://community.thunkable.com/t/solved-how-do-the-event-blocks-for-the-map-component-work/73742/4 "2019-05-02T12:36:11Z")

</div>

thanks for the reply… i actually ended up figuring most of it out by searching react github and it seems there is a fix for the calloutonpress event that was just pushed last month… any chance of incorporating that any time soon?

> <https://github.com/Hiseen/BalancedBite/pull/19>

---

<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:** [October 21, 2019, 5:43pm UTC](https://community.thunkable.com/t/solved-how-do-the-event-blocks-for-the-map-component-work/73742/5 "2019-10-21T17:43:33Z")

</div>

15 posts were split to a new topic: [Get Lat and Lng from map press](https://community.thunkable.com/t/get-lat-and-lng-from-map-press/282110)

---

<div class="post-metadata">

**Author:** ![maxb](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/maxb/32/35200_2.png) [@maxb](https://community.thunkable.com/u/maxb)\
**Post date:** [February 20, 2020, 5:46pm UTC](https://community.thunkable.com/t/solved-how-do-the-event-blocks-for-the-map-component-work/73742/7 "2020-02-20T17:46:39Z")

</div>

It gives me the latitude and the longitude but only singularly, when I try to write them both in 2 different labels it only gives back one response, lat or long.

I can’t open your link because it’s private.

What’s the ‘position’ response we can get from the press on the map event?

---

<div class="post-metadata">

**Author:** ![bobsunscreen](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/bobsunscreen/32/85667_2.png) [@bobsunscreen](https://community.thunkable.com/u/bobsunscreen)\
**Post date:** [June 1, 2020, 9:46pm UTC](https://community.thunkable.com/t/solved-how-do-the-event-blocks-for-the-map-component-work/73742/8 "2020-06-01T21:46:29Z")

</div>

Hi @Mark, thanks for your help! The link to your project isn’t working for me. Is there any way you could send a different copy link?

---

<div class="post-metadata">

**Author:** ![gergely.gabor.78xk2i](https://avatars.discourse-cdn.com/v4/letter/g/cc9497/32.png) [@gergely.gabor.78xk2i](https://community.thunkable.com/u/gergely.gabor.78xk2i)\
**Post date:** [June 2, 2020, 5:15am UTC](https://community.thunkable.com/t/solved-how-do-the-event-blocks-for-the-map-component-work/73742/9 "2020-06-02T05:15:12Z")

</div>

Hi,

Some weeks ago the map component started to send null values. It is a bug. The developers started to work on it. Look at this link for more details:

> [@Map component sending back 'null' values (bug?)](http://community.thunkable.com/t/map-component-sending-back-null-values-bug/586742/12):
>
> I forgot I did that. If you guys can comment or leave projects in that github post to help it would be great. That helps the devs I think.

Br,

---

<div class="post-metadata">

**Author:** ![weisslew66](https://avatars.discourse-cdn.com/v4/letter/w/54ee81/32.png) [@weisslew66](https://community.thunkable.com/u/weisslew66)\
**Post date:** [August 1, 2023, 7:08pm UTC](https://community.thunkable.com/t/solved-how-do-the-event-blocks-for-the-map-component-work/73742/10 "2023-08-01T19:08:45Z")

</div>

Hi,  
I could not extract description from event of OnMarkerPress.

 ![onMarkerPress](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/a/bacedf8fbae920f8320164776311506141ab2f40.jpeg)  
Only latitude and longitude could be extracted.  
It appears to be empty.  
Is it a bug?

---

<div class="post-metadata">

**Author:** ![KaneoheKid](https://avatars.discourse-cdn.com/v4/letter/k/d07c76/32.png) [@KaneoheKid](https://community.thunkable.com/u/KaneoheKid)\
**Post date:** [August 6, 2023, 5:10pm UTC](https://community.thunkable.com/t/solved-how-do-the-event-blocks-for-the-map-component-work/73742/11 "2023-08-06T17:10:28Z")

</div>

I believe that “On Marker Press” only returns the latitude and longitude, nothing more.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/9/79fadf9c0f10d1c7c4ddf983700daef654f6b96e.png)

---

<div class="post-metadata">

**Author:** ![weisslew66](https://avatars.discourse-cdn.com/v4/letter/w/54ee81/32.png) [@weisslew66](https://community.thunkable.com/u/weisslew66)\
**Post date:** [August 13, 2023, 1:52pm UTC](https://community.thunkable.com/t/solved-how-do-the-event-blocks-for-the-map-component-work/73742/12 "2023-08-13T13:52:46Z")

</div>

Thanks for the reply… Yes, that was all I managed to extract too.

---

<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:28am UTC](https://community.thunkable.com/t/solved-how-do-the-event-blocks-for-the-map-component-work/73742/13 "2024-11-08T11:28:50Z")

</div>


