Windows Phone:在HERE地图中搜索地点
本文关键字:搜索 地图 HERE Phone Windows | 更新日期: 2023-09-27 18:16:58
GeocodeQuery
只给出位置结果。我想搜索提供我当前坐标的单词"restaurants",并在结果中获得所有餐馆。就像真正的HERE地图一样。我怎样才能实现它?
MyGeocodeQuery = new GeocodeQuery();
MyGeocodeQuery.SearchTerm = searchTerm;
MyGeocodeQuery.GeoCoordinate = MyCoordinate == null ? new GeoCoordinate(0, 0) : MyCoordinate;
MyGeocodeQuery.QueryCompleted += GeocodeQuery_QueryCompleted;
MyGeocodeQuery.QueryAsync();
只给出位置结果而不给出位置。
您可以使用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();
更多参考,你可以去这里如何使用Windows Phone 8的地图任务
如API
参考中所述,使用explormapssearchplacestask
ExploremapsSearchPlacesTask searchMap = new ExploremapsSearchPlacesTask();
searchMap.Location = new GeoCoordinate(60.35, 24.60);
searchMap.SearchTerm = "Restaurants";
searchMap.Show();