UWP-059 - UWP Weather - Accessing the GPS Location

Sign in to queue

The Discussion

  • User profile image
    Brent Goodman

    When running this, I was getting exception errors in the "LocationManager.cs" file when it was called. To resolve the issue, I had to open the file "Package.appxmanifest", and then from the "Capabilities" tab, select the "Location" checkbox. Once I ran the application again, this time I was presented with the dialog box asking to allow the application to access my location. No further errors.

  • User profile image

    Also worth noting: Geolocation access status always results to "Denied" if the user has disabled location in windows 10 (settings --> privacy --> location), and there seems no way to circumvent it. The user will never see the app's prompt to allow location.

  • User profile image

    For me, where i am located, the JSON returned this for the wind:


    Since the Wind class had "deg" as an integer, it would fail. I had to change the class to accept a double for deg.


  • User profile image

    How can I use an external USB/Bluetooth GPS?

  • User profile image

    From the line of get latitude and longitude are "position.Coordinate.Point.Position.Latitude" and "Position.Coordinate.Point.Position.Longitude", accordingly.

    I tried it, and it works.

Add Your 2 Cents