I need to get Geocoordinate object with my Longitude and Latitude. Cannot get Geocoordinates by new() https://msdn.microsoft.com/en-us/library/windows/apps/windows.devices.geolocation.geocoordinate One way is for example this code
var locator = new Geolocator();
locator.DesiredAccuracyInMeters = 50;
var position = await locator.GetGeopositionAsync();
Geocoordinate Coordinate = position.Coordinate;
Which gets GPS coordinate. But I need Geocoordinate with my Longitude and Latitude.
You cannot create a
Geocoordinate
since it is a sealed, read-only class. Instead, bind to aGeopoint
, which contains all the location info you need without the location service baggage thatGeocoordinate
has.public Geopoint Location { get; set; }
Maps:MapControl.Location="{Binding Location}"