Windows phone 8 Map API GeocodeQuery.SearchTerm received nothing received

I use GeocodeQuery to find the coordinates of a search query.

// Get your current position var myPosition = await new Geolocator().GetGeopositionAsync(TimeSpan.FromMinutes(1), TimeSpan.FromSeconds(10)); // Define search var geoQuery = new GeocodeQuery(); geoQuery.SearchTerm = "Taipei"; geoQuery.GeoCoordinate = new GeoCoordinate(myPosition.Coordinate.Latitude, myPosition.Coordinate.Longitude); geoQuery.QueryCompleted += (s, e) => { if (e.Error == null && e.Result.Count > 0) { // e.Result will contain a list of coordinates of matched places. // You can show them on a map control , eg myMap.Center = e.Result[0].GeoCoordinate; myMap.ZoomLevel = 2; } } geoQuery.QueryAsync(); 

It works well! I got some place about Taipei successfully,

But when I search for "Taipei" in the cross Chinese "",

I got nothing in the geoQuery.QueryCompleted callback function,

 e.Result.Count = 0 

How should I handle a search for GeocodeQuery in another language? Thanks for any help!

+4
source share
1 answer

Geocoding uses the system language to perform the search. If you change the language of your phone to Chinese, you should get the results.

+1
source

Source: https://habr.com/ru/post/1484631/


All Articles