如何在 UWP 中获取本地化的 MapLocation?

How to get localized MapLocation in UWP?

我正在使用一种简单的方法 returns 为我绘制地图位置,但我只想获取英文地址。

public static async Task<MapLocation> ResolveLocationForGeopoint(Geopoint geopoint)
{
    MapLocationFinderResult result = await MapLocationFinder.FindLocationsAtAsync(geopoint);

    if (result.Status == MapLocationFinderStatus.Success)
    {
        if (result.Locations.Count != 0)
            // Check if the result is really valid
            if (result.Locations[0].Address.Town != "")
                return result.Locations[0];
    }
    return null;
}

我的问题是:当我的 windows 语言是俄语时,它是 returns 西里尔字符。

我已尝试覆盖应用程序语言:

ApplicationLanguages.PrimaryLanguageOverride = "en";

不过好像不行...

如何从这个方法中获取本地化的字符串?

MapLocationFinder.FindLocationsAtAsync method does not provide a mechanism to specify the language used in the returned address now. It always automatically uses the Windows display language. And in most cases, the Street and Town 已根据当地文化进行本地化。例如,如果您请求位于法国的位置,街道名称将本地化为法语。

作为解决方法,我们可以使用 Bing Maps REST Services which provides REST APIs that can specify Culture Parameter. For FindLocationsAtAsync method, we can use Find a Location by Point,如下所示:

http://dev.virtualearth.net/REST/v1/Locations/47.64054,-122.12934?c=en-US&key=BingMapsKey

此外,欢迎您在 WPDev User Voice 上提交功能请求以请求此功能。