# \[Solved\] how to add a marker after I Auto zoom on the current location on google map

**URL:** <https://community.thunkable.com/t/solved-how-to-add-a-marker-after-i-auto-zoom-on-the-current-location-on-google-map/2004699>\
**Category:** Maps\
**Created:** [August 18, 2022, 12:23pm UTC](https://community.thunkable.com/t/solved-how-to-add-a-marker-after-i-auto-zoom-on-the-current-location-on-google-map/2004699 "2022-08-18T12:23:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![franckled](https://avatars.discourse-cdn.com/v4/letter/f/58956e/32.png) [@franckled](https://community.thunkable.com/u/franckled)\
**Post date:** [August 18, 2022, 12:23pm UTC](https://community.thunkable.com/t/solved-how-to-add-a-marker-after-i-auto-zoom-on-the-current-location-on-google-map/2004699/1 "2022-08-18T12:23:53Z")

</div>

Hello  
I can’t find the solution for auto scaling the map on my current position.  
I get lat and long with the sensor locator but when I put these paremeters in the set(Map) position, the screen doesn’t show the position… and the first screen on the map is always on the same position…  
Can I refresh the map to the new position automatically ??

the test

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/c/8ca510ddc35bacfb19edd9698d610629eb73b65f.png)  
the map (always the same)  
 ![IMG_47CF24261FFD-1](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/4/44fff7b59e48522ba0df1de33c19e16d81df5e32.jpeg)  
my position (i need to move on the screen to see it)  
 ![IMG_776F13D088E0-1](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/5/c591854e32a79015d9b86998bc46403b368c1da9.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:** [August 18, 2022, 3:01pm UTC](https://community.thunkable.com/t/solved-how-to-add-a-marker-after-i-auto-zoom-on-the-current-location-on-google-map/2004699/2 "2022-08-18T15:01:37Z")

</div>

The `addmarker` block is going to fire immediately after the `GetCurrentLocation` block _starts_. Not when it finishes… when it starts. The timing is going to be off. Also, more importantly, green blocks only have values within the function they are attached to. So outside of the `GetCurrentLocation` block, they won’t have any values and will be null.

This should have a simple fix: move the `addMarker` block into the `then do` section of the `GetCurrentLocation` block so that it forces it to fire _after_ the `GetCurrentLocation` block populates the green blocks with values.

---

<div class="post-metadata">

**Author:** ![franckled](https://avatars.discourse-cdn.com/v4/letter/f/58956e/32.png) [@franckled](https://community.thunkable.com/u/franckled)\
**Post date:** [August 19, 2022, 7:27am UTC](https://community.thunkable.com/t/solved-how-to-add-a-marker-after-i-auto-zoom-on-the-current-location-on-google-map/2004699/3 "2022-08-19T07:27:46Z")

</div>

Hello  
Thank you… It works well. I thought that the variables will help me to keep the right values to use it after.  
Grreeeaattt

---

<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:** [November 17, 2022, 7:28am UTC](https://community.thunkable.com/t/solved-how-to-add-a-marker-after-i-auto-zoom-on-the-current-location-on-google-map/2004699/4 "2022-11-17T07:28:38Z")

</div>

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