| Issue 9683: | Reverse geocoding in remote locations returns a result in Japan | |
| 24 people starred this issue and may be notified of changes. | Back to list |
https://maps.googleapis.com/maps/api/geocode/json?latlng=41.64162358865791,-8.787144720554352 using this coordinates, api gives me japan localization on first formatted address when this coordinates belong to Portugal, and in fact, the next results in response are about the correct localization
May 4, 2016
#1
[email protected]
May 4, 2016
As a quick workaround I've changed Google's example code ( https://developers.google.com/maps/documentation/javascript/geocoding#reverse-geocoding-by-location ) from using results[1] to results[0] and this seems to work for now.
May 4, 2016
(No comment was entered for this change.)
Status:
Accepted
Labels: ApiType-Geocoder Type-Defect Internal-28574495
May 4, 2016
Issue 9682 has been merged into this issue.
May 4, 2016
Issue 9684 has been merged into this issue.
May 4, 2016
Issue 9685 has been merged into this issue.
May 4, 2016
Issue 9688 has been merged into this issue.
May 4, 2016
Thank you for reporting this, already 4 other reports in this issue tracker, I'm picking this one because it has most comments. There is an issue in the Geocoding API, whereby reverse geocoding a latlng that is far away from precise results will often produce a sublocality_level_3 result in Japan. We are working on a fix. The best solution is to never depend on the ordering of reverse geocoding results. It is highly recommended to always inspect the "types" array of results before using them. Each use case of reverse geocoding will generally require results of a limited set of types, e.g. ["premise", "street_address", "route"] when looking for street-level addresses. Applications that already implement this strategy will not be affected by the current issue. While reverse geocoding results are generally ordered from more to less precise, this ordering is not guaranteed there may be exceptions. Relying on any specific ordering of results is risky and highly discouraged. Alternatively, restricting reverse geocoding results via the result_type or location_type paramters can also be used to workaround the current issue: https://maps.googleapis.com/maps/api/geocode/json?&latlng=0,0&result_type=street_address&key=YOUR_API_KEY https://maps.googleapis.com/maps/api/geocode/json?&latlng=0,0&result_type=route&key=YOUR_API_KEY https://maps.googleapis.com/maps/api/geocode/json?&latlng=0,0&location_type=ROOFTOP&key=YOUR_API_KEY https://maps.googleapis.com/maps/api/geocode/json?&latlng=0,0&location_type=RANGE_INTERPOLATED&key=YOUR_API_KEY https://maps.googleapis.com/maps/api/geocode/json?&latlng=0,0&location_type=ROOFTOP|RANGE_INTERPOLATED&key=YOUR_API_KEY This workaround may be easier to implement in some cases, but in no case replaces a proper strategy to never depend on the ordering of reverse geocoding results. To learn more about these restricts, please see https://developers.google.com/maps/documentation/geocoding/intro#reverse-restricted
Summary:
Reverse geocoding in remote locations returns a result in Japan
(was: Incorrect geocode information)
May 4, 2016
I guess this result comes up because the bounds for this location include the whole world:
"formatted_address" : "1 Chome-11 Kamifukubara, Yonago-shi, Tottori-ken 683-0004, Japan",
"geometry" : {
"bounds" : {
"northeast" : {
"lat" : 90,
"lng" : 180
},
"southwest" : {
"lat" : -90,
"lng" : -180
}
},
Maybe it should somehow be prevented that locations with bounds like this can ever be inserted...
May 5, 2016
https://maps.googleapis.com/maps/api/geocode/json?latlng=12.9898450,80.2487660 I too got the same response as Japan.
May 5, 2016
now I'm getting correct location address. don't know what the issue
May 5, 2016
Issue 9687 has been merged into this issue.
May 5, 2016
Issue 9693 has been merged into this issue.
May 5, 2016
Issue 9698 has been merged into this issue.
May 5, 2016
I got this as a result in Asus' weather widget and was pretty confused about it :-)
May 6, 2016
Issue 9707 has been merged into this issue.
May 12, 2016
ETA for this defect? or fixed already? we have similar issue reported coincidentally for the same date as mentioned in issue 9683. |
|
| ► Sign in to add a comment |