My project requests Geocoding API for coordinates and correct full addresses in Odessa, Ukraine.
I could request response in Russian or Ukrainian language adding language=ru
(language=uk
) parameter to the HTTP request. Starting today I get street name in Ukrainian in response, no matter which language I specify in request.
Examples.
Request for Russian: https://maps.googleapis.com/maps/api/geocode/json?address=Пушкинская, Одесса, Украина&language=ru
Relevant part of the response:
"results" : [
{
"address_components" : [
{
"long_name" : "Пушкінська вулиця",
"short_name" : "Пушкінська вулиця",
"types" : [ "route" ]
},
{
"long_name" : "Приморський район",
"short_name" : "Приморський район",
"types" : [ "sublocality_level_1", "sublocality", "political" ]
},
{
"long_name" : "Одеса",
"short_name" : "Одеса",
"types" : [ "locality", "political" ]
},
{
"long_name" : "Одесский горсовет",
"short_name" : "Одесский горсовет",
"types" : [ "administrative_area_level_3", "political" ]
},
{
"long_name" : "Одеська область",
"short_name" : "Одеська область",
"types" : [ "administrative_area_level_1", "political" ]
},
{
"long_name" : "Украина",
"short_name" : "UA",
"types" : [ "country", "political" ]
}
],
Please note, that "country"
and "administrative_area_level_3"
fields are in Russian, as they should be, but everything else is in Ukrainian.
If I use language=uk
all fields in the response are returned in Ukrainian language (as intended).
I suppose someone at Google merged Russian and Ukrainian lists, and there nothing I can do to get Russian names back on my end. So the question is more about where I should report this bug?
You can report a geo-coding api issue here.
Hit "New Issue," and under "Template" select "Geocoding API - Bug."
Good luck.
I used this
https://maps.googleapis.com/maps/api/geocode/json?address=Пушкинская,%20Одесса,%20Украина&language=uk
and the response is
I get this response
if i use
https://maps.googleapis.com/maps/api/geocode/json?address=Пушкинская,%20Одесса,%20Украина&language=en
I get this response
来源:https://stackoverflow.com/questions/27049068/google-geocoding-api-returns-wrong-language-in-response