cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
roncam
Helper II
Helper II

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
Anonymous
Not applicable

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
CarlosFigueira
Power Apps
Power Apps

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.

Anonymous
Not applicable

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

Anonymous
Not applicable

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
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,331)