Reputation: 1760
I am desperately trying to retrieve google maps geocoding results in spanish for train stations.
When appending the english keyword "train station" to the location I am searching for, it does return information about the train station in the city
For example, here for london, the request is "london train station" and the language parameter is set to "en" in the URL:
The proper location types are returned:
"types" : [ "train_station", "transit_station", "establishment" ]
However, when using the request "londres estacion" or "london tren estacion" with the language parameter set to "es", then the information returned is about the city of london and not about the train station
"types" : [ "locality", "political" ]
I have proceeded to tests in deutsch "london banhof" and french "london gare" and it did work in those languages. I can't figure out where the problem comes from in spanish.
Would you happen to know what would be the proper spanish keywords to append to a city name in order to get results for the train stations?
Many thanks for your help
Upvotes: 1
Views: 472
Reputation: 117354
The proper location types are returned
These types aren't more proper than other possible types. The address -parameter expects an address, it doesn't consider that the address contains a type and will not apply a filtering.
The geocoded address is for a location called "London train station" (you may have noticed that it's placed in canada not in england).
When this location would be a museum it would return the type "museum".
When you want to filter by types(not supported by geocoding), use a places-search
Upvotes: 0