# Live Location - not for production use

**URL:** <https://community.glideapps.com/t/live-location-not-for-production-use/26227>\
**Category:** Project Showcase\
**Created:** [April 30, 2021, 3:07pm UTC](https://community.glideapps.com/t/live-location-not-for-production-use/26227 "2021-04-30T15:07:02Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [April 30, 2021, 3:07pm UTC](https://community.glideapps.com/t/live-location-not-for-production-use/26227/1 "2021-04-30T15:07:02Z")

</div>

Had to share this since it was kind of a fun side project just to see if I could do it.

I found a way to live track a location based on trilateration and calculating the location based on the distance to three other known points. This will not report the location back to the database as it’s calculated locally on the device, but it could be combined with other actions to write the location to a sheet.

**DISCLAIMER** : _This goes against Glide’s intentions with the Location component, which requires a user’s explicit permission to share their location each time it’s required. Because of that, I will not be sharing how I achieved this unless Glide explicitly agrees to it. It also is highly inaccurate once you start to get several miles away from your last calibrated location. (I don’t know if this is an error in my math, a limitation in the decimal precision of the math used, or the irregularities of earth itself.) I am not tracking or saving any location data, so there is no need to worry if you choose to play with the app. Everything should be kept anonymous as long as you don’t sign in. I just wanted to see if this was possible._

This method still asks for location access, but there is no switch required. This is purely based on math to calculate a location based on 3 known points. The funny thing is that technically this uses your GPS location to figure out your location and the distance to the 3 other locations, so it’s a bit counter-intuitive. 😄 I’m using my location to figure out my location. Weird right? It’s more a way of exposing a very complicated and inaccurate way to avoid the location switch.

There’s two buttons on the screen. A reset button to reset to an anonymous default location, and a Calibrate button, which should calibrate to find your current location. This will place a pin on both maps, but if you look closely, you will see the pin actually moving with your current location. It’s amazingly accurate around my home, but I haven’t tested it while actual moving a sizable distance from my home. I’m really curious how well it works for others around the world. I’m skeptical about how well it works, but a couple of tests with a GPS spoofer seems to prove that it does work pretty well.

> **[Location](https://magical-space-0475.glideapp.io/)**

Let me know how well it works for you.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [April 30, 2021, 3:23pm UTC](https://community.glideapps.com/t/live-location-not-for-production-use/26227/2 "2021-04-30T15:23:32Z")

</div>

This is great. I will deffo give this a try tomorrow morning. For now, it gives the correct address when I walk around my house.

Funny how the URL reads magical-space haha, it deffo is.

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [April 30, 2021, 3:25pm UTC](https://community.glideapps.com/t/live-location-not-for-production-use/26227/3 "2021-04-30T15:25:56Z")

</div>

Hehe, it is magical!

---

<div class="post-metadata">

**Author:** ![SantiagoPerez](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/santiagoperez/32/16807_2.png) [@SantiagoPerez](https://community.glideapps.com/u/SantiagoPerez)\
**Post date:** [April 30, 2021, 5:21pm UTC](https://community.glideapps.com/t/live-location-not-for-production-use/26227/4 "2021-04-30T17:21:27Z")

</div>

Great job @Jeff_Hager

As of right now it does give me my location and moves around as I do.

I will test it during my 90 miles drive home later after school and let you know.

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [April 30, 2021, 6:22pm UTC](https://community.glideapps.com/t/live-location-not-for-production-use/26227/5 "2021-04-30T18:22:24Z")

</div>

Neato Petitto!

---

<div class="post-metadata">

**Author:** ![Rosewebstudio](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/rosewebstudio/32/12261_2.png) [@Rosewebstudio](https://community.glideapps.com/u/Rosewebstudio)\
**Post date:** [April 30, 2021, 6:56pm UTC](https://community.glideapps.com/t/live-location-not-for-production-use/26227/6 "2021-04-30T18:56:35Z")

</div>

> [@Jeff\_Hager](#):
>
> unless Glide explicitly agrees to it.

Are you going to ‘explicitly’ ask?

It’s certainly an interesting idea and amazing how you worked that through… 👍

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [April 30, 2021, 7:32pm UTC](https://community.glideapps.com/t/live-location-not-for-production-use/26227/7 "2021-04-30T19:32:13Z")

</div>

Hehe, no, I’m not going to ask. Purely based on the response below. If Glide wanted to allow us to obtain a user’s location unprompted, I’m sure they would have given us that option. Totally understandable too. It would be way to easy to hide a location grab within a custom action. Like I said above, it’s using my current location to obtain my current location, so it’s a bit pointless in theory, although it would be awesome to skip the location switch, it does start to get into some scary territory of user tracking.

> [@compass Location Component](https://community.glideapps.com/t/location-component/10976/9):
>
> I’m guessing the intention is to make the user aware that their location is being obtained, so it’s a switch as opposed to automatically obtaining the location behind the scenes like the special values do.

> [@compass Location Component](https://community.glideapps.com/t/location-component/10976/10):
>
> Correct.

---

<div class="post-metadata">

**Author:** ![Rosewebstudio](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/rosewebstudio/32/12261_2.png) [@Rosewebstudio](https://community.glideapps.com/u/Rosewebstudio)\
**Post date:** [April 30, 2021, 7:41pm UTC](https://community.glideapps.com/t/live-location-not-for-production-use/26227/8 "2021-04-30T19:41:20Z")

</div>

😉 👍 don’t want to get into ‘scary territory’ no way! Great example of your talents though Mr H (as always)

Have a great weekend!

---

<div class="post-metadata">

**Author:** ![SantiagoPerez](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/santiagoperez/32/16807_2.png) [@SantiagoPerez](https://community.glideapps.com/u/SantiagoPerez)\
**Post date:** [April 30, 2021, 10:46pm UTC](https://community.glideapps.com/t/live-location-not-for-production-use/26227/9 "2021-04-30T22:46:56Z")

</div>

I tested your app on the road. For the most part it updates the marker every second or two. I could drive about 20 miles w/o having to recalibrate.

Im not sure if it is due to the internet connection but at some points I had to calibrate for it to update. It works flawlessly though.

Great job!

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [April 30, 2021, 11:27pm UTC](https://community.glideapps.com/t/live-location-not-for-production-use/26227/10 "2021-04-30T23:27:03Z")

</div>

Awesome! I’m surprised it stayed pretty accurate for that far. One of these days I’ll have to test it myself on the road.

---

<div class="post-metadata">

**Author:** ![gvalero](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gvalero/32/1037_2.png) [@gvalero](https://community.glideapps.com/u/gvalero)\
**Post date:** [April 30, 2021, 11:33pm UTC](https://community.glideapps.com/t/live-location-not-for-production-use/26227/11 "2021-04-30T23:33:40Z")

</div>

We have a problem here Houston!

My location is in Nigeria and before, I was in Australia… wtf? 🤣

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/1/4/14e8972689d91369ee40c2ec9617b63cb56f91d3.png)

I swear I didn’t touch anything on APP @Jeff_Hager 😇

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [April 30, 2021, 11:54pm UTC](https://community.glideapps.com/t/live-location-not-for-production-use/26227/12 "2021-04-30T23:54:53Z")

</div>

Well, I never said it was perfect. I think the calculations can get messed up if it calculates to zero in some cases, which throws the whole thing off. I tried to have the reset button zero out to 0 Latitude and 0 Longitude, but that didn’t work out very well, so I had to pick some off the wall location for the reset.

Or maybe the ‘,’ to ‘.’ decimal conversion is doing something weird???

…or maybe you are very well traveled…

…or I invented teleportation??? 🤔

---

<div class="post-metadata">

**Author:** ![gvalero](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gvalero/32/1037_2.png) [@gvalero](https://community.glideapps.com/u/gvalero)\
**Post date:** [April 30, 2021, 11:58pm UTC](https://community.glideapps.com/t/live-location-not-for-production-use/26227/13 "2021-04-30T23:58:32Z")

</div>

> [@Jeff\_Hager](#):
>
> Or maybe the ‘,’ to ‘.’ decimal conversion is doing something weird???

ahhh!!! … that can be the problem source in my case!

---

<div class="post-metadata">

**Author:** ![Krivo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/krivo/32/5363_2.png) [@Krivo](https://community.glideapps.com/u/Krivo)\
**Post date:** [May 1, 2021, 12:00am UTC](https://community.glideapps.com/t/live-location-not-for-production-use/26227/14 "2021-05-01T00:00:21Z")

</div>

@gvalero we might meet as I’m also there. Maybe Jeff is trying to make a tinder app actually 🙂

---

<div class="post-metadata">

**Author:** ![gvalero](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gvalero/32/1037_2.png) [@gvalero](https://community.glideapps.com/u/gvalero)\
**Post date:** [May 1, 2021, 12:04am UTC](https://community.glideapps.com/t/live-location-not-for-production-use/26227/15 "2021-05-01T00:04:18Z")

</div>

> [@Krivo](#):
>
> we might meet as I’m also there. Maybe Jeff is trying to make a tinder app actually

🤣

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [May 1, 2021, 12:19am UTC](https://community.glideapps.com/t/live-location-not-for-production-use/26227/16 "2021-05-01T00:19:01Z")

</div>

Hey, it’s a small world, and Glide has made all that much smaller. 😉

---

<div class="post-metadata">

**Author:** ![Wiz.Wazeer](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/wiz.wazeer/32/72423_2.png) [@Wiz.Wazeer](https://community.glideapps.com/u/Wiz.Wazeer)\
**Post date:** [May 15, 2021, 12:07pm UTC](https://community.glideapps.com/t/live-location-not-for-production-use/26227/17 "2021-05-15T12:07:18Z")

</div>

🤔 how did I miss this one and what am I doing in Greenland Sea ?

Glad you didn’t make this copiable. Imagine this on my taxi apps. 😂😂😂

---

<div class="post-metadata">

**Author:** ![jpascuet](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jpascuet/32/39486_2.png) [@jpascuet](https://community.glideapps.com/u/jpascuet)\
**Post date:** [March 17, 2022, 11:11am UTC](https://community.glideapps.com/t/live-location-not-for-production-use/26227/18 "2022-03-17T11:11:32Z")

</div>

Hi all, very nice looking app and very useful sample!  
I have a question, can this app or how this app register the location and calculate distance for every 10 seconds, to register a path without user interaction?  
Can this track app still working in backgroud?

Best regards to all community  
Juan

---

<div class="post-metadata">

**Author:** ![Nanda\_Munisamy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nanda_munisamy/32/14991_2.png) [@Nanda\_Munisamy](https://community.glideapps.com/u/Nanda_Munisamy)\
**Post date:** [March 20, 2022, 10:26am UTC](https://community.glideapps.com/t/live-location-not-for-production-use/26227/19 "2022-03-20T10:26:20Z")

</div>

Hi Jeff can you share details how to get this work in another app  
I am learning to Glide for some time now & wanted to have the Geolocation pick up automatically .  
Thanks

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [March 20, 2022, 10:36am UTC](https://community.glideapps.com/t/live-location-not-for-production-use/26227/20 "2022-03-20T10:36:28Z")

</div>

Did you read the disclaimer in Jeff’s original post?

> [@Jeff\_Hager](#):
>
> I will not be sharing how I achieved this

[Next page](https://community.glideapps.com/t/live-location-not-for-production-use/26227.md?page=2)
