9

Leaftlet is an open-source JavaScript Library for interactive mobile friendly maps. It only takes a few minutes to put your CiviCRM Contacts on a Leaflet Map if you're using Drupal. Here are some of my slides from my CiviCON 2016 lightning talk: EDIT: Some additional notes based on comments below and some questions emailed to me: To get started with CiviCRM ...


5

I've found that if contacts have a geocode even if it's wrong, it won't update it. You can get this situation if you import updates to addresses (like from NCOA) and don't have the import do the geocoding, which I think is the default. (Really this is a bug and I'll file an issue on it when I have a free min.) I ended up using sql to zero out the codes.


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 ...


4

It looks like you have may not have set a command parameter in the Scheduled Job (but maybe you're adding it when you run the job via URL?). Do you have geocoding=1 in your command parameters for "Geocode and Parse Addresses"? See Managing Scheduled Jobs from the Civi wiki for reference (2nd row of the table).


4

We had a similar need and used mapit: https://mapit.mysociety.org/. Every time an address is created/updated we use the mapit API to grab the associated parliamentary constituency, European region etc. It looks like the mapit API can give you England/Wales/Scotland/NI too (though it's trivial to translate from the European Region). We did similar to @...


4

You need to enable Mapping and Geocoding from civicrm/admin/setting/mapping?reset=1 Enter your API Key or Application ID. An API Key is required for the Google Maps API. Refer to developers.google.com for the latest information. Save the form and you should be able to see latitude and longitude based on your contact's address. Note that it displays when you ...


4

The Latitude, Longitude fields are only visible when they are enable in 'Address Editing'. To enable it navigate to Administer >> Localization >> Address settings. Check for 'Address Editing' option. Check box for Latitude, Longitude option and save the settings. HTH Pradeep


3

This is an oversimplification certainly but with either PostgreSQL or MySQL/MariaDB with their Spatial Extensions installed, you can perform basic geometry operations within your database quite easily. The key operation here is ST_Intersection(). You can pass the operator a set of points and a set of polygons and it will return the common set. See also this ...


3

It looks like you still need to configure the job parameters for geocoding, for instance for the 'geocoding' parameter it expects 0 or 1, but literally "[0 or 1]" is being passed. So if I want to geocode starting at cid 1 and end at cid 1000, but skip address parsing, I would pass the following parameters: geocoding=1 parse=0 start=1 end=1000 throttle=1 ...


3

Off the top of my head, I think geocoding like this is an all or nothing thing. You can manually add the lat/long to an event location, so assuming that you don't have a whole lot of events, this should be pretty much acceptable (and just leave geocoding turned off). With that said, no real contact details are shared with Google/Yahoo. A street address is ...


3

I've never done it, but I think Tyrell's SmartyStreets extension provides it. One thing to point out, however, for anyone who does it another way: county names repeat a lot, and the ID numbers of counties in CiviCRM are totally arbitrary, unlike states. The way to look up county is to find the state and then find the county name within the state.


3

While the Google API has an unauthenticated limit of 2,500 requests per day per IP, using an API key currently gives free a quota of 100,000 requests per day, with additional requests by payment. You'll need a recent-ish (4.7.9, 4.6.23 or greater) version of CiviCRM to use the API key for geocoding: CRM-18830: Google Geocoding - use SSL, restore API key. ...


3

Make sure it is enabled under address settings. Go to Administer > Localization > Address Settings.


3

I finally succeeded : Administer > Settings > Addresses > Address Editing with Latitude, Longitude, and Street Address Parsing enabled geocoding=1 and parse=0 in the Geocoding Parameters of the CRON job


3

You'll want to install the Geocoder extension. This represents a significant improvement on existing geocoding providers. Google Maps API is now relatively pricey, and Open Street Maps is free. I find they give roughly comparable quality, but with the Geocoder module you can use multiple geocoders.


3

Just a clarification first: Parsing is different from geocoding. If all you want is to get lat and long values filled in then regular google geocoding works without parsing. If you really want parsing, then you might be able to do it with hook_civicrm_post and when $objectName == 'Address' you can parse and adjust the address there. Note that just for ...


3

It's come up before that street address parsing only works for US addresses. Try just going with geocoding.


2

You may also want to give the Open Street Map Extension a shot - find some information on our website as well as the repository.


2

Google has a limit on encoding per day (2500) records, https://developers.google.com/maps/documentation/geocoding/usage-limits I suspect you've hit that limit. You can enable billing to increase your limits, $0.50 USD / 1000 additional requests, up to 100,000 daily.


2

Check your Mapping and Geocoding Providers setting using below link. your-site-name/civicrm/admin/setting/mapping?reset=1 Change Geocoding Provider to google and then save your contact.


2

I suspect you can pass skip_geocode to the params of 'fixAddress' a number of ways (such as injecting it with tpl override or javascript). Check CRM/Core/BAO/Address.php line 381-382. // check if geocode should be skipped (can be forced with an optional parameter through the api) $skip_geocode = (isset($params['skip_geocode']) && $params['...


2

You weren't imagining things. CiviCRM 4.6 and 4.7 until recently was ignoring the Google API key altogether! I'm not sure the history of that, but it would have been great if someone had documented that in the settings. As of the latest 4.6 and 4.7 the Google API key is getting recognized again (https://github.com/civicrm/civicrm-core/blob/4.6.23/CRM/Utils/...


2

UK geocoding works if you don't use address parsing. In the scheduled job parameters set parse=0 or omit the 'parse' line. For an explanation of street parsing see the wiki and this blog post


2

Just to note that this stopped working around CIVICRM 4.7.19. You need to apply the patch to Drupal IP_geoloc module here: https://www.drupal.org/node/2861393


2

If you are using Google Maps you should take advantage of their functionality, eg use an api call to determine if a point is within the polygon of a map layer you have defined, eg https://developers.google.com/maps/documentation/javascript/examples/poly-containsLocation


2

This isn't possible out of the box but would be an awesome extension. Assuming google is nicely geocoding your addresses for you then the minimum steps are: install a database with spatial functions (either postgres+postgis or recent MySql (looks like >= 5.6 ought to do it) populate a table with geometry create a custom field (per contact probably best, ...


2

This sounds consistent with hitting a rate limit in Google Maps API. If so, the fix would be to disable geocoding (as you've done) or to configure a valid API key associated with payment details so Google can bill you for geocoding. I recently observed similar behaviour when a client was viewing large numbers of contacts in a proximity smart group - ...


2

I think the problem can happen if you import your 'State' as the Abbreviation. If you look in table civicrm_state_province you will see lots of States with Abbreviation CA - and unless you specify the right country it can have unexpected out comes possibly depending on which Countries you have enabled. I think this jira address the core issue The ...


2

I have fixed the issue! It seems that Google API does not support restricting DNS in server geocoding mode, I have created a new API key with IP restriction. Beware people, it can cause you headaches.


2

Welcome to Stackexchange. Take a look at the docs about geocoding and mapping. If you're using Google then you need an API key for geo coding requests. To get Google API key you can find information here. Once you have api key navigate CiviCRM >> Administer >> System Settings >> Mapping and Geocoding and set the API key there. After enabling the ...


Only top voted, non community-wiki answers of a minimum length are eligible