Answers.Body: <p>I worked it out! Many of my contacts weren't given a country (must have been forgotten in a profile). I checked what the difference was between the handful that were working and the lots which weren't and spotted the missing country - as soon asI updated the contacts that were missing a country it started finding the longitude and latitude. Thanks for the help!</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-30T15:55:00.060Z
Answers.Text: Note that you can specify a default country in **Administer menu » Localization » Languages, Currency, Location**.
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-06-22T01:10:48.153Z
Answers.Text: I found the same thing, and default country was already configured.
  The country is displayed on contact records, but if you edit, you see that the country is not in fact set.
  
  Fortunately for me, most important addresses are added through a drupal webform, and once I added the country field to the webform, it picked up the default. It is a bit clunky though: we only have one country enabled as an option. I had to set the missing country for existing contacts, and they were geocoded on the next job run.
Answers.UserDisplayName: ginkgoMZD
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-30T14:52:19.167Z
Answers.LastActivityDate: 2019-01-30T14:52:19.167Z
Answers.UserDisplayName: Cozy4907
Answers.Body: <p>Google needs a credit card on file I believe even if you don't exceed the monthly credit amount.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-29T20:53:02.153Z
Answers.Text: Except he says it works when he adds contacts manually, so the google setup part must be right, but yes in general you are correct.
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-29T21:04:12.960Z
Answers.Text: I'm fairly confident I've got this set up right - I've set up a paying account with a credit card with google and got an API from there.
Answers.UserDisplayName: Cozy4907
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-29T19:38:14.280Z
Answers.LastActivityDate: 2019-01-29T19:38:14.280Z
Answers.UserDisplayName: Andy Burns
Body: <p>Pulling my hair out a little! I'm trying to set up the mapping feature on CiviCRM. I've got a google API for the geocoding, I've enabled longitude/latitude/parsing in the localisation section, and I've got the geocoding scheduled task set to: geocode=1, and I've executed the task. I'm not getting any longitudes or latitudes in any of my contacts (it works if I add them manually). What am I missing? And does it matter all our contacts are based in the UK?</p>
  
  <p>Cheers.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-29T16:46:00.357Z
Comments.Text: Is there anything in the job log? On the scheduled jobs screen to the right of the geocode task there's a link to view the log.
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-29T21:06:10.270Z
Comments.Text: So if I have: geocoding=1, parse=0 and execute this task then in the log I get told:
  _Full message: 
  Finished execution of Geocode and Parse Addresses with result: Success (Addresses Evaluated: 2
  Addresses Geocoded: 0
  Street Addresses Parsed: 2
  )_.       which obviously doesn't seem right!
