我想只有一個從Web服務自動完成獨特的結果:爲什麼Google的Places服務使用不同屬性(place_id,coords ecc ..)爲我提供兩次相同的城市?
,這是響應
{
"predictions": [
{
"description": "Naples, Metropolitan City of Naples, Italy",
"id": "b2aaa9753e7bab447d0a3f71a2336c8bb96c3cac",
"matched_substrings": [
{
"length": 6,
"offset": 0
},
{
"length": 3,
"offset": 37
}
],
"place_id": "ChIJ6_p622YIOxMRfriMZcxDOtI",
"reference": "ClRCAAAA6jM0wQfsTkmn2G9JhSrJK1XN5mdK0nFiE_iNiSpmOpzWV9E5cE7Bn5hnxEZy7EfQrTm5uDagf82Sjc-6wBhd7ZtYgLUXArJNYcI1WogVH6USEGz0Cao3FSrzmLlNiP5zhqAaFKa_hu7uIBoAvErvdqhSfF-r7QfZ",
"structured_formatting": {
"main_text": "Naples",
"main_text_matched_substrings": [
{
"length": 6,
"offset": 0
}
],
"secondary_text": "Metropolitan City of Naples, Italy",
"secondary_text_matched_substrings": [
{
"length": 3,
"offset": 29
}
]
},
"terms": [
{
"offset": 0,
"value": "Naples"
},
{
"offset": 8,
"value": "Metropolitan City of Naples"
},
{
"offset": 37,
"value": "Italy"
}
],
"types": [
"locality",
"political",
"geocode"
]
},
{
"description": "Napoli, Metropolitan City of Naples, Italy",
"id": "4d33ea47519b8f9c04635b1a9bae12f04197b99d",
"matched_substrings": [
{
"length": 6,
"offset": 0
},
{
"length": 3,
"offset": 37
}
],
"place_id": "ChIJRw3rhP-wOxMRP2qkGuYBOxo",
"reference": "ClRCAAAAZZJtsiAUKI1qcM0-X_srZwzECGVTK4FtCwEVnUxa7xZJOV5VIyjYDXjqZ6miFEQ1_-yge9sGrbYsQAxOUgriaYZj1juHpRJiKijVRFztW40SEFtfe85oDpHJndMpB2KVxw4aFFKZyol4j79xsZ6f6GlA9osp-uSh",
"structured_formatting": {
"main_text": "Napoli",
"main_text_matched_substrings": [
{
"length": 6,
"offset": 0
}
],
"secondary_text": "Metropolitan City of Naples, Italy",
"secondary_text_matched_substrings": [
{
"length": 3,
"offset": 29
}
]
},
"terms": [
{
"offset": 0,
"value": "Napoli"
},
{
"offset": 8,
"value": "Metropolitan City of Naples"
},
{
"offset": 37,
"value": "Italy"
}
],
"types": [
"locality",
"political",
"geocode"
]
}
],
"status": "OK"
}
你可以看到它返回了我同一個城市有不同的地點id,名稱,座標但類型相同。爲什麼這個?