Support

Home Forums Event Espresso Premium Google Maps API

Google Maps API

Posted: December 12, 2016 at 4:58 am

Viewing 13 reply threads


dee4dogs

December 12, 2016 at 4:58 am

Hi all,

Our google maps have disappeared from the website. Figured out why – read the forums, got an API key, got some JS console errors, setup the referrer security and now everything is connected properly.

However, the Google Map now just appears as a grey box with the error (in the JS Console) of “Google Map geocode was not successful for the following reason: ZERO_RESULTS”

Can’t see what I should do within EE to resolve this. Also, confused to why there are zero results when Google has been finding this locations just fine all year.

Domain is dee4dogs.co.uk


dee4dogs

December 12, 2016 at 5:02 am

The only strange thing I can see that in EE it’s storing the “County” as “0” (zero) – these are UK addresses.

Should have said.
WP version 4.7
EE version 4.9.22.p


Josh

  • Support Staff

December 12, 2016 at 7:48 am

May I ask what’s set in the Venue editor for the Country value?


dee4dogs

December 12, 2016 at 8:22 am

United Kingdom – for all the venues.


dee4dogs

December 12, 2016 at 8:34 am

The County is “0” (zero)
The Country is “United Kingdom”


Josh

  • Support Staff

December 12, 2016 at 8:48 am

Have you installed the UK locations pack?

If not, after you download this zip file, you follow this guide:
https://eventespresso.com/wiki/install-new-state-province-packs/#setup


dee4dogs

December 12, 2016 at 9:14 am

No. Installed it now.
Followed instructions, updated the venues.
Still no change.
Still getting the same error.

“Google Map geocode was not successful for the following reason: ZERO_RESULTS”


dee4dogs

December 12, 2016 at 9:44 am

Correction – ONE venue is now working fine.
The others – same error.


Josh

  • Support Staff

December 12, 2016 at 10:06 am

May I ask what is the value for county that’s set for the venue that’s working fine, and what are the values for county where the maps are not working?


dee4dogs

December 12, 2016 at 10:20 am

There are five venues in total.
4 in Leicestershire
1 in Derbyshire

The one that is working correctly is in Leicestershire.

Website is http://www.dee4dogs.co.uk


Tony

  • Support Staff

December 12, 2016 at 10:31 am

Hi there,

The google maps API is a little fussy and can sometimes have unexpected results AND the API results can also be different from the google maps results. (So searching google maps does NOT mean you’ll get the same results on the mini map)

I had a look at your events and found the address of one of the venues that doesn’t work (the social centre venue). I then used the full address within https://www.google.co.uk/maps and get the zero_results error there.

zero_results means google maps did not throw an error but could not find anything that matches the address passed to it.

In the case of the social centre to get a result I needed to remove what you have set as the address line 1 and use the remaining details, this returns a result close to the centre but the API does not recognize the full address to place a pinout on the centre itself.

So to fix the vnuew you’ll need to find the best combination of address details for each venue that work with the mini map. There isn’t much we can do to fix this as its googles results for the address passed to it that is breaking, not EE. However we are looking into adding lat and longitude fields to the address to help with this in a future version of EE.

I know the above is not ideal and we are not dismissing the problem, however we are a little limited on what we can do currently.


dee4dogs

December 12, 2016 at 10:35 am

Understood. I was digging through the Google API documentation, and was thinking along similar lines.

Thanks for your help. I guess it will be a bit of trial and error. Thanks.


Tony

  • Support Staff

December 12, 2016 at 10:42 am

You’re most welcome, I’m in the UK too so I know it can be sometimes be a pain to get the correct location through the API.

You may find it a little quicker to alter the address here:

https://developers.google.com/maps/documentation/geocoding/intro#ReverseGeocoding

Until you find a combination that works, then input whatever works into the relevant fields for the venue in EE.


dee4dogs

December 12, 2016 at 10:51 am

Sorted. Thankfully we don’t have many venues.
The pins aren’t in the perfect spot (as they were before this change) but hopefully they are close enough that they will do.

We look forward to your lat/long update.

Viewing 13 reply threads

The support post ‘Google Maps API’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso