c# - 没有标签的 Windows Phone BingMapsDirectionsTask 位置

标签 c# .net bing-maps windows-phone

我想使用 BingMapsDirectionsTask 从当前位置导航到指定位置。 这是我的代码:

        BingMapsDirectionsTask bingMapsDirectionsTask = new BingMapsDirectionsTask();
        LabeledMapLocation lml = new LabeledMapLocation();
        lml.Location = location;
        bingMapsDirectionsTask.End = lml;
        bingMapsDirectionsTask.Show();

它不起作用,因为我没有任何标签,你可以看到这个截图: http://i.stack.imgur.com/HoqRm.png

我可以使用仅带有纬度/经度参数的 BingMapsDirectionsTask 吗?

谢谢你的回答

最佳答案

尝试使用这样的东西:

BingMapsDirectionsTask Direction = new BingMapsDirectionsTask();    
LabeledMapLocation lml = new LabeledMapLocation("Your location here", null)
Direction.End = lml;
Direction.Show();

关于c# - 没有标签的 Windows Phone BingMapsDirectionsTask 位置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9052707/

相关文章:

c# - 如何在 WPF 应用程序中实现不同的 View 状态

c# - 为什么引用和值类型的集合之间的 Enumerable Min 或 Max 不一致?

c# - 如何在开机时启动后台任务 - Windows 应用商店应用

c# - 了解数据绑定(bind)

c# - 使用 DataContractSerializer 时设置属性的初始值

bing-maps - 信息框 z-index 上的内部 HTML - 信息框位于引脚下方

javascript - 使用复选框有条件地更新 Bing map 上的标记

c# - Ninject 缓存对象,应该处理掉,内存泄漏?

c# - 添加 .dll 作为引用。无法理解错误消息

javascript - 如何在Google Maps中实现类似InfoWindow的Bing map ?