【发布时间】:2014-06-13 16:10:01
【问题描述】:
Here Maps:我最初使用此代码在类别搜索中获取地址,但现在地址似乎已被删除并替换为 HTML 中的邻近属性。这是正确的吗?有没有办法获得这种详细程度?
if (locations[i].address.house != undefined) {
catResults2 = catResults2 + locations[i].address.house + " "
}
if (locations[i].address.street != undefined) {
catResults2 = catResults2 + locations[i].address.street
}
if (locations[i].address.district != undefined) {
catResults2 = catResults2 + ", " + locations[i].address.district
}
if (locations[i].address.city != undefined) {
catResults2 = catResults2 + ", " + locations[i].address.city
}
if (locations[i].address.state != undefined) {
catResults2 = catResults2 + ", " + locations[i].address.state
}
if (locations[i].address.postalCode != undefined) {
catResults2 = catResults2 + " " + locations[i].address.postalCode
}
if (locations[i].address.country != undefined) {
catResults2 = catResults2 + ", " + locations[i].address.country
}
if (locations[i].address.countryCode != undefined) {
catResults2 = catResults2 + " " + locations[i].address.countryCode
};
【问题讨论】: