如何在Windows Phone 8.1 Universal App中获取街道地址的地理位置?

我的Windows Phone用户将在文本字段中输入街道地址。 我需要获取该地址字符串的地理位置,以便稍后我可以计算该地理位置的距离和电话的当前地址。

所以,我的问题是:
如何在Windows Phone 8.1 Universal App中获取街道地址的地理位置?

我在这个stackoverflow答案中找到了一个解决方案,但是,它适用于旧的Silverlight应用程序,而不是我目前正在使用的新的Universal Store应用程序API。

以下是获取地理位置以及启动路线默认地图的代码

这是MSDN链接

// Nearby location to use as a query hint. BasicGeoposition queryHint = new BasicGeoposition(); // DALLAS queryHint.Latitude = 32.7758; queryHint.Longitude = -96.7967; Geopoint hintPoint = new Geopoint(queryHint); MapLocationFinderResult result = await MapLocationFinder.FindLocationsAsync( "street, city, state zip", hintPoint, 3); if (result.Status == MapLocationFinderStatus.Success) { if (result.Locations != null && result.Locations.Count > 0) { Uri uri = new Uri("ms-drive-to:?destination.latitude=" + result.Locations[0].Point.Position.Latitude.ToString() + "&destination.longitude=" + result.Locations[0].Point.Position.Longitude.ToString() + "&destination.name=" + "myhome"); var success = await Windows.System.Launcher.LaunchUriAsync(uri); } }