鸿蒙传说
我认为外包这个问题是最好的选择:把它发送给谷歌(或雅虎)的地编码器。Geo编码器不仅返回lat/long(这里不感兴趣),还返回地址的丰富解析,其中填充了您没有发送的字段(包括ZIP+4和Country)。例如,解析“1600AmphitheaParkway,山景城,CA”就会产生这样的结果。{
"name": "1600 Amphitheatre Parkway, Mountain View, CA, USA",
"Status": {
"code": 200,
"request": "geocode"
},
"Placemark": [
{
"address": "1600 Amphitheatre Pkwy, Mountain View, CA 94043, USA",
"AddressDetails": {
"Country": {
"CountryNameCode": "US",
"AdministrativeArea": {
"AdministrativeAreaName": "CA",
"SubAdministrativeArea": {
"SubAdministrativeAreaName": "Santa Clara",
"Locality": {
"LocalityName": "Mountain View",
"Thoroughfare": {
"ThoroughfareName": "1600 Amphitheatre Pkwy"
},
"PostalCode": {
"PostalCodeNumber": "94043"
}
}
}
}
},
"Accuracy": 8
},
"Point": {
"coordinates": [-122.083739, 37.423021, 0]
}
}
]}现在那是可以解释!