经过航路点时,Bing 地图 REST 返回错误方向

发布于 2024-12-08 19:44:57 字数 2105 浏览 5 评论 0原文

我正在开发一个利用 BING 地图及其方向 REST 服务的 Android 应用程序。我允许用户输入出发地、目的地和避开类型(即避开高速公路、收费站等)来获取方向。 BING 返回路线后,我将它们显示在 BING 地图上,然后允许用户保存路线。我保存涉及的每个航路点。用户稍后可以在 BING 地图上显示他们保存的路线。此时,我将每个路径点传递给 BING 以获取方向。正如您在下面的屏幕截图中看到的,第一个方向仅使用起点和目的地(并避免类型)创建,第二个方向纯粹是在通过保存的每个航路点时创建的。

我已经确认了这一点从初始请求返回的航点与我保存并传回 BING 的航点完全相同。

以下是我在以下屏幕中使用的一些实时查询:
<一href="http://dev.virtualearth.net/REST/v1/Routes/Driving?wp.0=40.797768,-111.947299&wp.1=40.793368,-111.943672&wp.2=40 .7934,-111.939231&wp.3=40.725911,-111.939&wp.4=40.72558 9,-111.911137&wp.5=40.72546,-111.888247&wp.6=40.725439, -111.87122&wp.7=40.6657,-111.864848&wp.8=40.63854,-111。 834571&wp.9=40.637478,-111.808838&wp.10=40.619352,-111。 789488&wp.11=40.633739,-111.723919&wp.12=40.631808,-111.71923&optmz=时间&rpo=积分&tl=3.0E-6&du=英里" rel="nofollow noreferrer">我生成的 BING REST 链接
<一href="http://www.bing.com/maps/?v=2&cp=40.70858203667544~-111.83644562959671&lvl=11&dir=0&st y=r&rtp=pos.40.797768_-111.947299_40.797768,%20-111.947299___e_~pos.40.793368_-111.943672_40.793368,%20-1 11.943672___e_~位置40.7934_-111.939231_40.7934,%20-111.939231___e_~位置40.725911_-111.939_40.725911,%20-111。 939___e_~位置.40.725589_-111.911137_40.725589,%20-111.911137___e_~位置.40.72546_-111.888247_40.72546,%20-111.88 8247___e_~位置.40.725439_-111.87122_40.725439,%20-111.87122___e_~位置.40.6657_-111.864848_40.6657,%20-111.8648 48___e_~位置.40.63854_-111.834571_40.63854,%20-111.834571___e_~位置.40.637478_-111.808838_40.637478,%20-111.808 838___e_~位置40.619352_-111.789488_40.619352,%20-111.789488___e_~位置40.633739_-111.723919_40.633739,%20-111。 723919___e_~pos.40.631808_-111.71923_40.631808,%20-111.71923___e_&mode=D&rtop=0~0~0~&form=LMLTCC" rel="nofollow noreferrer">查询每个航路点

关于发生了什么或者我可以做些什么来解决这个问题有什么想法吗?这就好像BING想进一步优化路线,结果却让情况变得更糟。在第二张图片中,您可以看到您下了高速公路,然后返回,然后再次下车,然后返回到刚刚下车的地方。

初始输入出发地和目的地的良好路线:
输入出发地和目的地的初始地图。这很好

通过保存的航点获取错误路线: 航点路线

I'm working on an Android app that utilizes BING maps and their directions REST service. I allow the user to input origin, destination, and avoid types (i.e. avoid highways, tolls, etc...) to obtain directions. After BING returns the directions I display them on a BING map and then allow the user to save the directions. I save each waypoint that is involved. The user later can display their saved directions back on a BING map. At this point I pass each waypoint to BING to get the directions. As you can see in the screen shots below, the first directions are created with just an Origin and Destination (and avoid types), and the second one is purely created on passing each waypoint that was saved.

I've confirmed that the waypoints that come back from the initial request are the exact same as the waypoints I'm saving and passing back to BING.

Here are some live queries that I used for the screens below:
My generated link to BING REST
Query with each waypoint

Any ideas as to what is going on or what I can do to fix this? It's like BING wants to further optimize the route, but ends up making it worse. In the second picture you can see it has you get off the freeway, then back on, then get off again and then back track to where you just got off.

Good Route with initial input with Origin and Destination:
Initial map with origin and destination entered.  This is good

Bad Route being obtained with saved waypoints:
waypoint route

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

美人迟暮 2024-12-15 19:44:57

听起来这可能是 bing 库的问题。您是否尝试过用它们填写错误报告?

Sounds like it might be a problem with the bing library. Have you tried filling a bug report with them?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文