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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

monstrfolk created an issue. See original summary.

monstrfolk’s picture

monstrfolk’s picture

Status: Active » Needs work
monstrfolk’s picture

Status: Needs work » Needs review
Pol’s picture

Hi 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.

monstrfolk’s picture

No. 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.

  • Pol committed 146cf2f on 7.x-1.x authored by monstrfolk
    Issue #2874306 by monstrfolk: Administrative area, Addressfield, ZERO...
Pol’s picture

Status: Needs review » Fixed

Super fine then!

Thanks!

monstrfolk’s picture

np

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.