# Maps component would always reset its position

**URL:** <https://community.thunkable.com/t/maps-component-would-always-reset-its-position/361843>\
**Category:** Questions about Thunkable X\
**Created:** [December 11, 2019, 12:50pm UTC](https://community.thunkable.com/t/maps-component-would-always-reset-its-position/361843 "2019-12-11T12:50:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chris](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/chris/32/78883_2.png) [@Chris](https://community.thunkable.com/u/Chris)\
**Post date:** [December 11, 2019, 12:50pm UTC](https://community.thunkable.com/t/maps-component-would-always-reset-its-position/361843/1 "2019-12-11T12:50:46Z")

</div>

Hi,

I recently added a current weather box (similar to Google Maps app) to one of my apps map but unfortunately after I added this feature the map (that until then could be dragged freely) will now always immediately jump back to the last set coordinates when it is dragged 😕

![ezgif-1-5948f946106f](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/7/27855ed8a95838b286f32492db62a4096a5b3aeb.gif)

When I first couldn’t find the problem. luckily I had a backup and that worked fine so I reversed my latest changes and I realized that it only happens when the weather function is included. I use the following blocks and I cannot find any reason for this behavior:

 ![Bildschirmfoto 2019-12-11 um 13.05.23](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/8/588fadf1062fd089554c9e60938564f999d11310.png)

> On screen opens “locationloaded” is set to **false**. Once the users location is received the map should once center at his current location, then “locationloaded” is set to **true** and this time when the location changes it should trigger the weather function

 ![Bildschirmfoto 2019-12-11 um 13.06.19](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/b/2b4a91d3c4b3cea642835d2db3f0a2159ce89576.png)  
 ![Bildschirmfoto 2019-12-11 um 13.06.33](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/f/afd101383e1f109c97405abdaea51b21606149dd.png)

> Since I don’t want hundreds of requests within a minute the weather should only update every 5 minutes therefor I check if the current device timestamp is \>300 seconds newer than the last time the weather api was called. However for some reason the map will immediately jump back after user drags it when I include the weather feature. Removing it from the “onUserLocationChange” block solves the issue… Btw the issue does also appear when I remove the “setText” blocks within the function… Because first I thought this might be due to the text refreshing the screen/map…

Any help is appreciated. Is it a problem in my blocks or a bug?

---

<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:** [July 16, 2020, 10:19am UTC](https://community.thunkable.com/t/maps-component-would-always-reset-its-position/361843/2 "2020-07-16T10:19:07Z")

</div>

There were a number of updates rolled out for the map component last week @Chris.

We still have a few bugs to iron out, but the overall experience has been greatly improved so far.

---

<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:46am UTC](https://community.thunkable.com/t/maps-component-would-always-reset-its-position/361843/3 "2024-11-08T11:46:28Z")

</div>


