# Retrieve Latitude and Longitude From Firebase and Display it on Google Map

**URL:** <https://community.thunkable.com/t/retrieve-latitude-and-longitude-from-firebase-and-display-it-on-google-map/1670580>\
**Category:** Questions about Thunkable X\
**Tags:** beginner\
**Created:** [January 12, 2022, 11:10am UTC](https://community.thunkable.com/t/retrieve-latitude-and-longitude-from-firebase-and-display-it-on-google-map/1670580 "2022-01-12T11:10:18Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![ErenYeager](https://avatars.discourse-cdn.com/v4/letter/e/e19adc/32.png) [@ErenYeager](https://community.thunkable.com/u/ErenYeager)\
**Post date:** [January 12, 2022, 11:10am UTC](https://community.thunkable.com/t/retrieve-latitude-and-longitude-from-firebase-and-display-it-on-google-map/1670580/1 "2022-01-12T11:10:18Z")

</div>

Hello, i’m a new beginner in using Thunkable and my English is not that good. However, i hope someone can help me regarding this topic. Let me explain about my project, so right now i’m developing a GPS Tracking System for Public Transportation. This system will send the latitude and longitude of the vehicle to the Firebase. From there, an android application developed using Thunkable will retrieve those data and display it on Google Map. Thus, since I’m still new in Thunkable, can someone help me on how to do the second part? I still haven’t designed the block system for the Android Application, that’s why I hope someone can assist me or giving me a link on how to do it.

---

<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:** [January 12, 2022, 4:03pm UTC](https://community.thunkable.com/t/retrieve-latitude-and-longitude-from-firebase-and-display-it-on-google-map/1670580/2 "2022-01-12T16:03:56Z")

</div>

As I see it, there are several things you need to set up:

1. Send lat/lon data to Firebase
2. Get lat/lon data from Firebase
3. Display lat/lon data in Google Map

Are you wanting help with #3? If so, are you able to display a Google Map with manually-entered lat/lon values? Have you gotten #1 or #2 to work yet?

---

<div class="post-metadata">

**Author:** ![ErenYeager](https://avatars.discourse-cdn.com/v4/letter/e/e19adc/32.png) [@ErenYeager](https://community.thunkable.com/u/ErenYeager)\
**Post date:** [January 12, 2022, 4:37pm UTC](https://community.thunkable.com/t/retrieve-latitude-and-longitude-from-firebase-and-display-it-on-google-map/1670580/3 "2022-01-12T16:37:40Z")

</div>

Yes, I already did #1 but not #2 and #3. As for displaying a Google Map with manually-entered lat/lon values, I haven’t tried that yet but the purpose of my project is for real time monitoring of vehicle location. Thus, my objective is to automatically get the data from Firebase and display it on Google Map. I am not sure if Thunkable can do that, so I hope you can help me. But I do find some videos from Youtube about manually entering the lat/lon in Thunkable and display it on Google Map. However, it will not achieved my previous objective as the user will need to manually entered it.

---

<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:** [January 12, 2022, 4:50pm UTC](https://community.thunkable.com/t/retrieve-latitude-and-longitude-from-firebase-and-display-it-on-google-map/1670580/4 "2022-01-12T16:50:03Z")

</div>

Yes, Thunkable can do that.

The reason I ask if you’ve been able to manually display manually-entered lat/lon values in Google Maps is that often people ask “How do I do x, y, and z?” and they make the question too complicated. If something doesn’t work, it’s then hard to know what caused it because there are so many possible causes. So keeping things simple is important. If you can get that to work, then we can go from there and add in Firebase data.

Retrieving Firebase data is as simple as getting the value of a cloud variable with the path to the data. For example:

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

---

<div class="post-metadata">

**Author:** ![ErenYeager](https://avatars.discourse-cdn.com/v4/letter/e/e19adc/32.png) [@ErenYeager](https://community.thunkable.com/u/ErenYeager)\
**Post date:** [January 12, 2022, 7:25pm UTC](https://community.thunkable.com/t/retrieve-latitude-and-longitude-from-firebase-and-display-it-on-google-map/1670580/5 "2022-01-12T19:25:14Z")

</div>

Thank you for the clarification. Yes I do admit that sometimes people tend to ask complicated things and I maybe one of them, lol.

After retrieving the data from the firebase, how do I display it on Google Maps? Can you explain it more details because I’m still not used to Thunkable. Sorry if I’m asking too much. So here’s an example for my database and you can see that there is a lat/long for the bus location.

 ![WhatsApp Image 2022-01-12 at 16.14.01](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/d/4dffe4d25d4aa57199fea259e06933149345a875.jpeg)

Then based on your explanation, I will retrieve the data using the cloud variable. Next, can you please show me how to display it on Google Maps?

---

<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:** [January 12, 2022, 7:56pm UTC](https://community.thunkable.com/t/retrieve-latitude-and-longitude-from-firebase-and-display-it-on-google-map/1670580/6 "2022-01-12T19:56:49Z")

</div>

I don’t really use Google Maps much in Thunkable but you can read the [documentation](https://docs.thunkable.com/map) or do a Google search for _Google Maps Thunkable_ to see tutorial videos.

It’s not terribly difficult. Again, I recommend you start with static/test values that you manually input. Once that’s working, retrieve the Firebase data and test it with that.

If you get stuck anywhere, post a screenshot of the blocks you’ve tried.

---

<div class="post-metadata">

**Author:** ![ErenYeager](https://avatars.discourse-cdn.com/v4/letter/e/e19adc/32.png) [@ErenYeager](https://community.thunkable.com/u/ErenYeager)\
**Post date:** [January 12, 2022, 8:19pm UTC](https://community.thunkable.com/t/retrieve-latitude-and-longitude-from-firebase-and-display-it-on-google-map/1670580/7 "2022-01-12T20:19:45Z")

</div>

Sure, thank you for your help. I will try it first, then posted it here if there’s any problem.

---

<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:** [January 12, 2022, 10:13pm UTC](https://community.thunkable.com/t/retrieve-latitude-and-longitude-from-firebase-and-display-it-on-google-map/1670580/8 "2022-01-12T22:13:29Z")

</div>

Not sure how helpful this is but if you’re getting the data already, it should get you over the hump you’re on.

[https://x.thunkable.com/projectPage/61a63fc5a0964b0010d6a431](https://x.thunkable.com/projectPage/61a63fc5a0964b0010d6a431)

This example saves/retrieves data from airtable but the concept of displaying it is no different than when using firebase.

Get your points and loop through the list, putting markers where they need to be

---

<div class="post-metadata">

**Author:** ![ErenYeager](https://avatars.discourse-cdn.com/v4/letter/e/e19adc/32.png) [@ErenYeager](https://community.thunkable.com/u/ErenYeager)\
**Post date:** [January 13, 2022, 4:54am UTC](https://community.thunkable.com/t/retrieve-latitude-and-longitude-from-firebase-and-display-it-on-google-map/1670580/9 "2022-01-13T04:54:52Z")

</div>

Thank you for sharing this. You really help me a lot by giving an example with a complete block diagram. Yes, I guess this will work, let me try it later.

---

<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:** [April 13, 2022, 4:55am UTC](https://community.thunkable.com/t/retrieve-latitude-and-longitude-from-firebase-and-display-it-on-google-map/1670580/10 "2022-04-13T04:55:14Z")

</div>

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