从 Bing 地图 AJAX 控件访问 RoutePath
使用 RoutePath 类 http://msdn.microsoft.com/en-us/library/gg427610.aspx" rel="nofollow">Bing 地图 AJAX 控件,版本 7.0?
我已加载方向模块,计算方向并调用 DirectionsManager 类的 getRouteResult 方法。不幸的是,它不返回实际路线的坐标。
最终,我需要构成路线的形状的坐标。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
感谢 Microsoft 的帮助,我找到了 RoutePath 的公开方式。通过以下方式访问 RoutePath:
假设您有两个路径点,这非常有效。否则,您需要循环遍历routeLegs和subLegs才能获取整个路线。
RouteLeg 表示通过两个航路点的路径。 subLeg 表示通过停止点和途经点(或两个途经点)的路径。 DirectionsManager 类 API 提供了有关此信息的更多详细信息。
Thanks to some help from Microsoft, I've found how RoutePath is exposed. Access RoutePath by:
This works great assuming you have two waypoints. Otherwise, you'll need to loop through routeLegs and subLegs to get the entire route.
A routeLeg represents the path through two waypoints. A subLeg represents the path through a stop point and via point (or two via points). The DirectionsManager Class API has more detail on this information.