【问题标题】:How to get distance by city + zipCode on google maps API如何在谷歌地图API上按城市+邮政编码获取距离
【发布时间】:2012-01-21 02:17:26
【问题描述】:
http://maps.googleapis.com/maps/api/distancematrix/xml?origins=PLACE,ZIPCODE&destinations=PLACE,ZIPCODE&sensor=false

我需要通过地名和邮政编码获取两个地方之间的距离。但是当我传递以“逗号”分隔的参数时,它不起作用。这两个参数怎么传?

【问题讨论】:

    标签: javascript google-maps google-maps-api-3 google-api


    【解决方案1】:

    使用+分隔地名和邮政编码:

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

    【讨论】:

      【解决方案2】:

      【讨论】:

      • 这对我有用。您只能使用一个,而不是更多的起点/终点
      猜你喜欢
      • 1970-01-01
      • 2012-05-07
      • 2014-12-30
      • 2012-05-18
      • 2019-01-01
      • 2014-04-04
      • 2022-01-15
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多