最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

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

programmeradmin3浏览0评论
,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

发布评论

评论列表(0)

  1. 暂无评论