opencats / OpenCATS

Applicant Tracking System (maintained code base)
http://www.opencats.org
Other
530 stars 245 forks source link

UK Postcode Proximity Search - Request #287

Open dveos opened 7 years ago

dveos commented 7 years ago

Hi all, I noticed there is a provision for ZIP Code proximity search, and wondered if this can be customised for UK postcodes?

skrchnavy commented 7 years ago

Please check #245 if it is answer to what you have asked.

RussH commented 7 years ago

@skrchnavy I suspect that it's a candidate search by distance from the job that @dveos is after - based upon the postcode for the job and the candidates. Whilst this is certainly doable (see here for a free reverse postcode to lat/long lookup) it seems to vary from country to country - so whilst this is available in the 'base' version (I think - haven't tested it not being in the USA!) for USA, it's not available internationally.

EDIT: Actually, looks like Google api may well support that conversion, too.. https://stackoverflow.com/questions/7075912/how-to-convert-postcode-to-geolocationlatitude-longitutde-using-google-maps

RussH commented 7 years ago

Search by distance is in the optional Sphinx update package - but it seems to NOT use the google api but some database of USA and Canadian zipcodes that gives them access to lat/long conversion instead. Therefore currently in the codebase it's only even attempted in USA and Canada. I'm sure it's feasible to strip the zipcode database lookup and replace it with google api lookup.. but that's beyond my capabilities :-)

Seems to be constrained to this file though! https://github.com/opencats/OpenCATS/blob/master/optional-updates/latest-sphinx-search/Search.php

dveos commented 7 years ago

RussH is on the money with the request :+1: would be good to also have this feature for when searching Contacts also :)

RussH commented 5 years ago

@dveos you mentioned you have the code for this now? can you share so that the brainy folks here can adapt for worldwide?

dveos commented 5 years ago

Hey Russ sorry about not replying I didn't notice your message. I added UK latitude/longtitude data to sql DB and worked well. However, I did notice on one install a Google Maps integration I'll try and find it again and send over.

RussH commented 5 years ago

@dveos that'd be great!