2017-02-22 73 views
0

我目前正在與Google Maps API爭鬥。谷歌地圖Api只查找省

例如,哥斯達黎加的聖何塞。 有一個叫做'聖何塞'的城市和一個省'聖何塞'。我需要找到該省。所以我用這個請求:

http://maps.googleapis.com/maps/api/geocode/xml?address=San José Province&components=country:CR&language=nl

你可能會認爲這應該返回省聖何塞,但事實並非如此。它返回城市。

<type>locality</type> 
<type>political</type> 

當我搜索: http://maps.googleapis.com/maps/api/geocode/xml?address=San Jose Province&components=country:CR&language=nl (唯一的區別是Ë而不是在聖何塞的é) 它返回的省。

<type>administrative_area_level_1</type> 
<type>political</type> 

但當然這是用語法和輸入是「sanjosé」。 我怎樣才能得到各省的成果? (administrative_area的)

回答