top button
Flag Notify
Site Registration

Windows Phone: How to get Geolocatort current Location in c#?

+1 vote
256 views
Windows Phone: How to get Geolocatort current Location in c#?
posted Jul 10, 2015 by Puhal

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

Geolocator class is used to get the current location

async private void GetCurrentLocation()
        {
            var geolocator = new Geolocator();

            Geoposition position = await geolocator.GetGeopositionAsync();

            Geocoordinate coordinate = position.Coordinate;

            MessageBox.Show("Latitude = " + coordinate.Latitude + " Longitude = " + coordinate.Longitude);
        }
answer Jul 13, 2015 by Jdk
...