# How to use the location sensor to track live location of a vehicle?

**URL:** <https://community.thunkable.com/t/how-to-use-the-location-sensor-to-track-live-location-of-a-vehicle/2109593>\
**Category:** Questions about Thunkable X\
**Created:** [November 2, 2022, 4:15am UTC](https://community.thunkable.com/t/how-to-use-the-location-sensor-to-track-live-location-of-a-vehicle/2109593 "2022-11-02T04:15:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nereshchelvana61mg](https://avatars.discourse-cdn.com/v4/letter/n/919ad9/32.png) [@nereshchelvana61mg](https://community.thunkable.com/u/nereshchelvana61mg)\
**Post date:** [November 2, 2022, 4:15am UTC](https://community.thunkable.com/t/how-to-use-the-location-sensor-to-track-live-location-of-a-vehicle/2109593/1 "2022-11-02T04:15:27Z")

</div>

I want to make an app that can track a vehicle’s live location like a share live locations option in WhatsApp. So far I have made the location sensor show the current location when the screen is opened but when I move to a different place the marker in the maps doesn’t change. I have to refresh the screen to make the marker shift to the new location. How can I make the marker move along the maps when I move?

 ![Screenshot 2022-11-02 121510](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/9/c978160d81d8d4865f466a593f8f9a2e43e3e34d.png)

---

<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:** [November 2, 2022, 5:45am UTC](https://community.thunkable.com/t/how-to-use-the-location-sensor-to-track-live-location-of-a-vehicle/2109593/2 "2022-11-02T05:45:09Z")

</div>

You’ll need to call Get Current Location inside of a loop or use a timer (probably a better option). That way, each time the timer fires, you get the updated location and add a marker to the map.

---

<div class="post-metadata">

**Author:** ![nereshchelvana61mg](https://avatars.discourse-cdn.com/v4/letter/n/919ad9/32.png) [@nereshchelvana61mg](https://community.thunkable.com/u/nereshchelvana61mg)\
**Post date:** [November 2, 2022, 9:08pm UTC](https://community.thunkable.com/t/how-to-use-the-location-sensor-to-track-live-location-of-a-vehicle/2109593/3 "2022-11-02T21:08:50Z")

</div>

Thank you very much for the reply. I found it very useful.

---

<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 31, 2023, 9:09pm UTC](https://community.thunkable.com/t/how-to-use-the-location-sensor-to-track-live-location-of-a-vehicle/2109593/4 "2023-01-31T21:09:22Z")

</div>

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