Windows Phone:在HERE地图中搜索地点

时间:2014-08-08 04:42:19

标签: c# xaml windows-phone-8 maps here-api

GeocodeQuery仅提供位置结果。我想搜索提供当前坐标的“餐馆”这个词,并在结果中找到所有的餐馆。就像实际的HERE Maps工作一样。我怎样才能实现它?

   MyGeocodeQuery = new GeocodeQuery();
   MyGeocodeQuery.SearchTerm = searchTerm;
   MyGeocodeQuery.GeoCoordinate = MyCoordinate == null ? new GeoCoordinate(0, 0) :     MyCoordinate;
   MyGeocodeQuery.QueryCompleted += GeocodeQuery_QueryCompleted;
   MyGeocodeQuery.QueryAsync();

这只提供位置结果,而不是地方。

2 个答案:

答案 0 :(得分:0)

您可以使用MapTask

  MapsTask mapsTask = new MapsTask();
  //Omit the Center property to use the user's current location.
  //mapsTask.Center = new GeoCoordinate(47.6204, -122.3493);
  mapsTask.SearchTerm = "coffee";
  mapsTask.ZoomLevel = 2;
  mapsTask.Show();

如需更多参考,请访问How to use the Maps task for Windows Phone 8

答案 1 :(得分:0)

API引用中所述,请使用ExploremapsSearchPlacesTask

ExploremapsSearchPlacesTask searchMap = new ExploremapsSearchPlacesTask();
searchMap.Location = new GeoCoordinate(60.35, 24.60);
searchMap.SearchTerm = "Restaurants";
searchMap.Show();