我正在尝试从Windows Phone 8.1的Geoposition中获取CivicAddress。
我尝试使用以下代码:
// Get Current Location
var geolocator = new Geolocator();
geolocator.DesiredAccuracyInMeters = 100;
var position = await geolocator.GetGeopositionAsync();
// Get Country
var country = position.CivicAddress.Country;
因为CivicAddress字段为空,所以会抛出NullReferenceException。我知道Windows 8没有提供CivicAddress提供程序。我想检查一下Windows Phone 8.1是否也是如此。如果是这样,我该如何获取/编写CivicAddress提供程序?