Skip to content
This repository has been archived by the owner on Jun 29, 2023. It is now read-only.

When CiviCRM geocodes an address, the geocoding service generally returns much more information than CiviCRM uses. This extension allows site administrators to set a policy for what to do with that information on a field-by-field basis: discard it, fill in missing data, or overwrite existing data.

License

Notifications You must be signed in to change notification settings

ginkgostreet/com.ginkgostreet.geofill

Repository files navigation

Geodata Filler (com.ginkgostreet.geofill)

When CiviCRM geocodes an address, the geocoding service generally returns a full collection of address fields, including street, city, etc. CiviCRM, however, typically uses only the latitude and longitude fields and discards everything else.

This extension allows site administrators to set a policy for what to do with that information on a field-by-field basis: discard it, fill in missing data, or overwrite existing data. By default, this extension preserves the core behavior of discarding the additional data.

Dependencies

Configuration

Settings are managed in CiviCRM by visiting Administer > System Settings > Geodata Filler. A link is also provided from the core Mapping and Geocoding settings screen.

Extensibility

This extension does not support every geocoding service that has been integrated with CiviCRM. For a list of currently supported services, have a look at CRM/Geofill/Parser.

Adding another service is a two-step process:

Implement hook_civicrm_geofill_parser()

This extension introduces a new hook hook_civicrm_geofill_parser, which allows a developer to register a geodata-parsing class for the geocoding service of her choosing.

Definition

hook_civicrm_geofill_parser(array &$registry)

Parameters

  • array $registry - A reference to the registry of parser class names, keyed by $geoProvider name as passed to hook_civicrm_geocoderFormat.

Return

  • void

Example

Geodata Filler eats its own dog food.

Write a Parser Class

It must implement CRM_Geofill_Parser_Interface.

Thanks for Stopping By

Feedback, bug reports, and pull requests are welcome.

About

When CiviCRM geocodes an address, the geocoding service generally returns much more information than CiviCRM uses. This extension allows site administrators to set a policy for what to do with that information on a field-by-field basis: discard it, fill in missing data, or overwrite existing data.

Resources

License

Stars

Watchers

Forks

Packages

No packages published