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!
source share