CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Geocoding with gMaps not working (even with API key)
Pages: [1]

Author Topic: Geocoding with gMaps not working (even with API key)  (Read 1648 times)

Matthias de MAUROY - CYIM

  • I post occasionally
  • **
  • Posts: 59
  • Karma: 4
  • Working at CYIM
    • CYIM
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7
  • MySQL version: 5.1.66-community-log
  • PHP version: 5.3
Geocoding with gMaps not working (even with API key)
March 25, 2014, 09:16:02 am
Hello !

I try to run geocoding's batch with Gmaps configured (API key generated on developper console).

But each time I run it I always get the "Hit the over query limit on geocoder".

Here is my configuration :

geocoding=1
parse=1
start=1
end=10000
throttle=0

On my database contact_ids are a bit high 'cause of lot of tests but it actually should geocode 400 addresses approximatively.

It's the same with or without key in CiviCRM conf...

Need help  ;D
Matthias de MAUROY
Analyste Web Developpeur
BU WEB
Tél. : +33 (0)2 99 22 83 40
Fax : +33 (0)2 99 22 83 41
Mail : m.mauroy@cyim.com
CYIM
31, rue de la Frébardière
35135 CHANTEPIE
FRANCE

Matthias de MAUROY - CYIM

  • I post occasionally
  • **
  • Posts: 59
  • Karma: 4
  • Working at CYIM
    • CYIM
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7
  • MySQL version: 5.1.66-community-log
  • PHP version: 5.3
Re: Geocoding with gMaps not working (even with API key)
March 25, 2014, 09:25:11 am
On google's developer console quota is egal to 0%... cant understand why...
Matthias de MAUROY
Analyste Web Developpeur
BU WEB
Tél. : +33 (0)2 99 22 83 40
Fax : +33 (0)2 99 22 83 41
Mail : m.mauroy@cyim.com
CYIM
31, rue de la Frébardière
35135 CHANTEPIE
FRANCE

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Geocoding with gMaps not working (even with API key)
March 25, 2014, 11:11:58 am

can u add some debugging code to the relevant php file and figure out whats happening and why?

CRM/Utils/Geocode/Google.php

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Matthias de MAUROY - CYIM

  • I post occasionally
  • **
  • Posts: 59
  • Karma: 4
  • Working at CYIM
    • CYIM
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7
  • MySQL version: 5.1.66-community-log
  • PHP version: 5.3
Re: Geocoding with gMaps not working (even with API key)
March 26, 2014, 02:08:43 am
Hi Lobo !

Thank you for answer !

I'm debugging CRM/Utils/Geocode/Google.php. It appears that it is Google API that responds OVER_QUERY_LIMIT, but something's odd...

Each time I run geocoding's batch some contacts are geocoded. Last run geocode exactly 35 addresses and then send "over query limit"

Am I the one who misconfigured civicrm geocoding parameters ?

Or is it Google's "fault"... ?
Matthias de MAUROY
Analyste Web Developpeur
BU WEB
Tél. : +33 (0)2 99 22 83 40
Fax : +33 (0)2 99 22 83 41
Mail : m.mauroy@cyim.com
CYIM
31, rue de la Frébardière
35135 CHANTEPIE
FRANCE

Matthias de MAUROY - CYIM

  • I post occasionally
  • **
  • Posts: 59
  • Karma: 4
  • Working at CYIM
    • CYIM
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7
  • MySQL version: 5.1.66-community-log
  • PHP version: 5.3
Re: Geocoding with gMaps not working (even with API key)
March 26, 2014, 03:06:48 am
Found it !

It's in a way Gmaps API "fault".

And the answer is quite easy in fact... Just set throttle to 1 and everything will be ok !

Well for me it was the reason why I couldn't geocode more than 30-35 addresses. When adding throttle parameter everything went fine !

I just modified CRM_Utils_Address_BatchUpdate a little bit by using throttle to pass the "pause" in microsecond directly, 5 seconds was way to big for my use.

Thanks for the help Lobo !
« Last Edit: March 26, 2014, 03:11:26 am by Matthias de MAUROY - CYIM »
Matthias de MAUROY
Analyste Web Developpeur
BU WEB
Tél. : +33 (0)2 99 22 83 40
Fax : +33 (0)2 99 22 83 41
Mail : m.mauroy@cyim.com
CYIM
31, rue de la Frébardière
35135 CHANTEPIE
FRANCE

Matthias de MAUROY - CYIM

  • I post occasionally
  • **
  • Posts: 59
  • Karma: 4
  • Working at CYIM
    • CYIM
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7
  • MySQL version: 5.1.66-community-log
  • PHP version: 5.3
Re: Geocoding with gMaps not working (even with API key)
March 26, 2014, 07:05:19 am
I'm back  8)...

I was trying to deactivate address geocoding and to run address parsing but when I run the job geo_code_1 and 2 are updated...

I'm trying to get why but any help is welcome
Matthias de MAUROY
Analyste Web Developpeur
BU WEB
Tél. : +33 (0)2 99 22 83 40
Fax : +33 (0)2 99 22 83 41
Mail : m.mauroy@cyim.com
CYIM
31, rue de la Frébardière
35135 CHANTEPIE
FRANCE

Matthias de MAUROY - CYIM

  • I post occasionally
  • **
  • Posts: 59
  • Karma: 4
  • Working at CYIM
    • CYIM
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7
  • MySQL version: 5.1.66-community-log
  • PHP version: 5.3
Re: Geocoding with gMaps not working (even with API key)
March 26, 2014, 09:21:18 am
Back again  ;D

The problem is located on "geocode" and "parse" parameters. You have to pass "true" or "false" and not 0 or 1...

Maybe someone should update documentation, should I create a ticket ?

See ya  ;)
Matthias de MAUROY
Analyste Web Developpeur
BU WEB
Tél. : +33 (0)2 99 22 83 40
Fax : +33 (0)2 99 22 83 41
Mail : m.mauroy@cyim.com
CYIM
31, rue de la Frébardière
35135 CHANTEPIE
FRANCE

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Geocoding with gMaps not working (even with API key)
March 26, 2014, 10:57:21 am

better yet, can you please submit a patch (or ask your friendly developer/intergrator to do so) to improve this issue. Allowing both true/1 and false/0 will be the best :)

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Geocoding with gMaps not working (even with API key)

This forum was archived on 2017-11-26.