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 III
Super User III

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 III
Super User III

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 III
Super User III

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 III
Super User III

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 III
Super User III

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 III
Super User III

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

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (74,517)