# How can i make map centered on Marker, and make tha map automatically refresh every sec?

**URL:** <https://community.thunkable.com/t/how-can-i-make-map-centered-on-marker-and-make-tha-map-automatically-refresh-every-sec/3272572>\
**Category:** Questions about Thunkable X\
**Tags:** beginner\
**Created:** [October 15, 2024, 4:59am UTC](https://community.thunkable.com/t/how-can-i-make-map-centered-on-marker-and-make-tha-map-automatically-refresh-every-sec/3272572 "2024-10-15T04:59:27Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![acuno2911ezlu](https://avatars.discourse-cdn.com/v4/letter/a/e5b9ba/32.png) [@acuno2911ezlu](https://community.thunkable.com/u/acuno2911ezlu)\
**Post date:** [October 15, 2024, 4:59am UTC](https://community.thunkable.com/t/how-can-i-make-map-centered-on-marker-and-make-tha-map-automatically-refresh-every-sec/3272572/1 "2024-10-15T04:59:27Z")

</div>

I have a map that is retrieving longitude and latitude on my firebase database and i want to display the marker in my map. I want it to display the marker everytime i open the application and centered the map on the marker that im retrieving from my database. The problem is when i open the application the app always centered on the default map location not on the Marker.

---

<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:** [October 16, 2024, 5:48pm UTC](https://community.thunkable.com/t/how-can-i-make-map-centered-on-marker-and-make-tha-map-automatically-refresh-every-sec/3272572/2 "2024-10-16T17:48:47Z")

</div>

Hello @acuno2911ezlu  
You could use the set mapLocations blocks

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0fcb3aac1dfe06973986d0c2ecb5c054e5762434.png)

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

---

<div class="post-metadata">

**Author:** ![acuno2911ezlu](https://avatars.discourse-cdn.com/v4/letter/a/e5b9ba/32.png) [@acuno2911ezlu](https://community.thunkable.com/u/acuno2911ezlu)\
**Post date:** [October 17, 2024, 5:40am UTC](https://community.thunkable.com/t/how-can-i-make-map-centered-on-marker-and-make-tha-map-automatically-refresh-every-sec/3272572/3 "2024-10-17T05:40:39Z")

</div>

Great!! it works, another question is there a way to automatically refresh the map? because I encountered a problem when the cloud variable changes the pin in the map is not changing and needed to have manually refresh by restarting the whole application.

---

<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:** [October 17, 2024, 9:01am UTC](https://community.thunkable.com/t/how-can-i-make-map-centered-on-marker-and-make-tha-map-automatically-refresh-every-sec/3272572/4 "2024-10-17T09:01:14Z")

</div>

Hi @acuno2911ezlu  
To do that you can create a [Snap to Place project](https://docs.thunkable.com/snap-to-place) and add [Firebase listener](https://docs.thunkable.com/snap-to-place/realtime-db#update-data-in-real-time).

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

---

<div class="post-metadata">

**Author:** ![acuno2911ezlu](https://avatars.discourse-cdn.com/v4/letter/a/e5b9ba/32.png) [@acuno2911ezlu](https://community.thunkable.com/u/acuno2911ezlu)\
**Post date:** [October 17, 2024, 9:33am UTC](https://community.thunkable.com/t/how-can-i-make-map-centered-on-marker-and-make-tha-map-automatically-refresh-every-sec/3272572/5 "2024-10-17T09:33:23Z")

</div>

where can i find the call Realtime\_DB1’s addlistener block? i didn’t know that it is only on snap to place. I already made a whole application is there another way to refresh the maps ? @ioannis please help thank you in advance

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)\
**Post date:** [January 15, 2025, 9:33am UTC](https://community.thunkable.com/t/how-can-i-make-map-centered-on-marker-and-make-tha-map-automatically-refresh-every-sec/3272572/6 "2025-01-15T09:33:51Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
