Live Location - not for production use

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

Have a great weekend!

1 Like

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!

1 Like

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.

1 Like

We have a problem here Houston!

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

I swear I didn’t touch anything on APP @Jeff_Hager :innocent:

3 Likes

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??? :thinking:

2 Likes

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

1 Like

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

1 Like

:rofl:

1 Like

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

1 Like

:thinking: 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. :joy::joy::joy:

1 Like

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

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

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

2 Likes

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.

2 Likes

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.

2 Likes