Hello,
I need to calculate proximity from Argument passed to view and it looks like currently it impossible. Here is patch attached for file 'location/handlers/location_handler_field_location_distance.inc'. Basically, it adds new option to field 'Location: Distance / Proximity' -- 'Use Distance / Proximity argument'
Regards,
Pavel
| Comment | File | Size | Author |
|---|---|---|---|
| #14 | 732068-14-distance-proximity.patch | 2.52 KB | mstrelan |
Comments
Comment #1
pavel.karoukin commentedAnd identical patch for sorting ability by Distance/proximity from value passed as argument
Comment #2
yesct commentedThere seem to be quite a few "handler" issues and patches recently in the issue queue. Someone, please search for them and see if any are duplicates and link them together, maybe use a location view handler "tag" on them.
Comment #3
yesct commentedtagging.
Comment #4
lance.gliser commentedI'm in need of this feature, and I could barely understand what the two patches listed here were after. I'm pretty sure they are on a different version of location as well. Still, it pointed me to enough of the right places for me to develop a patch against Location v6.x-3.1
Please review this patch. It's working well on my local and development servers.
Comment #5
lance.gliser commentedComment #6
lance.gliser commentedThought I'd give an update. The patch I attached here is still working for me. Just today, i created a relationship to a user, and was able to use the argument field and sort with no issue.
Comment #7
lance.gliser commentedI'm still hoping for a maintainer to review this for inclusion in the next release.
Comment #8
lance.gliser commentedSolution is still viable. Needs review.
Comment #9
deepeddy commented+1 on this patch.
I just applied it and it does exactly what I need.
Comment #10
lance.gliser commentedI've just created a similar solution for D7 as well. I don't want to provide a patch for this one, as I might be stepping someone's toes. I found code 'close' to right for providing this functionality already in the location.views.inc file, and made slight modifications:
Then just a small addition to the sort handler:
It seems like someone might already be working on this, or I've just run over code someone else has purposed for another reason. I'd appreciate some feedback on if that was patch worthy, or already covered.
D7 Location 7.x-3.x-dev
Comment #11
podarokall feature requests should be rolled against latest 7.x-3.x-dev and after commit can be backported to 6.x branch
Comment #14
mstrelan commentedThe attached patch allows for when the argument uses zip code lookup and provides ability to sort by this distance.
Comment #15
jacob.embree commentedIt looks like this issue has changed a lot. It looks like the only thing left from the original report is to add the option to use a contextual filter as an argument to the proximity/distance sort handler. #14 is working for that.