這導致包含street_number
JSON字符串 - http://maps.googleapis.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&sensor=false谷歌地圖地理編碼 - 沒有街道號碼?
"long_name" : "1600",
"short_name" : "1600",
"types" : [ "street_number" ]
然而,這不會導致包含street_number
一個JSON字符串 - http://maps.googleapis.com/maps/api/geocode/json?address=26th+St+2nd+Ave+New+York,+NY+10019&sensor=false。 26th St
部分似乎消失了。任何想法爲什麼?
我不是要求Google近似街道地址。我已經提供。 – StackOverflowNewbie
對不起,我剛剛注意到...但同樣的想法適用。不幸的是,你無能爲力,只能處理不一致的問題。您可以查找street_address或路由組件,如果兩者都未找到,則假定您未找到街道號碼。 – Omtara