Given the following API call to autocomplete:
https://maps.googleapis.com/maps/api/place/autocomplete/json?types=address&input=23%20norton%20st
I get the following response:
{
"predictions": [
{
"description": "23 Norton Street, Leichhardt, New South Wales, Australia",
"id": "9711c656faa60f77a05680b603523a4bc75c45be",
"place_id": "EjgyMyBOb3J0b24gU3RyZWV0LCBMZWljaGhhcmR0LCBOZXcgU291dGggV2FsZXMsIEF1c3RyYWxpYQ",
"types": [
"route",
"geocode"
]
},
...
],
"status": "OK"
}
Notice the types are of route and geocode.
If I query the detail API:
I get the following:
{
"html_attributions": [],
"result": {
"id": "e698fdcd9dceed8fe42a926a19cb2b17d4f5f088",
"name": "23 Norton St",
"place_id": "ChIJpdXOTxewEmsRMmpMxLBgFpI",
"reference": "CmRbAAAAKmYoyR1BrFqFQJi6CAD8cjhD4SDnZXMIC0mOLOpX_jPgIgFv0TJ3rv8p5L9xKrplHzUFxBNc8sd7PdkXdnCsTo_7-3X7mocd8yHnXCIKYAxj0MO4icLoFJjD3DEszqK3EhD8XIu6zNH-h3hqotfKjmd-GhRwyNIfJCo4bmOOLYgubm7j8ln_tw",
"scope": "GOOGLE",
"types": [
"street_address"
],
"url": "https://maps.google.com/?q=23+Norton+St,+Leichhardt+NSW+2040,+Australia&ftid=0x6b12b0174fced5a5:0x921660b0c44c6a32",
"utc_offset": 600,
"vicinity": "Leichhardt"
},
"status": "OK"
}
The types and the place id are different from the first response. I would expect them to be the same, why are they different?
unclear. Can you please elaborate on the actual problem you are having? You are calling an API and the types are different as you showed with an example, so that would automatically answer your own questionThe types are completely different as well as the place id?!Yes they are. - GabrielOshiro