cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Ninijca
Frequent Visitor

Location function not working properly

Hi,

 

I am using Location.Latitude and Location.Longitude to get the user's location but I'm always getting incorrect location. Is this always like this or are there other options how to get the long-lat of the user?

 

Thank you everyone. 

2 ACCEPTED SOLUTIONS

Accepted Solutions
timl
Super User
Super User

Hi @Ninijca 

In general, it is not possible to get accurate location on a desktop computer because in general, desktop computers do not include the GPS hardware that usually exists in phones. The location value will usually be derived from network IDs, and it will be potentially inaccurate, especially if you were connected through a corporate/work proxy server, or connected through a VPN with a different regional endpoint.

View solution in original post

timl
Super User
Super User

Hi @Ninijca 

Unforunately, I don't think it's possible to retrieve the location through the SharePoint app.

On the Android version at least, we can see through the permissions that are published in the Play store, that the SharePoint app doesn’t request the location permission. This would prevent the SharePoint app from being able to retrieve a location value from the device.

 

timl_0-1610628722521.png

In comparison, we can see that the permissions list for the Power Apps app does include location.

 

image.png

 

 

View solution in original post

7 REPLIES 7
WarrenBelz
Super User
Super User

Hi @Ninijca ,

This must be device issue - we use it on dozens of iPads daily finding power poles and it is always very accurate.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

timl
Super User
Super User

Hi @Ninijca 

Can you clarify what you mean when you say that you're getting incorrect locations?
If by this you mean you're getting 0 values, the most likely cause is that the mobile device has disabled the location signal for battery saving purposes. You can re-enable it like so:

 

 https://powerusers.microsoft.com/t5/Building-Power-Apps/Get-GPS-coordinates-on-ANDROID-TABLET-and-SM...

 

Enable(Location)

 

If you're using an Android device and your long/lat readings are inaccurate, you can fix this though the settings of the device by changing the location setting to "high accuracy".

https://support.google.com/maps/answer/2839911?co=GENIE.Platform%3DAndroid&hl=en

 

Ninijca
Frequent Visitor

@timl Thank you for your reply.

 

I've been using a list Power Apps form and I'm opening it using a SharePoint app and it can't get my location. Using my laptop, it does not give the correct location. Using my phone's browser seems okay. Is there any way I can get the correct location using a SharePoint app and my computer?

 

Thanks again.

timl
Super User
Super User

Hi @Ninijca 

In general, it is not possible to get accurate location on a desktop computer because in general, desktop computers do not include the GPS hardware that usually exists in phones. The location value will usually be derived from network IDs, and it will be potentially inaccurate, especially if you were connected through a corporate/work proxy server, or connected through a VPN with a different regional endpoint.

View solution in original post

Ninijca
Frequent Visitor

@timl 

Thank you. How about the SharePoint App in mobile phones? Is it possible to get the location? When opening the form, I get an error that it can't get the location. 

timl
Super User
Super User

Hi @Ninijca 

Unforunately, I don't think it's possible to retrieve the location through the SharePoint app.

On the Android version at least, we can see through the permissions that are published in the Play store, that the SharePoint app doesn’t request the location permission. This would prevent the SharePoint app from being able to retrieve a location value from the device.

 

timl_0-1610628722521.png

In comparison, we can see that the permissions list for the Power Apps app does include location.

 

image.png

 

 

View solution in original post

Ninijca
Frequent Visitor

@timl 

Thank you for helping. 

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

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.

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