Namespaces

Variants
Actions

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

在Windows Phone 8中使用MapsTask搜索周边信息

From Wiki
Jump to: navigation, search
SignpostIcon HereMaps 99.png
WP Metro Icon WP8.png
Article Metadata

兼容于
文章
Cxt_programmer 在 25 Apr 2013 创建
最后由 hamishwillee 在 26 Jun 2013 编辑

介绍

WindowsPhone 8中,地图服务完全由Nokia Maps提供,同时推出了MapsTask接口,方便开发者调用地图相关的功能。

本文简要介绍如何使用MapsTask搜索周边信息。

代码范例

MapsTask mapsTask = new MapsTask();
//获取用户当前位置信息,例如39.9490551785059, 116.415766341717
mapsTask.Center = new GeoCoordinate(39.9490551785059, 116.415766341717);
mapsTask.SearchTerm = "咖啡馆";
mapsTask.ZoomLevel = 17;
 
mapsTask.Show();


实际应用中,可以使用Geolocator接口获取用户当前的位置信息,然后传递给MapsTask,搜索用户周边的信息。

This page was last modified on 26 June 2013, at 06:42.
137 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×