Comments.UserDisplayName: Cozy4907
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-29T22:17:58.823Z
Comments.Text: It's possible the parsing setting in localisation is confusing it somehow. That might only be available for US addresses? I'd try turning the parsing setting off, and then also trying it with some of the optional parameters like start and end  just to see if that works.
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-29T22:35:12.153Z
Comments.Text: Good though - unfortunately I get _"Finished execution of Geocode and Parse Addresses with result: Failure, Error message: Error: You need to enable Street Address Parsing under Administer > Localization > Address Settings."_ Damned if you do, damned If you don't ;)
Comments.UserDisplayName: Cozy4907
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-29T22:40:49.793Z
Comments.Text: Weird. It really does seem like it's doing geocoding = 0 and parse = 1 even though you've set it otherwise. Are you able to run the job using one of the other cron methods, e.g. cv, url ? It is also possible to run it from the api explorer at /civicrm/api. Choose Job entity and geocode as the action.
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-29T22:55:26.157Z
Comments.Text: That's what I thought! Seems weird. I've never done either of those (this isn't my day job, we have a volunteer who got us set up but I don't try and bug him too much with stuff we don't **need** to do), but I'll try and work it out, cheers!
Comments.UserDisplayName: Cozy4907
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-29T23:01:28.857Z
Comments.Text: So I managed to get into the API explorer, and get something very similar. If I choose Job and Geocode, then "Geocode = yes", I get : 
  **    "is_error": 0,
      "version": 3,
      "count": 1,
      "values": "Addresses Evaluated: 2\nAddresses Geocoded: 0\nStreet Addresses Parsed: 2\n" **
Comments.UserDisplayName: Cozy4907
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-29T23:15:45.990Z
Comments.Text: What version are you on? This is maybe a similar issue: https://civicrm.stackexchange.com/questions/26263/google-geocoding-not-working-on-fresh-install-of-civicrm-5-4-0-and-drupal-7
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-30T08:36:57.780Z
Comments.Text: We're on version 5.4.1 - I'll have a look into this, thanks for all the help!
Comments.UserDisplayName: Cozy4907
Tags: <geocoding>
Title: Not adding longitude or latitude
ThreadText: # Not adding longitude or latitude
  
  (Asked by: username_0 on 2019-01-29)
  
  Pulling my hair out a little! I'm trying to set up the mapping feature on CiviCRM. I've got a google API for the geocoding, I've enabled longitude/latitude/parsing in the localisation section, and I've got the geocoding scheduled task set to: geocode=1, and I've executed the task. I'm not getting any longitudes or latitudes in any of my contacts (it works if I add them manually). What am I missing? And does it matter all our contacts are based in the UK?
  
  Cheers.
  
  **Tags:** geocoding
  
  > **Comments:**
  > **username_1**: Is there anything in the job log? On the scheduled jobs screen to the right of the geocode task there's a link to view the log.  
  > **username_0**: So if I have: geocoding=1, parse=0 and execute this task then in the log I get told: _Full message:  Finished execution of Geocode and Parse Addresses with result: Success (Addresses Evaluated: 2 Addresses Geocoded: 0 Street Addresses Parsed: 2 )_.       which obviously doesn't seem right!  
  > **username_1**: It's possible the parsing setting in localisation is confusing it somehow. That might only be available for US addresses? I'd try turning the parsing setting off, and then also trying it with some of the optional parameters like start and end  just to see if that works.  
  > **username_0**: Good though - unfortunately I get _"Finished execution of Geocode and Parse Addresses with result: Failure, Error message: Error: You need to enable Street Address Parsing under Administer > Localization > Address Settings."_ Damned if you do, damned If you don't ;)  
  > **username_1**: Weird. It really does seem like it's doing geocoding = 0 and parse = 1 even though you've set it otherwise. Are you able to run the job using one of the other cron methods, e.g. cv, url ? It is also possible to run it from the api explorer at /civicrm/api. Choose Job entity and geocode as the action.  
  > **username_0**: That's what I thought! Seems weird. I've never done either of those (this isn't my day job, we have a volunteer who got us set up but I don't try and bug him too much with stuff we don't **need** to do), but I'll try and work it out, cheers!  
  > **username_0**: So I managed to get into the API explorer, and get something very similar. If I choose Job and Geocode, then "Geocode = yes", I get :  **    "is_error": 0,     "version": 3,     "count": 1,     "values": "Addresses Evaluated: 2\nAddresses Geocoded: 0\nStreet Addresses Parsed: 2\n" **  
  > **username_1**: What version are you on? This is maybe a similar issue: https://civicrm.stackexchange.com/questions/26263/google-geocoding-not-working-on-fresh-install-of-civicrm-5-4-0-and-drupal-7  
  > **username_0**: We're on version 5.4.1 - I'll have a look into this, thanks for all the help!  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2019-01-30. Score: 5
  
  I worked it out! Many of my contacts weren't given a country (must have been forgotten in a profile). I checked what the difference was between the handful that were working and the lots which weren't and spotted the missing country - as soon asI updated the contacts that were missing a country it started finding the longitude and latitude. Thanks for the help!
  
  > **Comments:**
  > **username_2**: Note that you can specify a default country in **Administer menu » Localization » Languages, Currency, Location**.  
  > **username_3**: I found the same thing, and default country was already configured. The country is displayed on contact records, but if you edit, you see that the country is not in fact set.  Fortunately for me, most important addresses are added through a drupal webform, and once I added the country field to the webform, it picked up the default. It is a bit clunky though: we only have one country enabled as an option. I had to set the missing country for existing contacts, and they were geocoded on the next job run.  
  
  ---
  
  ### Answer by username_4 on 2019-01-29. Score: 1
  
  Google needs a credit card on file I believe even if you don't exceed the monthly credit amount.
  
  > **Comments:**
  > **username_1**: Except he says it works when he adds contacts manually, so the google setup part must be right, but yes in general you are correct.  
  > **username_0**: I'm fairly confident I've got this set up right - I've set up a paying account with a credit card with google and got an API from there.  
  
  ---
  
  