沒有您的原始值沒有問題:請求以下
http://maps.googleapis.com/maps/api/distancematrix/xml?origins=BOCA RAYTON|33401&destinations=300 North Dixie Highway, Suite 350, WPB&mode=driving&sensor=false&language=en-EN&units=imperial
當我:
<DistanceMatrixResponse>
<status>OK</status>
<origin_address>Boca Raton, Floride, États-Unis</origin_address>
<origin_address>West Palm Beach, Floride 33401, États-Unis</origin_address>
<destination_address/>
<row>
<element>
<status>NOT_FOUND</status>
</element>
</row>
<row>
<element>
<status>NOT_FOUND</status>
</element>
</row>
</DistanceMatrixResponse>
的問題是圍繞着目標地址,這是不解決,所以結果不找到。
如果你把一個正確的目標(如300 North Dixie Highway, 33401
):
http://maps.googleapis.com/maps/api/distancematrix/xml?origins=BOCA+RATON|33401&destinations=300%20North%20Dixie%20Highway,%2033401&mode=driving&sensor=false&language=en-EN&units=imperial
你將有你的結果:
<DistanceMatrixResponse>
<status>OK</status>
<origin_address>Boca Raton, Floride, États-Unis</origin_address>
<origin_address>West Palm Beach, Floride 33401, États-Unis</origin_address>
<destination_address>300 North Dixie Highway, West Palm Beach, Floride 33401, États-Unis</destination_address>
<row>
<element>
<status>OK</status>
<duration>
<value>1623</value>
<text>27 minutes</text>
</duration>
<distance>
<value>43944</value>
<text>27,3 miles</text>
</distance>
</element>
</row>
<row>
<element>
<status>OK</status>
<duration>
<value>0</value>
<text>1 minute</text>
</duration>
<distance>
<value>4</value>
<text>13 pieds</text>
</distance>
</element>
</row>
</DistanceMatrixResponse>
爲我的作品,找不到目的地:HTTP:// maps.googleapis.com/maps/api/distancematrix/xml?origins=BOCA%20RAYTON|33401&destinations=300%20North%20Dixie%20Highway,%20Suite%20350,%20WPB&mode=driving&sensor=false&language=en-EN&units=imperial – geocodezip 2014-08-27 15:53:02