Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我使用该链接上使用的方法来显示两个 GeoPoints 之间的路线:
为什么使用 KML 数据检索适用于 Android 的 Google 路线不再有效?
我想知道是否有办法获得步行路线而不是驾车路线。
您需要在 URL 中使用 mode 参数值。
在这里查看,可以附加到 URL 的不同参数。
为了在 URL 中提供 Mode 值,您只支持 4 种模式。
此处记录了支持的模式值。
示例网址: http://maps.googleapis.com/maps/api/directions/json?origin=Toronto&destination=Montreal&sensor=false&mode=walking
示例网址:
http://maps.googleapis.com/maps/api/directions/json?origin=Toronto&destination=Montreal&sensor=false&mode=walking