Closed (fixed)
Project:
Geofield
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
23 Mar 2012 at 14:20 UTC
Updated:
5 Jun 2012 at 14:01 UTC
Continuation from #1360260: Add views filter to provide proximity search of Geofields. My original patch allowed sorting based on the distance from a different entity. The much much improved patch that was eventually commited to 2.x only allows for sorting on absolute distances. I'm moving to 2.x so I can get the proper haversine calculation, but I still need a relative distance.
Attaching patch. It's still a total hack, I know, but this time I think it has the potential to become proper patch. :)
| Comment | File | Size | Author |
|---|---|---|---|
| geofield_distance_sort.patch | 1.23 KB | Letharion |
Comments
Comment #1
Letharion commentedI'm not setting this to needs review since the patch is not really in a state that is worth reviewing. I'm just posting it in case someone else want's to pick up from here.
Comment #2
fehin commentedHi Letharion, thank you for your hard work on the patches.
Would you please you provide a tutorial on how to create a proximity search? I'm trying to do a proximity search on users and I have created a view but can't find the proper settings for the distance search. Thanks in advance for the help.
Comment #3
Letharion commentedSorry fehin, the patch is not in such a state that it is useful to anyone who doesn't understand the PHP code. There's no way to provide the information you seek at this time.
Comment #4
grantlucas commentedI've been looking through the distance filters this morning and am wondering if it's possible to implement #1469956: [Meta] - Improve Views-powered Geofield proximity searches in with these changes. Essentially, there would be another filter with an autocomplete field for location. This would then be geocoded to get the lat and long of the origin. I'm attempting to implement this but honestly am a bit lost :(.
The way I see how it could work is that there would be two filters which could work together. The distance filter and the origin filter. The distance could have a default lat/long but also support getting it's origin data from the text origin filter and then vice versa for the origin filter. It can have a default radius but could also pull from the distance filter.
Thoughts?
Comment #5
Brandonian commentedCurrent views integration refactor handles distance filtering from other geofields.