googlemaps / googlemaps/google-maps-services-python

PlaceAutocompletePrediction results have missing fields

Abierto
#424 0 comentarios 0 reacciones 0 asignados Ver en GitHub
triage me type: bug
Lenguaje dominante
Python
Estrellas
5k
Forks
1.4k
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

The `PlaceAutocompletePrediction` results have missing fields for the input string:

`"Holiday Inn Airport Frankfurt Main"`

the first result I get is for:

`Holiday Inn Frankfurt Airport, an IHG Hotel, Bessie-Coleman-Straße, Frankfurt, Germany`

although having overlapping strings the first `PlaceAutocompletePrediction` entry has

`matched_substrings` = []
`structured_formatting` is missing the entry `main_text_matched_substrings` which is in the documentation is defined as `required`

#### Code example

```python
import requests

url = "https://maps.googleapis.com/maps/api/place/autocomplete/json?input=\"Holiday Inn Airport Frankfurt Main\"&key=XXXXXXXXXXXXXX"

payload={}
headers = {}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

```

---

Full response for the first entry:

```
{
"description": "Holiday Inn Frankfurt Airport, an IHG Hotel, Bessie-Coleman-Straße, Frankfurt, Germany",
"matched_substrings": [

],
"place_id": "ChIJKZCkquYKvUcRhHkfAHT9CKo",
"reference": "ChIJKZCkquYKvUcRhHkfAHT9CKo",
"structured_formatting": {
"main_text": "Holiday Inn Frankfurt Airport, an IHG Hotel",
"secondary_text": "Bessie-Coleman-Straße, Frankfurt, Germany"
},
"terms": [
{
"offset": 0,
"value": "Holiday Inn Frankfurt Airport, an IHG Hotel"
},
{
"offset": 45,
"value": "Bessie-Coleman-Straße"
},
{
"offset": 68,
"value": "Frankfurt"
},
{
"offset": 79,
"value": "Germany"
}
],
"types": [
"lodging",
"point_of_interest",
"establishment"
]
}
```

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.