【问题标题】:GPS Navigation Service for Windows Phone 7适用于 Windows Phone 7 的 GPS 导航服务
【发布时间】:2014-05-19 19:41:14
【问题描述】:

我正在 WP7 中编写旅行应用程序。是否可以在 WP7 上使用 Bing 地图导航到 GPS 坐标。

我的意思是我有 GPS 坐标,按钮“前往”,点击它后,我会有到达该点的路线(通过 Bing 服务)?

【问题讨论】:

    标签: windows-phone-7 windows-phone-8 navigationservice


    【解决方案1】:

    我尚未在 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();
    

    【讨论】:

      【解决方案2】:

      您可以使用以下 URI 方案打开 Here Drive(由诺基亚提供):

      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

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2011-09-02
        相关资源
        最近更新 更多