1
votes

If I check the coordinates for a location by making a request to the Geocode API like this https://maps.googleapis.com/maps/api/geocode/json?address=Los%20Angeles,%20CA,%20United%20States&key=your-browser-key

Then it returns 34.0522342,-118.2436849 for LA, if I then go the reverse geocode API and enter those coordinates then it shows no results?

How's that possible? API a returned a set of data that's not recognized by API b? Shouldn't they both use the same data?

Is this some kind of bug, or am I doing something wrong somewhere?

1
Sounds like a bug. My guess is google has a data problem with the reverse geocoder. Changing those numbers slightly returns a result. For those numbers (34.0522342,-118.2436849) in this example in the google documentation returns ZERO_RESULTS. Change them to 34.0522342,-118.243684 (deleted the last digit of the longitude), and I get a result (Downtown, Los Angeles, CA, USA). - geocodezip
Indeed, looks like a bug and there is already one similar reported in the Google issue tracker: issuetracker.google.com/issues/115563778 - xomena

1 Answers

2
votes

I've just gotten the following message from Google

Dear Maps APIs Premium Plan customers,

Reverse geocoding results in the Geocoding API will soon be updated to provide better quality worldwide. While the new results will often be different from the current results and contain different Place IDs, they should not require adjustments in client applications.

The new results are currently rolled out to non-Premium-Plan users. We plan to make the new results the default for Premium Plan customers on September 17th 2018.

Applications can preview the new results ahead of September 17th by adding the new_reverse_geocoder=true parameter to their Geocoding API requests. Please note that adding this parameter to requests without the latlng parameter will result in an error response (INVALID_REQUEST).

The new results can also be visualized by clicking on the base map (or entering a latlng) in the Geocoder Tool at https://google-developers.appspot.com/maps/documentation/utils/geocoder/

The new results provide the following improvements:

  • Increased ratio of rooftop results in favor of interpolated addresses.
  • Decreased ratio of requests receiving only political results like a city or a neighborhood (ie, incomplete addresses).
  • Decreased distance from input latlng coordinates to the nearest result.
  • In areas with sparse coverage, establishments are returned in addition to geocodes.
  • Decreased ratio of requests receiving results more than 400 meters from the input latlng.

Please let us know if you find issues with the new results. Quality issues are best reported in the Maps API public issue tracker at https://issuetracker.google.com.

So, as you can see Google is launching a new version of reverse geocoder. I've tried your request with old version adding the &new_reverse_geocoder=false parameter and got results

https://maps.googleapis.com/maps/api/geocode/json?latlng=34.0522342%2C-118.2436849&new_reverse_geocoder=false&key=MY_API_KEY

At this point it looks like regression in new version of reverse geocoder.

Update

Google tracks this issue in the bug:

https://issuetracker.google.com/issues/115484101