【发布时间】:2014-05-19 19:41:14
【问题描述】:
我正在 WP7 中编写旅行应用程序。是否可以在 WP7 上使用 Bing 地图导航到 GPS 坐标。
我的意思是我有 GPS 坐标,按钮“前往”,点击它后,我会有到达该点的路线(通过 Bing 服务)?
【问题讨论】:
标签: windows-phone-7 windows-phone-8 navigationservice
我正在 WP7 中编写旅行应用程序。是否可以在 WP7 上使用 Bing 地图导航到 GPS 坐标。
我的意思是我有 GPS 坐标,按钮“前往”,点击它后,我会有到达该点的路线(通过 Bing 服务)?
【问题讨论】:
标签: windows-phone-7 windows-phone-8 navigationservice
我尚未在 Windows Phone 7 上对此进行测试,但从 this MSDN article 来看,它也适用于 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(由诺基亚提供):
guidance-drive://v2.0/navigate/destination/?latlon=52.53,13.41&title=Museum
这将切换应用程序,然后开始导航到52.52/13.41。标题是可选的。
【讨论】: