I'm using this excellent module successfully, with the normal setup to get data from Addressfield, geocode it via Google and plug the data into Geofield. All is working fine except for a particular record which isn't entering any data - when I save it I get an error message Error geocoding - ZERO_RESULTS

The address looks fine, and when I use it within Google Maps it finds the location with no problems. I've tried putting the same address into another record, with the same results. Any suggestions please?

The address is: 801 West Georgia Street, Vancouver, British Columbia V6P 1C7, Canada

Comments

phayes’s picture

I've seen a similar problem. I think perhaps we should remove the postal code from the address field when we collapse all the components for sending off to a geocoding handler.

phayes’s picture

Status: Active » Needs review

Okay, I've just committed a change that removes the postal code. Can you test please?

adam_b’s picture

Sorry but I'm not a developer so I don't know how to get hold of your change. Could you supply me with a zipped version of the module with the change? or at least a patch? Thanks.

adam_b’s picture

You're right that it does appear to be a postcode issue:
- Saving the address without the postcode works fine
- Google gives V6C 3G1 as the postcode for that generic address, and saving the address with this postcode works fine - but Canada Post says this postcode is wrong - it's for 885 West Georgia, not 801
- Google gives V6P 1C7 for the hotel & restaurant at that address, and Canada Post confirms this is the correct postcode for that whole address

So I'm guessing that it's a Google error... in which case I'm not sure what can be done about it.
It would be nice if the interface allowed an editor to manually override the geofield information in case of error or inaccuracy - is this possible?

In principle, I'm not crazy about removing the postal code as a matter of course, because sometimes it can be a crucial element to find a location, eg in rural areas.

adam_b’s picture

Another example of the same problem - address is:
Hotel Relais Saint Germain
9 Carrefour de l’Odéon
75006 Paris
France

phayes’s picture

Status: Needs review » Fixed

You can download the 7.x-1.x-dev tarball on the project page.

Marking as fixed. Please reopen if you have problems

Status: Fixed » Closed (fixed)

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

adam_b’s picture

Version: 7.x-1.0-beta1 » 7.x-1.x-dev
Status: Closed (fixed) » Active

Okay... removing the postcode from the verification is causing problems as I suspected, and not even in rural areas.

When trying to get the location for "10 Northumberland Avenue, London WC2N 5AE" which is in the centre of the city, I'm given a location in the far east end of London. There's a Northumberland Avenue there also with postcode E12 5H5, and I'm guessing it comes first in the list.

I've reverted to v7-1.0 and I guess I'll have to manually correct any that I find which aren't processed by Google.

steinmb’s picture

Priority: Normal » Major

+1 for a rollback. Omitting the postal code is causing problems for us too. Was the original problem 'only' for certain addresses in Canada decoded with Google?

adam_b’s picture

Not only in Canada (see comment #5 above) but with Google, yes.

steinmb’s picture

Ah, sorry missed that one.
Is http://maps.googleapis.com/maps/api/geocode/json?sensor=false&address=Ho... still giving your the wrong position then?

phayes’s picture

OK, we're going to roll this back

henryblyth’s picture

Thanks @phayes. I'm working very closely with Geocoder right now, and utilising the postcode will be fantastic.

In #1 you mentioned coming across this problem before. Would you mind detailing the issues you have had, for the education of all?

Thanks @adam_b in #8 for giving an example in the UK so I can test it. For that one in particular, putting Westminster in Address 2 finds the correct location. However, I can see users omitting that line, thinking that the postcode will precisely identify the location.

So looking forward to a roll back! Thanks again @phayes =D
Henry

phayes’s picture

Status: Active » Fixed

Alrighty, it's been reverted.

Status: Fixed » Closed (fixed)

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