We have received wrong results for the 'administrative_area_level_1' part of near-country-limits points, but strangely 'administrative_area_level_2' and 'administrative_area_level_3' are correct.
For example for some selected points located in country A, it shows correctly that belongs to country A, with administrative_area_level_2 and administrative_area_level_3 from country A, but shows administrative_area_level_1 from a neighboring country B.
From a more in depth analysis, this seems to be happening only on the inner side of concave country limits, probably due to a box approximation made by the API.
Morevover, it seems that there's no tree-like data nesting for country/administrative areas.
Sample points in CSV format:
lat;long;country;level1;level2;level3 -20.125;-68.75;"Chile";"Departamento Autónomo de Potosí";"Tamarugal";"Pica" -22.75;-67.875;"Chile";"Departamento Autónomo de Potosí";"El Loa";"San Pedro de Atacama"
In those 2 cases "Departamento Autónomo de Potosí" belongs to Bolivia, not Chile, but the smaller areas are from Chile (Tamarugal, Pica, El Loa, San Pedro de Atacama)
We are using URLs like the following:
http://maps.googleapis.com/maps/api/geocode/json?latlng={0},{1}&sensor=false&language=es
replacing {0} and {1} with lat/long where appropriate.
The results array of your coordinates does not give the same results to me (See snippet).
This is the query I ran:
https://maps.googleapis.com/maps/api/geocode/json?latlng=-20.125,-68.75
Then I checked the coordinates for "Departamento Autónomo de Potosí" (you can get them here).
These are the coordinates you get:
Potosi Dept, Bolivia
Latitude: -20.624713 | Longitude: -66.998801
Please recheck your query formats and coordinates. They do seem fine but just actually when you run it in your code, they might have been mismatched or something.
results: [8]
0: {
address_components: [5]
0: {
long_name: "A-685"
short_name: "A-685"
types: [1]
0: "route" -
} -
1: {
long_name: "Pica"
short_name: "Pica"
types: [2]
0: "administrative_area_level_3"
1: "political" -
} -
2: {
long_name: "Tamarugal"
short_name: "Tamarugal"
types: [2]
0: "administrative_area_level_2"
1: "political" -
} -
3: {
long_name: "Región de Tarapacá"
short_name: "Región de Tarapacá"
types: [2]
0: "administrative_area_level_1"
1: "political" -
} -
4: {
long_name: "Chile"
short_name: "CL"
types: [2]
0: "country"
1: "political" -
} -
-
formatted_address: "A-685, Pica, Región de Tarapacá, Chile"