Closed (fixed)
Project:
Location
Version:
6.x-3.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
9 Feb 2010 at 15:39 UTC
Updated:
2 Aug 2014 at 05:07 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
jdln commentedAnyone? Ive hit a brick wall with this. I need this feature for my site so any help would be greatly appreciated.
Thanks
Comment #2
pieterdcDoes version 6.x-3.1-rc1 solve your problem?
I got ‘User's location (blank if unset)’ working - on a similar setup, I guess.
Comment #3
jdln commentedYup its fixed. Thanks a lot.
Comment #4
jdln commentedOops, I spoke too soon.
I've enable Locations in User Settings. In Views the Field 'Location: Distance / Proximity' has the Origin set to 'User's location'. This works fine (hence my last post).
The problem is that I cant get the Filter 'Location: Distance / Proximity' to work from the User's location. When I click on 'Location: Distance / Proximity' as a Filter, I have no way of choosing the User's Location as the Origin. Instead I get these options;
Defaults: Configure filter Location: Distance / Proximity
Relationship:
This item is currently not exposed. If you expose it, users will be able to change the filter as they view it.
Operator:
Proximity (Rectangular)
Proximity (Circular)
Latitude:
Longitude:
Postal code:
Country:
Distance:
It may not be relevant, but Filtering based on distance from a post-code doesn't seem to work either, I always get no results.
Thanks
Comment #5
jdln commentedAnyone?
Comment #6
pdcarto commentedNotwithstanding where the location filter says...
...as jdin points out, there is no option to select the current user on the filter configuration form.
Furthermore, I could find no code in location_views_handler_filter_proximity.inc that looks for the user's location.
If no values are entered in the Latitude, Longitude, Postal code or Country fields, then the sql string just shows a "(0)" where the `where` clause for proximity should be.
Comment #7
pdcarto commentedNot an elegant solution, but I have a version of location_views_handler_filter_proximity.inc that attempts to get the reference location from the $user if it is not otherwise provided in the filter form. Works for me. Patch attached.
Comment #8
jdln commentedThanks
Comment #9
yesct commentedI think this got lost in the shuffle. Adding tags so this can be found when searching for like issues.
Comment #10
TheMentat commentedthis works great! thanks...
Comment #11
yesct commented@TheMentat Thanks for chiming in. Can you clarify though?
did you apply the patch in #7? To what version (date) of the dev version of location? What was the problem before the patch? What changed after the patch?
If you can add more details we might be able to mark this RTBC (Reviewed and Tested By the Community) and get it committed.
Thanks again!
Comment #12
rooby commentedThe views distance/proximity handlers were all overhauled for the latest release.
From what I can tell, the functionality desired in this issue should now be working in the latest release.
Can someone please check that out and confirm.
Thanks.
Comment #13
yesct commentedComment #14
j0k3z commentedI have a slightly different use-case (node proximity instead of user proximity) and the latest version seems to finally allow that functionality. (I'm using6.x-3.x-dev)
Comment #15
yesct commentedj0k3z Please write a step by step for how you set it up to work for node proximity. Documentation like that would be highly useful to add to the location project.
Comment #16
j0k3z commentedThis is how I created a block that shows all nodes within 1 mile of the node currently being viewed:
After adding a block view it correctly returns all nodes within a 1 mile radius. Im assuming returning users within a set radius instead of nodes would be just as easy to setup.
Comment #17
nasheet commentedIt seems to me that the distance/proximity handlers are working well. The only strange thing is that at very close proximity it is not the same as the distance calculated in Google maps. For example if I calculate the distance from my user's location to another point, if it is less than 5 miles then it is often off by .3 miles from what Google Maps says. I am using just using Location, GMaps and Views, no other user modules yet.
1. I created a View Type = Location
2. I Added Field = Distance/proximity to User's latitude and longitude (blank if unset)
3. Then I added a filter for NID of one node whose location is the destination point
This outputs the distance from the current user's location and the destination point. (though as I said it is not the identical distance as if I mapped it in Google).
Comment #18
brewern commentedThis might help http://geekeemedia.com/drupal/drupal-location-module-proximity-filter/
Comment #19
raulmuroc commented#16 Worked for me. #18 no.
Comment #20
rimanws commentedHello everyone,
I am having issue with Zip/postal code proximity search, I am using Location: Distance / Proximity in Filter criteria, the postal code field is added for my search form on http://dev.laborgator.com/search/gators project, this proximity search is not showing the proper result. How can i solve the issue, please I need help on this.
Comment #21
rooby commented@rimanws:
It would be best to create a new support request or bug report issue for your specific problem.
This issue is very old and long closed.