Google Maps Directions in XML or JSON with other travel modes

蓝咒 提交于 2019-12-09 07:18:18

问题


I'm trying to get the directions for travel modes other than driving but the api doesn't seem to respect the dirflg parameter.

http://maps.googleapis.com/maps/api/directions/json?origin=111%20Davisville%20Avenue,Toronto,ON&destination=469%20King%20Street%20West,%20Toronto,%20ON&sensor=false&dirflg=w

Can anyone tell me what the correct url is? Thank you in advance.


回答1:


the parameter is mode, as in mode=walking: http://maps.googleapis.com/maps/api/directions/json?origin=111%20Davisville%20Avenue,Toronto,ON&destination=469%20King%20Street%20West,%20Toronto,%20ON&sensor=false&mode=walking



来源:https://stackoverflow.com/questions/8735938/google-maps-directions-in-xml-or-json-with-other-travel-modes

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!