# \[Solved\] How do I collect location (Long And Lat) Data from Google Maps and store that to a data source?

**URL:** <https://community.thunkable.com/t/solved-how-do-i-collect-location-long-and-lat-data-from-google-maps-and-store-that-to-a-data-source/1970475>\
**Category:** Maps\
**Tags:** solved\
**Created:** [July 21, 2022, 8:45am UTC](https://community.thunkable.com/t/solved-how-do-i-collect-location-long-and-lat-data-from-google-maps-and-store-that-to-a-data-source/1970475 "2022-07-21T08:45:38Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![leviocsmithk](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/leviocsmithk/32/136645_2.png) [@leviocsmithk](https://community.thunkable.com/u/leviocsmithk)\
**Post date:** [July 21, 2022, 8:45am UTC](https://community.thunkable.com/t/solved-how-do-i-collect-location-long-and-lat-data-from-google-maps-and-store-that-to-a-data-source/1970475/1 "2022-07-21T08:45:38Z")

</div>

Hello, I am building an app that has to get a user’s location, Longitude and Latitude, send that data to a Google Docs Sheet and then display that onto Google Maps through API. This way I can show a Different program the locations of all the players in the game that do Collisions relive to where they are.

So far I have gotten the app to locate where I am at any given time, and then display that on google maps, but I need a way to store that data onto Google Docs or another data source.

Any help would be greatly appreciated.  
Thanks, Levi

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [July 21, 2022, 10:31am UTC](https://community.thunkable.com/t/solved-how-do-i-collect-location-long-and-lat-data-from-google-maps-and-store-that-to-a-data-source/1970475/2 "2022-07-21T10:31:24Z")

</div>

Welcome to Thunkable.

If you add your Google sheet to your project as a `Data Source` then you can create a row or update the existing row as required.

---

<div class="post-metadata">

**Author:** ![leviocsmithk](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/leviocsmithk/32/136645_2.png) [@leviocsmithk](https://community.thunkable.com/u/leviocsmithk)\
**Post date:** [July 22, 2022, 6:28am UTC](https://community.thunkable.com/t/solved-how-do-i-collect-location-long-and-lat-data-from-google-maps-and-store-that-to-a-data-source/1970475/3 "2022-07-22T06:28:32Z")

</div>

Ok here is a screenshot of what I have so far which gets the user’s location now where exactly?

 ![Screen Shot 2022-07-16 at 10.02.13 am](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/1/417e670fb060e3561c2374df5e7e5368afe8f864.png)

Thanks Levi

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [July 22, 2022, 8:50am UTC](https://community.thunkable.com/t/solved-how-do-i-collect-location-long-and-lat-data-from-google-maps-and-store-that-to-a-data-source/1970475/4 "2022-07-22T08:50:24Z")

</div>

I meant something like this. I connected the blocks to a button just for simplicity  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/d/ed3cf3e2c910b24a8d421091bbc3376e83024661.png)

I connected to a Google sheet and once this button is clicked then a row is added to the sheet with the user code along with user location.

Hope this makes it clear.

---

<div class="post-metadata">

**Author:** ![leviocsmithk](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/leviocsmithk/32/136645_2.png) [@leviocsmithk](https://community.thunkable.com/u/leviocsmithk)\
**Post date:** [July 22, 2022, 9:26am UTC](https://community.thunkable.com/t/solved-how-do-i-collect-location-long-and-lat-data-from-google-maps-and-store-that-to-a-data-source/1970475/5 "2022-07-22T09:26:31Z")

</div>

Thanks, but where do I find the App variable current User Block?

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [July 22, 2022, 9:33am UTC](https://community.thunkable.com/t/solved-how-do-i-collect-location-long-and-lat-data-from-google-maps-and-store-that-to-a-data-source/1970475/6 "2022-07-22T09:33:39Z")

</div>

The variable `currentUser` is a variable that I created to save the user name or code from the login screen. You can create your own.

---

<div class="post-metadata">

**Author:** ![leviocsmithk](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/leviocsmithk/32/136645_2.png) [@leviocsmithk](https://community.thunkable.com/u/leviocsmithk)\
**Post date:** [July 22, 2022, 10:16am UTC](https://community.thunkable.com/t/solved-how-do-i-collect-location-long-and-lat-data-from-google-maps-and-store-that-to-a-data-source/1970475/7 "2022-07-22T10:16:14Z")

</div>

Sorry, can you send me a screenshot of how to do that, it’s not coming up on mine.  
Thanks Levi

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [July 22, 2022, 10:19am UTC](https://community.thunkable.com/t/solved-how-do-i-collect-location-long-and-lat-data-from-google-maps-and-store-that-to-a-data-source/1970475/8 "2022-07-22T10:19:30Z")

</div>

> [@leviocsmithk](#):
>
> can you send me a screenshot of how to do that,

Can you be more specific? how to do of what?

---

<div class="post-metadata">

**Author:** ![leviocsmithk](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/leviocsmithk/32/136645_2.png) [@leviocsmithk](https://community.thunkable.com/u/leviocsmithk)\
**Post date:** [July 22, 2022, 10:30am UTC](https://community.thunkable.com/t/solved-how-do-i-collect-location-long-and-lat-data-from-google-maps-and-store-that-to-a-data-source/1970475/9 "2022-07-22T10:30:16Z")

</div>

Just how to Make this variable block  
 ![Screen Shot 2022-07-22 at 8.27.08 pm](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/3/93e79a0e6920d5c1d760c9ab7ba77a0739582a97.png)

Can you also show me how you have set up your Google Sheets just so I can get it to work as well?

Many Thanks, Levi

---

<div class="post-metadata">

**Author:** ![leviocsmithk](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/leviocsmithk/32/136645_2.png) [@leviocsmithk](https://community.thunkable.com/u/leviocsmithk)\
**Post date:** [July 22, 2022, 10:38am UTC](https://community.thunkable.com/t/solved-how-do-i-collect-location-long-and-lat-data-from-google-maps-and-store-that-to-a-data-source/1970475/10 "2022-07-22T10:38:13Z")

</div>

Sorry, I am not trying to be annoying I am just new to thunkable.

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [July 22, 2022, 12:47pm UTC](https://community.thunkable.com/t/solved-how-do-i-collect-location-long-and-lat-data-from-google-maps-and-store-that-to-a-data-source/1970475/11 "2022-07-22T12:47:22Z")

</div>

Here are our docs on variables! There’s several good and quick tutorial videos in there

> **[Variables](https://docs.thunkable.com/v/drag-and-drop/variables)**

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [July 22, 2022, 4:47pm UTC](https://community.thunkable.com/t/solved-how-do-i-collect-location-long-and-lat-data-from-google-maps-and-store-that-to-a-data-source/1970475/12 "2022-07-22T16:47:38Z")

</div>

Because you are new to Thunkable, I’m giving you a project that can be a starting block.  
[https://x.thunkable.com/copy/e873463825440fea0e23c7eb24ad63a5](https://x.thunkable.com/copy/e873463825440fea0e23c7eb24ad63a5)  
The project has two screens, a login screen that upon successful login will take you to the other screen which you can use in your phone and whenever you click on the button, it will check that your name is available in the table and if it is then it will update the location otherwise it will add a new row.

This is the Google sheet that goes with the project

> **[myTestSheet](https://docs.google.com/spreadsheets/d/1jLiNkT4AJ3Hkh-imTJlJo10aSkxLB-PnzTbgnrdeUqA/edit?usp=sharing)**
>
> Users
> 
> Username,Password,LastLogin
> Muneer,121212
> John,999999
> Mark,555555

Happy Thunking

---

<div class="post-metadata">

**Author:** ![leviocsmithk](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/leviocsmithk/32/136645_2.png) [@leviocsmithk](https://community.thunkable.com/u/leviocsmithk)\
**Post date:** [July 23, 2022, 1:33am UTC](https://community.thunkable.com/t/solved-how-do-i-collect-location-long-and-lat-data-from-google-maps-and-store-that-to-a-data-source/1970475/13 "2022-07-23T01:33:45Z")

</div>

Thanks

---

<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:13pm UTC](https://community.thunkable.com/t/solved-how-do-i-collect-location-long-and-lat-data-from-google-maps-and-store-that-to-a-data-source/1970475/14 "2024-11-08T13:13:04Z")

</div>


