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

Location of user

Hi. 

Can anyone explain, how in Powerapps sample apps - Site Inspector, the address field is being updated using the GPS option? Because i am also trying to do the same for my app.

5 REPLIES 5
Steelman70
Level 10

Re: Location of user

Hi , it's done using the Location function.
More details in the documentation.
Mod_admin
Level: Powered On

Re: Location of user

Using the location function, you get the latitude and longtude How to convert that into address and show it on a map?

Steelman70
Level 10

Re: Location of user

Hi again, nothing out of the box I think. You probably need to use some custom api like google maps. Or wait for there to be one in PowerApss
Highlighted
Community Support Team
Community Support Team

Re: Location of user

Hi @Mod_admin,

 

In the Site inspector template app, the user location is calling bing map REST API to convert the latitude and longitude from location function into actual address.

The formula used in the corresponding map image is the following:

"http://dev.virtualearth.net/REST/v1/Imagery/Map/Road/" 
& Location.Latitude 
&"," & Location.Longitude & "/15?mapSize=400,400&pp=" & Location.Latitude
&"," & Location.Longitude
&";"
&"
&key=wg9mvoY3hN6AVoUPutnZ~y8lVN1szjh6d5E8Vs8h48A~AtTHu5h2www6JiWYy5l3eKT8Cfl7SDg4f4jJUiwVL9beAGFEPcLyCe2iBvkF--_9"

51.PNG

And the template is using the following URL format:

Static Map Data

Combining the point value with the Bing map URL, then put the combined URL with the Image property of an image control, then you would get the location shown as in the template.

For the location function, check:

Location in PowerApps

 

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Mod_admin
Level: Powered On

Re: Location of user

Hi @v-micsh-msft,

Thanks a lot. Calling the static bing map api worked. 

Also can i store the address hence obtained(in the image using Map API) as text in a sharepoint list?

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 214 members 5,093 guests
Please welcome our newest community members: