Hi,

thanks for this module, very useful!

While trying to use geocode for a project where the only address information comes from the addressfields properties country and postal_code, I realized that the postal_code information is not send to google (which I choose to use in this case). The simple change that solved the issue for me is included in the attached patch.

I'm not sure about possible implications but it seems like a straightforward patch. The only thing I can think of is that there seem to be countries without a postal code system, so for those I also added a test to check if the field item is actually set, to prevent php notices.

Comments

michaelfavia’s picture

Hah I thought this one might come back to bite us. I believe this was removed here: #1538392: Can't geocode an ordinary address. Perhaps a rollback is in order.

berliner’s picture

Perhaps :-) Sorry I didn't jump in on that issue. I was searching for postal_code and not postcode.

I would indeed argue that single problems with address geocoding on particular services don't justify to drop geocoding support for an available address input field. It causes quite a bit of confusion when you realize that it is not used at all. At least it should be communicated. But for my particular case I would like it to be used. If I understand the other issue correctly I could simply switch to 7.x-1.0?

steinmb’s picture

#1538392: Can't geocode an ordinary address is now reopened. Should we perhaps just close this one as duplicate?
+1 from me on a rollback.

phayes’s picture

Status: Active » Closed (duplicate)