javascript - How to get distance by city + zipCode on google maps API - Stack Overflow

,ZIPCODE&destinations=PLACE,ZIPCODE&sensor=falseI need to get distance between two places by pl

,ZIPCODE&destinations=PLACE,ZIPCODE&sensor=false

I need to get distance between two places by place name and zip code. But when I pass parameters separated by "ma" it doesn't work. How to pass this two parameters?

http://maps.googleapis./maps/api/distancematrix/xml?origins=PLACE,ZIPCODE&destinations=PLACE,ZIPCODE&sensor=false

I need to get distance between two places by place name and zip code. But when I pass parameters separated by "ma" it doesn't work. How to pass this two parameters?

Share Improve this question edited Dec 15, 2011 at 11:30 1110 asked Dec 15, 2011 at 11:14 11101110 6,85956 gold badges187 silver badges346 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 6

Use + to seperate the place name and the zip code:

http://maps.googleapis./maps/api/distancematrix/xml?origins=NEW+YORK+11535&destinations=WASHINGTON+20544&sensor=false

it is also possible to give ONLY the zip code:

https://maps.googleapis./maps/api/distancematrix/json?units=imperial&origins=38017|85353&destinations=94109|33128|95117&key=YOUR_API_KEY

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745411947a4626574.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信