Live Location - not for production use

holy moly this is awesome!

1 Like

@jpascuet A distance column will calculate the distance from a user’s current location to a specified location without any user interaction, but that is only on the user’s device. The distance is not stored in the database on the server. While I was able to figure out a way to get the live coordinates for the user in this case, the current location and distance is calculated only on the user’s device and the active location is also not stored in the database for other’s to view. No, I don’t believe this app does any sort of location calculations when the app is in the background.

@Nanda_Munisamy No, I don’t feel comfortable sharing how I got this to work. This would go against Glide’s purpose of requiring the use of the Location Component to acquire a user’s location with their consent. I don’t intend for this to be a workaround to expose a person’s location without their consent. It’s also a very complex workaround to get it to work correctly. It’s also not always accurate, even though I’ve been able to improve that quite a bit. Also, it sometimes just stops working for me, which requires a restart of the app.

1 Like

As a land surveyor, i approve this :rofl:
Back to b-tech calculations!

If you still working on this a bit of an advice

  • pick that 3 location, that you always stay within the area of the triangle
  • never use a short straight line
1 Like

It was a fun challenge and I had it pretty accurate and able to dynamically move the 3 points, so the tri-lateration always kept up and I always had an accurate location because I would always be within the 3 points. The only problem is, I think glide has a bug somewhere where javascript crashes and can’t recover, so the app would halfway stop responding after a few minutes. I had put Try Catches in the code, but there would still be a hard crash somewhere.

Now, the newer Location component in glide will dynamically track your live location, so my code isn’t really needed anymore. I’ve since created a new version that uses the new Glide Apps. It’s a lot simpler and more stable. I also have it calculating a bearing from target to destination and I’m close to having it accurately calculate live speed and compass bearing of the user. Some Glide limitations are getting in the way, but I think I have an idea to get past that.

If I use this for anything, it will be geocaching, but other than that, it’s just a fun project to see what I can do with complex math.


I believe this needs to be updated to the docs, this is a big update.

1 Like

Is there a tutorial video on how to use this? @ThinhDinh / @Jeff_Hager

I don’t have a video on how I set any of this up. To be honest, it hasn’t been very reliable and occasionally crashes, at least for the stuff I was doing.

My original version did a lot of trigonometry to calculate a live location, but it was not something that would be updated on the database. All of that math became unnecessary with New Apps, because the location component updates the location continuously.

At the most basic level you could add a location component and have it write to a column in the table. As long as the switch is on, it should continuously update with your current location. However, I haven’t verified, but I think this can eat through updates very quickly because you would be continuously updating a column value every few seconds.

This was just a project to see if I could do it. It was not meant to be something that would be used in a normal production environment.

Here is documentation on how to use the Location Component.