Google地理位置为无效地址提供坐标

时间:2014-12-02 08:18:04

标签: google-maps geolocation google-geocoding-api google-geolocation

当使用googles地理位置,只发送随机数字或不存在的地址时,它仍然会给我们一个位置的答案。

为什么它会在一个明显不存在的地址上给出一个位置?

实施例

http://maps.googleapis.com/maps/api/geocode/xml?address=sdfsdfsdfsdf%209999999%20ghkhkgh&components=country:SE&sensor=false

结果

<result>
  <type>country</type>
  <type>political</type>
  <formatted_address>Sweden</formatted_address>
  <address_component>
    <long_name>Sweden</long_name>
    <short_name>SE</short_name>
    <type>country</type>
    <type>political</type>
  </address_component>
  <geometry>
<location>
  <lat>60.1281610</lat>
  <lng>18.6435010</lng>
</location>
<location_type>APPROXIMATE</location_type>
<viewport>
  <southwest>
    <lat>55.3367024</lat>
    <lng>10.9683721</lng>
  </southwest>
  <northeast>
    <lat>69.0599709</lat>
    <lng>24.1660240</lng>
  </northeast>
</viewport>
<bounds>
  <southwest>
    <lat>55.3367024</lat>
    <lng>10.9631866</lng>
  </southwest>
  <northeast>
    <lat>69.0599709</lat>
    <lng>24.1668093</lng>
  </northeast>
</bounds>
  </geometry>
  <partial_match>true</partial_match>
</result>

1 个答案:

答案 0 :(得分:0)

用户&#39; geocodezip&#39;在评论中正确提到,地址验证与地址编码不同。但是,有一些工具可以同时执行这两个功能。例如,我工作的公司制作YAddress,它们都会验证地址并在一次通话中对其进行地理编码。