4

GeocodeQueryを使用して、検索語の座標を調べます。

// 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 , e.g.
    myMap.Center = e.Result[0].GeoCoordinate;
    myMap.ZoomLevel = 2;
  }
}
geoQuery.QueryAsync();

それはうまくいきます!「台北」についての位置情報を取得することに成功し、

でも、繁体字の「台北」で「台北」を検索すると、

コールバック関数 geoQuery.QueryCompleted には何もありません。

e.Result.Count = 0

GeocodeQuery 検索を別の言語で処理するにはどうすればよいですか?? 助けてくれてありがとう!

4

1 に答える 1