- Status changed to Postponed: needs info
almost 2 years ago 5:02pm 21 January 2023 - 🇮🇹Italy itamair
Thanks for reporting this @wrd-oaitsd...
could you be more specific (?) when you state:I noticed a similar problem reported several years ago for a 7.x release.
pointing to/linking to the specific issue you are referring to, to give us more context.
How can we / can we assume that this is actually a bug of the Drupal Geocoder module?
From what you describe it seems rather a problem (or a specific result) of the GoogleMapsBusiness geocoder service (@see https://github.com/geocoder-php/Geocoder#world),
and not something to input to the specific Drupal Geocoder module provider (which is just a wrapper/host of the former, via https://github.com/geocoder-php/google-maps-provider) .Or do you have the clear idea that all this depends on the Drupal Geocoder provider GoogleMapsBusiness? How can you prove it?
Have you also checked other geocoding providers as a useful comparison?
- 🇺🇸United States wrd-oaitsd
I included the link to the other issue in the "Related issues", but to include it here as well, it can be found at: https://www.drupal.org/project/geocoder/issues/3059514 →
Testing out Google's geocoding example code on jsfiddle:
https://jsfiddle.net/gh/get/library/pure/googlemaps/js-samples/tree/mast......produces the same result if I input the address like so:
Input: 408 Washington Avenue Suite 100 West Plains, MO 65775 United States
{ "results": [ { "address_components": [ { "long_name": "100", "short_name": "100", "types": [ "subpremise" ] }, { "long_name": "408", "short_name": "408", "types": [ "street_number" ] }, { "long_name": "Washington Avenue", "short_name": "Washington Ave", "types": [ "route" ] }, { "long_name": "Downtown Houston", "short_name": "Downtown Houston", "types": [ "neighborhood", "political" ] }, { "long_name": "Houston", "short_name": "Houston", "types": [ "locality", "political" ] }, { "long_name": "Harris County", "short_name": "Harris County", "types": [ "administrative_area_level_2", "political" ] }, { "long_name": "Texas", "short_name": "TX", "types": [ "administrative_area_level_1", "political" ] }, { "long_name": "United States", "short_name": "US", "types": [ "country", "political" ] }, { "long_name": "77002", "short_name": "77002", "types": [ "postal_code" ] } ], "formatted_address": "408 Washington Ave #100, Houston, TX 77002, USA", "geometry": { "location": { "lat": 29.7654582, "lng": -95.3614463 }, "location_type": "RANGE_INTERPOLATED", "viewport": { "south": 29.7640738197085, "west": -95.3627994802915, "north": 29.7667717802915, "east": -95.3601015197085 } }, "place_id": "Ei80MDggV2FzaGluZ3RvbiBBdmUgIzEwMCwgSG91c3RvbiwgVFggNzcwMDIsIFVTQSI6GjgKMRIvChQKEgnJRi06Lr9AhhGV09IgdaweuhCYAyoUChIJM09JeVPHQIYRFNRygKFHGo0SAzEwMA", "types": [ "subpremise" ] } ] }
If I add a comma after the address and before the city name, the result is correct:
Input: 408 Washington Avenue Suite 100, West Plains, MO 65775 United States
{ "results": [ { "address_components": [ { "long_name": "100", "short_name": "100", "types": [ "subpremise" ] }, { "long_name": "408", "short_name": "408", "types": [ "street_number" ] }, { "long_name": "Washington Avenue", "short_name": "Washington Ave", "types": [ "route" ] }, { "long_name": "Downtown Houston", "short_name": "Downtown Houston", "types": [ "neighborhood", "political" ] }, { "long_name": "Houston", "short_name": "Houston", "types": [ "locality", "political" ] }, { "long_name": "Harris County", "short_name": "Harris County", "types": [ "administrative_area_level_2", "political" ] }, { "long_name": "Texas", "short_name": "TX", "types": [ "administrative_area_level_1", "political" ] }, { "long_name": "United States", "short_name": "US", "types": [ "country", "political" ] }, { "long_name": "77002", "short_name": "77002", "types": [ "postal_code" ] } ], "formatted_address": "408 Washington Ave #100, Houston, TX 77002, USA", "geometry": { "location": { "lat": 29.7654582, "lng": -95.3614463 }, "location_type": "RANGE_INTERPOLATED", "viewport": { "south": 29.7640738197085, "west": -95.3627994802915, "north": 29.7667717802915, "east": -95.3601015197085 } }, "place_id": "Ei80MDggV2FzaGluZ3RvbiBBdmUgIzEwMCwgSG91c3RvbiwgVFggNzcwMDIsIFVTQSI6GjgKMRIvChQKEgnJRi06Lr9AhhGV09IgdaweuhCYAyoUChIJM09JeVPHQIYRFNRygKFHGo0SAzEwMA", "types": [ "subpremise" ] } ] }
I'll see if I can test with a different geocoder and see if the result is different.
- 🇺🇸United States wrd-oaitsd
I'm getting the same result when using the Nominatim service.