OpenCATS icon indicating copy to clipboard operation
OpenCATS copied to clipboard

UK Postcode Proximity Search - Request

Open dveos opened this issue 8 years ago • 7 comments

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

dveos avatar Jun 26 '17 14:06 dveos

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

skrchnavy avatar Jun 26 '17 14:06 skrchnavy

@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 avatar Jun 26 '17 15:06 RussH

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

RussH avatar Jun 26 '17 15:06 RussH

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

dveos avatar Jun 27 '17 11:06 dveos

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

RussH avatar Dec 06 '18 12:12 RussH

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.

dveos avatar Jan 12 '19 19:01 dveos

@dveos that'd be great!

RussH avatar Jan 24 '19 16:01 RussH