Hi,

For a client's website we have been using the addressfield module as a source for geocoder to request location data, and I've run into a situation where geocoder was constantly requesting location data by an empty address string, thus returning status ZERO_RESULTS.

To solve this issue I've created a small patch to do an additional check to see if the addressfield is considered empty, using addressfield's addressfield_field_is_empty() function.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jorisdejong’s picture

Patch here.

I've done this for all handlers supporting addressfield.

janis_lv’s picture

This is cool,
I've run into a situation where I've deleted addresses from address field but Geocoder still shows old wkt point :)

Simon Georges’s picture

Issue summary: View changes
Status: Active » Needs review

Changing status, as there is a patch.

Simon Georges’s picture

Status: Needs review » Fixed

Committed, thanks!

Status: Fixed » Closed (fixed)

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

nirad’s picture

I have Address Field set to use only one country (the United States), so the Geocoder always gets populated because this field is filled out by default. The only way I found around this is to add other countries and make the default country "-None-", though this isn't ideal. Is there a way I can limit the Address Field to one country without populating the Geocoder?