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

get gps coordinates

i need to have a button when press ill get the gps coordinates in a datacard text input

 

can you hel please ?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Anonymous
Not applicable

Re: get gps coordinates

Set a button with variables:

 

UpdateContext({var_currentLat: Location.Latitude})
;;
UpdateContext({var_currentLong: Location.Longitude})

 

And a label text property :

 

"Latitude: " & var_currentLat & " Long" & var_currentLong

 

Press the button see if it works

View solution in original post

3 REPLIES 3
PowerApps Staff CarlosFigueira
PowerApps Staff

Re: get gps coordinates

You can set a variable with the GPS coordinates (using the Location signal), and set the Default property of the text input control to use that variable. For example, if you set this expression to the button's OnSelect property:

UpdateContext({lat: Location.Latitude, lng: Location.Longitude})

And you set the Default property of the text input control to

lat & "," & lng

Then when you press the button the coordinates will be shown in the text input control.

Highlighted
Anonymous
Not applicable

Re: get gps coordinates

Set a button with variables:

 

UpdateContext({var_currentLat: Location.Latitude})
;;
UpdateContext({var_currentLong: Location.Longitude})

 

And a label text property :

 

"Latitude: " & var_currentLat & " Long" & var_currentLong

 

Press the button see if it works

View solution in original post

SoB
Level: Powered On

Re: get gps coordinates

This gives me My coordinates.

What if i want coordinates of another user in my organization.

 

something like :

Office365Users.UserProfileV2("abc@xyz.com").Location.Latitude

Helpful resources

Announcements
thirdimage

Power Automate 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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 234 members 4,468 guests
Please welcome our newest community members: