Active
Project:
Geofield
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
8 May 2012 at 01:08 UTC
Updated:
23 Apr 2013 at 06:01 UTC
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
Comment #1
Brandonian commentedThe filter you're looking for has been renamed [field name] - proximity.
Comment #2
chrisboo commentedI 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?
Comment #3
henrikakselsen commentedYes, wondering the same thing as #2.
Comment #4
sundersingh commentedagreed. 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?
Comment #5
johnvI 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 .
Comment #6
sgp913 commentedI'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.
Comment #7
johnv@ sgp913, try this: http://drupal.org/sandbox/itangalo/1086472
Comment #8
sgp913 commentedI 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?