There are a few issues on the subject but no clear directions on getting this to work. It seems simple but it's not working.

Location Module: 6.x-3.1-rc1
Latest Core, Views, CCK

I have a node type of 'clubs' using the CCK Location fields. I've created a Locations View. Set filter to Distance / Proximity using Form Mode "Postal Code (assume default country)" exposed. Another Filter for Node type 'clubs' and type 'published'. Added fields Node 'title' and Location 'distance / proximity'. The display for the view is a Page.

viewing page, entering zip code (US) into filter returns nothing.

This is for a large project due very soon, any help would be greatly appreciated. The site isn't live to the public as of yet.

Running the view generated query in the console returns 0 rows effected:

SELECT location.lid AS lid,
(IFNULL(ACOS(0.81839584910135*COS(RADIANS(location.latitude))*(-0.042468712119446*COS(RADIANS(location.longitude)) + -0.99909779726057*SIN(RADIANS(location.longitude))) + 0.57465488266757*SIN(RADIANS(location.latitude))), 0.00000)*6371051.323167) AS location_distance_0,
node.title AS node_title,
node.nid AS node_nid,
location.latitude AS location_latitude,
location.longitude AS location_longitude
FROM location location
LEFT JOIN location_instance location_instance ON location.lid = location_instance.lid
LEFT JOIN node node ON location_instance.vid = node.vid
WHERE (location.latitude > 20.602378306342 AND location.latitude < 49.548555693658 AND location.longitude > -110.21529600906 AND location.longitude < -74.65272399094) AND ((IFNULL(ACOS(0.81839584910135*COS(RADIANS(location.latitude))*(-0.042468712119446*COS(RADIANS(location.longitude)) + -0.99909779726057*SIN(RADIANS(location.longitude))) + 0.57465488266757*SIN(RADIANS(location.latitude))), 0.00000)*6371051.323167) < 1609347) AND (node.status <> 0) AND (node.type in ('club'))

Comments

WorldFallz’s picture

Location module has gotten a fair amount of maintainer love very recently-- the first thing I would do is try it with the latest dev versions of location and views2.

brewern’s picture

Just tried the latest Dev version and still doesn't work.

brewern’s picture

Got it working, thanks to the hard work from the community and contributors. I wrote a blog post on how I got it working... http://bit.ly/beryvo