Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Some short name for administrative areas in some countries return ZERO RESULTS when geocoding. This is a very simple patch that converts the administrative area short name to long name. For example, CA -> California.
Converting the short name to long name increases the likelihood that a correct result will be returned from a geocoding request.
The patch uses the addressfield_get_administrative_areas in the addressfield module.
Comment | File | Size | Author |
---|---|---|---|
#2 | administrative-area-long-name-geocode-2874306-1.patch | 1.13 KB | monstrfolk |
Comments
Comment #2
monstrfolk CreditAttribution: monstrfolk commentedComment #3
monstrfolk CreditAttribution: monstrfolk commentedComment #4
monstrfolk CreditAttribution: monstrfolk commentedComment #5
PolHi Brian,
Thanks for your noticing me by email about this.
I've checked your patch and I my question is the following: Does that means that we need to add a new dependency to the module ?
Thanks.
Comment #6
monstrfolk CreditAttribution: monstrfolk commentedNo. The
addressfield_get_administrative_areas
function is part of the addressfield module. So if you have a field that uses the addressfield module that function is readily available with nothing else needed.The only time the section of code that I patched will ever be called is if the addressfield module is already installed.
Hope that answers your question.
Comment #8
PolSuper fine then!
Thanks!
Comment #9
monstrfolk CreditAttribution: monstrfolk commentednp