我正在用WP7编写旅游应用程序。是否可以导航到WP7上的必应地图的全球定位系统坐标。
我的意思是,我有GPS坐标,按钮“旅行到”,然后点击它,我将有路线到那个点(由必应服务)?
发布于 2014-05-19 11:40:34
我还没有在Windows 7上测试过这一点,但从这篇MSDN文章来看,它也适用于WP7.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();发布于 2014-05-19 11:41:14
您可以使用以下URI方案打开这里驱动器(由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
https://stackoverflow.com/questions/23736267
复制相似问题