如何使用 Google Maps API / Directions API 获取道路危险
我正在尝试绘制带有交通图层的地图并显示道路状况(建筑、事故等)。使用 Google Maps API / Google Directions API,我如何获取对所显示的交通状况的引用,或更具体地说,沿路径/路线的条件?谢谢。
I am trying to draw a map with the traffic layer and display road conditions (constructions, accidents, etc.) Using the Google Maps API / Google Directions API, how can I obtain a reference to the traffic conditions that are displayed, or more specifcally, the conditions along a path / route? Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 Google Maps API v3 中,文档表示您显示像这样的交通状况:
我认为这不会显示特定的危险(例如事故或施工),而只是显示交通缓慢。您几乎肯定必须从 Google 地图以外的来源获取此类数据。
这个问题被标记为 Google Maps API v3(这是我上面回答的)和 Android。我不知道这对你的Android原生编程是否有帮助,但希望它不是没有用处。 (更新:看起来问题现在已被重新标记以删除 API v3 标签。)
In Google Maps API v3, the documentation says you display traffic conditions like this:
I don't think this will display specific hazards (like accidents or construction) but simply slow traffic. You would almost certainly have to get such data from a source that wasn't Google Maps.
This question was tagged as both Google Maps API v3 (which is what I answered with above) and Android. I don't know if this helps you for Android native programming, but hopefully it's not useless. (Update: Looks like the question has now been retagged to remove the API v3 tag.)