For testing i've been successful in applying the following filter, which I believe is what's being developed in this thread: http://drupal.org/node/1469956

Content: Geo Location (field_data_field_location: Distance from point.)

However I cannot find the same filter in the contextual filters.

(Should I be using a 'proximity option' - which I cant seem to find)

I basically need to contextually set the location (either WKT, or lat/long) for the view.

Comments

Brandonian’s picture

The filter you're looking for has been renamed [field name] - proximity.

chrisboo’s picture

I am experincing the above problem but cannot find any filter with a name according to comment number #1. I am on 7.x-2.x-dev. Was this option removed again?

henrikakselsen’s picture

Yes, wondering the same thing as #2.

sundersingh’s picture

agreed. there is a views filter called '[field_name] - proximity' but no such contextual filter in the new 7.x-2.x (the one with the proximity patch(es) merged)

is this by design? or an oversight?

johnv’s picture

Category: support » feature

I couldn't find a proximity contextual filter, either, so I ported the one from Location module to Geofield/GeoLocation.
My patch still needs a foster home. You can find it here: #1171232-5: Provide contextual filter (using Geodata from argument/node/user as filter input). It supports Geofield/Geolocation/Location, but is now part of Geolocation. I needs only renaming some files to be part of Geofield.

The filter is now in the format or . (location format)
If there is any interest, we can provide other formats, like .

sgp913’s picture

I'm looking for this myself right now. Isn't there an easy way to just basically copy the code from the 'geofield-proximity' filter with manual point into contextual filter?

I propose for contextual filter:

Is less than = lat,lon,LT400km
Is less than or equal to = lat,lon,LE400km
Is equal to = lat,lon,EQ400km
Is not equal to = lat,lon,NQ400km
Is greater than or equal to = lat,lon,GE400km
Is greater than = lat,lon,GT400km
Is between = lat,lon,BT400km-1000km
Is not between = lat,lon,~BT400km-1000km

Is there anyone who can whip this up quickly? I can try but I don't know how correct the outcome will be.

johnv’s picture

sgp913’s picture

I used that sandbox successfully with another view I had (checking >=number), but for geofield it's giving me:

Distance must be a positive integer.
Origin: Latitude is not numeric.
Origin: Longitude is not numeric.

How can I override this/remove validation?