谷歌地图API [英] Google Directions API
问题描述
在JSON输出,有一个字段动作是步骤之内。在这种转左,转右,开启轻微左等例子是<一个href=\"http://maps.googleapis.com/maps/api/directions/json?origin=acton,ca&destination=burbank,cA&sensor=false&departure_time=1343605500&mode=bicycling\">here
In the JSON output, there is a field "maneuver" within a "step". In this "turn-left", "turn-right", "turn-slight-left", etc. Example is here
我在哪里能找到的机动字段的定义,和可能的值的列表?有没有相关描述这里
Where could I find the definition of the "maneuver" field, and the list of possible values? There is no relevant description here
在此先感谢
推荐答案
根据<一个href=\"https://$c$c.google.com/p/gmaps-api-issues/issues/detail?id=4297&q=apitype=DirectionsAPI&colspec=ID%20Type%20Status%20Introduced%20Fixed%20Summary%20Stars%20ApiType%20Internal\">this GMaps实现-API的问题我认为谷歌并不急于文档API,这部分:(
according to this gmaps-api-issue I think google not in hurry to document this part of api :(
但我可以帮助解决这个问题,至少有以下......在机动字段是一步行动的简短说明。我想谷歌的脚本,用它申请的CSS类<一个href=\"https://developers.google.com/maps/documentation/javascript/examples/directions-panel\">direction面板。我注意到,每个步骤的图标取决于CSS类.adp- {} maneuver_name。对于面板CSS文件中包含18个教学班的面具,我已经提取演习的列表:
But I can help with this issue at least with following... The "maneuver" field is the short description of step's action. I suppose google's script uses it for applying css classes to direction panel. I noticed that icon for each step depends on css class ".adp-{maneuver_name}". Css file for panel contains 18 classes with that mask and I had extracted list of maneuvers:
- 把锋利左
- uturn右
- 开启轻微右
- 合并
- 环岛左
- 环岛向右
- uturn左
- 开启轻微左
- 转左
- 斜坡权
- 转右
- 叉右
- 直
- 叉左
- 渡轮火车
- 把锋利权
- 斜坡离开
- 渡轮
工作期间,我发现了回旋字段,它不具有css类的两个额外值:
During the work I found two additional values of the "maneuver" field, which doesn't have css classes:
- 保留左
- 保权
我不能保证这个列表的丰满,但我在我的项目中使用这个列表,它工作正常。
I can't guarantee fullness of this list, but I used this list in my project and it works properly.
这篇关于谷歌地图API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!