Windows Phone 7的GPS导航服务



我正在用WP7编写旅游应用程序。在WP7上使用必应地图可以导航到GPS坐标吗?

我的意思是我有GPS坐标,按钮"旅行到",点击它后,我将有路线到那个点(由Bing服务)?

我还没有在Windows Phone 7上测试过,但从MSDN的文章来看,它也适用于WP 7.1。

示例如下:

BingMapsDirectionsTask bingMapsDirectionsTask = new BingMapsDirectionsTask();
// You can specify a label and a geocoordinate for the end point.
// GeoCoordinate spaceNeedleLocation = new GeoCoordinate(47.6204,-122.3493);
// LabeledMapLocation spaceNeedleLML = new LabeledMapLocation("Space Needle",     spaceNeedleLocation);
// If you set the geocoordinate parameter to null, the label parameter is used as a   search term.
LabeledMapLocation spaceNeedleLML = new LabeledMapLocation("Space Needle", null);
bingMapsDirectionsTask.End = spaceNeedleLML;
// If bingMapsDirectionsTask.Start is not set, the user's current location is used as the start point.
 bingMapsDirectionsTask.Show();

您可以使用以下URI方案打开Here Drive (by Nokia):

guidance-drive://v2.0/navigate/destination/?latlon=52.53,13.41&title=Museum

这将切换应用,然后开始导航到52.52/13.41。标题可选。

来源:http://developer.nokia.com/resources/library/Lumia/maps-and-navigation/here-launchers/wp-uri-schemes-for-location-applications/drive-guidance.html

最新更新