![](/img/trans.png)
[英]How to display Current Location and Nearby Places in windows phone application 8.1 using bing maps
[英]Windows Phone: To search for places in HERE Maps
GeocodeQuery
仅提供位置结果。 我想搜索提供我当前坐标的单词“ restaurants”,并在结果中获取所有restaurant。 就像实际的HERE Maps工作一样。 我该如何实现?
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
参考中所述,请使用ExploremapsSearchPlacesTask
ExploremapsSearchPlacesTask searchMap = new ExploremapsSearchPlacesTask();
searchMap.Location = new GeoCoordinate(60.35, 24.60);
searchMap.SearchTerm = "Restaurants";
searchMap.Show();
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.