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

How to add GPS to get current Location in mobile app

Hi All!!

I want to get my current location using GPS and need to store in SharePoint.

How can I achieve this??

Thanks in Advance!!

1 ACCEPTED SOLUTION

Accepted Solutions
v-qiaqi-msft
Community Support
Community Support

Hi@jeniviya,

Based on the issue that you mentioned, do you want to get location name based on the "Location.Longitude" and "Location.Lattitude"?

Could you please share a bit more about the scenario, what is the column type in your SP list to store the location, Text or Location type?

As we know, the Location type is only editable within the SP list and is read-only in PowerApps. There is no way to update the Location column directly in PowerApps. So I advise that you'd better add Text type columns to store the location name.

I have a test on my side, please take a try as below.

How to get Bing Map API Key:

  • Connect to Bing Maps Portal
  • ‘Sign In’ using either ‘Microsoft Account’ or ‘Enterprise Azure Active Directory account’.
  • Go to ‘My account -> My Keys’ and create a new key. (Steps to create new key)
  • Copy the Key which we gonna use in next steps.

Connect the BingMaps to your App:

  • Paste your API key within the input box

Inset a Button and a TextInput.

Set the OnSelect property of the Button as below:

 

Set(myLocation, BingMaps.GetLocationByPoint(Location.Latitude, Location.Longitude))

 

Set the Default property of the TextInput as below:

 

myLocation.name

 

Add a second button and set the OnSelect property as below:

 

Patch(MyLocation,Defaults(MyLocation),{Title:1001,Location:TextInput1.Text})

 

Note: 'MyLocation' is my SP list name. 'The 'Location' is a Text column to store my location.

16.png

Hope it could help.

Best Regards,

Qi

 

Best Regards,
Qi

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @jeniviya ,

 

Assume you already connected your SharePoint list with PowerApps that you are developing, then you can use "Location" and "Location.Longitude" and "Location.Lattitude" to retrieve the information and of course including adding and editing and saving your location information to your SharePoint.

I tried with  "Location.Longitude" and "Location.Lattitude", But it's not giving exact location /accurate Location.

Anonymous
Not applicable

Hi @jeniviya ,

 

Then you can add "Bing Map" to your connection, use the Longitude and Latitude as the input so that you can have the address... As Longitude and Latitude is only a number...

v-qiaqi-msft
Community Support
Community Support

Hi@jeniviya,

Based on the issue that you mentioned, do you want to get location name based on the "Location.Longitude" and "Location.Lattitude"?

Could you please share a bit more about the scenario, what is the column type in your SP list to store the location, Text or Location type?

As we know, the Location type is only editable within the SP list and is read-only in PowerApps. There is no way to update the Location column directly in PowerApps. So I advise that you'd better add Text type columns to store the location name.

I have a test on my side, please take a try as below.

How to get Bing Map API Key:

  • Connect to Bing Maps Portal
  • ‘Sign In’ using either ‘Microsoft Account’ or ‘Enterprise Azure Active Directory account’.
  • Go to ‘My account -> My Keys’ and create a new key. (Steps to create new key)
  • Copy the Key which we gonna use in next steps.

Connect the BingMaps to your App:

  • Paste your API key within the input box

Inset a Button and a TextInput.

Set the OnSelect property of the Button as below:

 

Set(myLocation, BingMaps.GetLocationByPoint(Location.Latitude, Location.Longitude))

 

Set the Default property of the TextInput as below:

 

myLocation.name

 

Add a second button and set the OnSelect property as below:

 

Patch(MyLocation,Defaults(MyLocation),{Title:1001,Location:TextInput1.Text})

 

Note: 'MyLocation' is my SP list name. 'The 'Location' is a Text column to store my location.

16.png

Hope it could help.

Best Regards,

Qi

 

Best Regards,
Qi

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (1,692)