I have a module which needs to generate a list of zipcodes within a specified distance of a user-entered zip code. Previously, I was able to use this code:
$ziparray = location_nearby_postalcodes_bylocation($location, $radius, 'mile');
It looks like that function has been removed in 5.x-3.x and I can find no suitable alternative. How am I supposed to get a list of nearby zipcodes now?
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | location_search.zip | 2.37 KB | christok |
Comments
Comment #1
seanrFWIW, this has completely broken the zipcode search functionality of the letters module: http://drupal.org/project/letters.
Comment #2
bdragon commentedHmm, looks like I killed that back in revision 1.85, as it was using the broken search cache stuff that got ripped out.
The api itself wouldn't be too hard to reimplement, I suppose.
Comment #3
seanrOK, well, how do I fix my module now? I need that functionality in some form or another.
Comment #4
christok commentedSubscribe
Comment #5
christok commentedI copied the relevant search functions from 5.x-2.x to a separate .inc (attached) and commented out the cache search functionality since that was throwing errors. This is an ugly hack but it works for version 6.
Comment #6
seanrThat's basically what I ended up doing, though I added letters_ before location in all the function names to avoid conflicts with older versions of locations. You can see it in the 5.x branch of letters and later today in HEAD. We really need to get this functionality back into location core.
Comment #7
yesct commentedPlease do an update and see what the status is in the new official or dev release. Some major changes have occurred. If there is still a problem, please post a detailed summary and set the status back to active (or if you post a patch, to needs review). Thanks.
Comment #8
ankur commentedLooks like this became a support request with a satisfactory reply in #5.