cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
JayFernback
Level: Powered On

"Freeze" GPS Information

Hi,

 

I'm working on an app to capture photos and submit them to an excel file in a onedrive location. After taking the picture, the user needs to give the picture a name, and click a Submit button. The excel is then populated with the path where the picture is stored, the name given by the user, the timestamp, and the gps information.

 

The problem is that I'm getting unrealistic data because if the user is moving (let's say he is taking pictures while riding the bus) the GPS data keeps updating while the user is filling the form, and the coordinates that he submits are the ones when he pressed the Submit button, and not the ones when he took the picture.

Is there any way to keep the gps data static once the picture has been taken? Maybe copying the coordinates from one textbox to another one as plain text or something similar? I really can't think of anything.

 

Any ideas will be greatly appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
Power Apps Staff murali
Power Apps Staff

Re: "Freeze" GPS Information

You could save off the image and the associated gps information in a context variable/collection of some sort.

 

UpdateContext({Pic: ..., Position: {Latitude: Location.Latitude, Longitude: Location.Longitude}})

 

and then when the user clicks on Submit, get the information from the context variable

 

Hope this helps

 

Thanks

Murali

View solution in original post

5 REPLIES 5
Power Apps Staff murali
Power Apps Staff

Re: "Freeze" GPS Information

You could save off the image and the associated gps information in a context variable/collection of some sort.

 

UpdateContext({Pic: ..., Position: {Latitude: Location.Latitude, Longitude: Location.Longitude}})

 

and then when the user clicks on Submit, get the information from the context variable

 

Hope this helps

 

Thanks

Murali

View solution in original post

JayFernback
Level: Powered On

Re: "Freeze" GPS Information

Thanks a lot Murali. Worked perfectly.

Anonymous
Not applicable

Re: "Freeze" GPS Information

Hi Murali,

 

Why I am not able to see any numbers when I gave Location.Latitude in a text box?

 

Do I need to enable something?

 

Capture.PNG

 

Meneghino
Level 10

Re: "Freeze" GPS Information

Hi @Anonymous, you only see this information when you run the app on a moblie device with GPS enabled.

You will not see any information in PowerApps studio.

luuminhvuong93
Level: Powered On

Re: "Freeze" GPS Information

@Meneghino for a user sometimes they enabled GPS but it is still missing at times (some data has GPS, some data doesnt)

what could have been the issue?

Helpful resources

Announcements
thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Kudoed Authors (Last 30 Days)
Users online (4,179)