Page MenuHomePhabricator

Geolocation
Closed, ResolvedPublic2 Estimated Story Points

Description

Hi!

I recall there being talks of a geolocation feature in Civi in which we could search # of miles outside a given city or zip code. This would be extremely helpful in our search over the 'range' of zip code function that is currently in Civi.

Thanks so much and let me know if you have any questions.
Jerry

Event Timeline

Change 387770 had a related patch set uploaded (by Eileen; owner: Eileen):
[wikimedia/fundraising/crm/civicrm@master] Hack proximity search to support entering lat& long directly

https://gerrit.wikimedia.org/r/387770

We actually store geocoding data for contacts using a WMF table. The problem that form has is without a geocoder plugin it doesn't know how to look up the geo-coordinates of the starting point form.

This api function actually retrieves them all without a crazy performance hit

drush cvapi Contact.proximity sequential=1 latitude="40.730610" longitude="-73.935242" unit="mile" distance=10

Iv'e done a hack on CRM_Contact_Form_Search_Custom_Proximity & submitted a gerrit. I don't propose we keep this hack past our next upgrade (in the new year) - we should do a more permanent fix.

Note that on staging it has found a few not in the US - I don't know if that is a problem on live data

url to the report is civicrm/contact/search/custom

Change 387770 merged by jenkins-bot:
[wikimedia/fundraising/crm/civicrm@master] Hack proximity search to support entering lat& long directly

https://gerrit.wikimedia.org/r/387770

Eileenmcnaughton added a subscriber: DStrine.

@DStrine if this is 'done enough for BE but we should revisit next year to deal with upstreaming ' - should I close this & open a new one for that?

@jkim_wikimedia did you try it? Is it working for you?

if @jkim_wikimedia is cool with it, then I'd say close this and we'll open another for later.

Hey @DStrine and @Eileenmcnaughton , thanks for your work on this! We finished the project that we needed the geolocation for, so feel free to close this. Keep us posted on any updates for the future. Thanks!

Note that the proximity search was updated to use lat / long so it can be used for this purpose. I logged a follow on ticket to make that a longer term fix