# Sample code for adding marker on click to a map

**URL:** <https://community.thunkable.com/t/sample-code-for-adding-marker-on-click-to-a-map/1217998>\
**Category:** Questions about Thunkable X\
**Created:** [April 11, 2021, 3:15pm UTC](https://community.thunkable.com/t/sample-code-for-adding-marker-on-click-to-a-map/1217998 "2021-04-11T15:15:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hanaspahia3e](https://avatars.discourse-cdn.com/v4/letter/h/7ba0ec/32.png) [@hanaspahia3e](https://community.thunkable.com/u/hanaspahia3e)\
**Post date:** [April 11, 2021, 3:15pm UTC](https://community.thunkable.com/t/sample-code-for-adding-marker-on-click-to-a-map/1217998/1 "2021-04-11T15:15:33Z")

</div>

does anyone have sample code for adding a marker to a map after clicking?

---

<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:** [April 14, 2021, 3:02pm UTC](https://community.thunkable.com/t/sample-code-for-adding-marker-on-click-to-a-map/1217998/2 "2021-04-14T15:02:28Z")

</div>

This was the first result that came up when I searched the Community @hanaspahia3e 😃

> [@\[Solved\] Click to add map markers](https://community.thunkable.com/t/solved-click-to-add-map-markers/1104201):
>
> I am creating an app that creates markers in google maps according to the coordinates sent, but when I click the submit button, the app restarts. can you help me?!

Is that what you’re looking for?

---

<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, 1:25pm UTC](https://community.thunkable.com/t/sample-code-for-adding-marker-on-click-to-a-map/1217998/3 "2024-11-08T13:25:23Z")

</div>


