I'm not sure if this is on the TODO list already, but it'd be good to have the ability to filter on location fields and also use them as arguments for Views 2.x. I've not done much with Views 2 yet, but I could probably put this together and provide a patch if you've not already started on it.

Comments

bdragon’s picture

I started on it by doing the first one (proximity search!), but the rest is pretty trivial busy-work... It would also be nice to have help descriptions for everything (if only so views quits saying Error! all over the place...)

Feel free to tackle the easy ones.

alex.k’s picture

StatusFileSize
new1.57 KB

Adding a field that outputs the distance between the location being displayed and the current user's default location.

geodaniel’s picture

StatusFileSize
new5.29 KB

The attached patch adds a number of filters and adds help text to the fields. It's a work in progress still, as I've not looked at any of the handlers yet. It also doesn't include Alex's user->node proximity field yet.

geodaniel’s picture

Except I've just realised I've been patching against an old version. Hopefully some of it is useful still :)

geodaniel’s picture

Status: Active » Needs work
StatusFileSize
new5.78 KB

Updated patch against the latest version. Adds help text, sorts and filters where they don't need additional handlers.

geodaniel’s picture

I'm also trying to figure out how best to do a proximity argument, so that you can give it a NID, and then have a field show you the distance between that node and the current location. Any ideas on how best to do that? I tried with the existing Nid argument, but that didn't have the desired effect.

bdragon’s picture

Yummy, help text!

I committed what you have so far, good stuff.

Regarding sort by distance, there are some helpful functions in earth.inc that you can base stuff off of (or just call..)

jasontanner’s picture

Is anyone working on adding autocomplete and dropdown options on the Location Views exposed filters ?

e.g. Having exposed Location: Country and Location: City as filters - it would be nice to be able to choose whether they are simple text fields (as now) or dependent autocomplete fields or hierarchical dropdowns.

yesct’s picture

Tagging.

Is this kind of a master issue for views and location? Or should this be a duplicate of another issue?
(I'm trying to organize the issue queue so people who know how to code can better understand status of various initiatives.)

Or should we mark this one closed (since it looks like much was committed in #7) and open new issues for each other piece of functionality?

views arguments work here:
#357295: Proximity Search based on lat/lon, using views arguments

related to
#208686: Views filters - Filter by typed address and Filter by proximity to user

yesct’s picture

Issue tags: +location bdragon check

tagging and bumping for bdragon to look at.

ankur’s picture

Status: Needs work » Closed (won't fix)

This looks dated. If it isn't, we'll want to re-open it for a 7.x branch and re-roll the patch.