这导致包含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