I used to have a taxonomy list for node locations as well as a gmap for showing all nodes on one, main map.
I now trying to get rid of this extra work (entering locations twice) and thought I'd try using the proximity view to allow users to find nodes close to the current one (I figure they can just use the main map to find nodes anywhere else) as opposed to selecting taxonomy terms.
What I'd like to know is how to do this.
I can setup a view in a block to display on node pages with the proximity filter, but how do I set the lat./long. to the current node automatically?
Any help would be much appreciated!
Comments
Comment #1
BWPanda CreditAttribution: BWPanda commentedStill looking for help with this if possible...
Comment #2
BWPanda CreditAttribution: BWPanda commentedAnyone?
Comment #3
malcomio CreditAttribution: malcomio commentedI was hoping to achieve the same, possibly by using relationships or arguments, but none of the location stuff appears in arguments
haven't managed to figure it out yet - can anyone help?
Comment #4
chaosprinz CreditAttribution: chaosprinz commentedSubscribing
I am searchin for a similar solution for user-locations. I tried with arguments, and i tried to give relationship to the filter, but nothing worked.
Comment #5
andrewsuth CreditAttribution: andrewsuth commentedYou're right, I am using the current dev version and the options for this are:
Origin:
And below these options there is a tiny FIXME written .. perhaps this has already been thought about?
+1 for current node added to Origin. I'd just love to be able to inform the users of the distance from the current node to other nodes.
This idea makes too much sense not to be added to the module.
Comment #6
srobert72 CreditAttribution: srobert72 commentedSubscribing
I'd want to show GMap for my current node.
On this map I'd like to show only other nodes with less a certain distance from current node.
Views proximity filter from current node would be great !
Comment #7
dpatte CreditAttribution: dpatte commentedI have just suceeded at being able to calculate the distance from users to any node, using the user location feature. If this is what you want, maybe I can help.
Unfortunately, if the user provides no location in his profile it seems to show no distance even with the fallback option selected.
Comment #8
fletch11 CreditAttribution: fletch11 commentedThis sounds like it would be useful for social networking type sites but I think the proximity to node filter/argument/relationship would be more useful for sites that do not require registration. Still looking for a solution to this. thanks
Comment #9
dpatte CreditAttribution: dpatte commentedI was messing around today and found a solution to a view proximity bug. The option 'User's location (fall back to static if unset)' does not fall back to static as expected in the sort or field parts of views.
In the version of Location I am using:
In location_handler_field_location_distance.inc, function query() - near line 88
and location_handler_sort_location_distance.inc, function query - near line 72 (both in the location module)
I have added the following lines of code
This is the else case for user if the user location is not available.
There may be more efficient ways of handling the code for this fix, but the above solution now works for me at my site at www.dance-ottawa.com
BTW: I'm not sure how the owners of this module wish me to package this correctly so that it can be submitted for the next build.
Comment #10
j0k3z CreditAttribution: j0k3z commentedThe "FIX ME" has been there for over 6 months now.
I want to have a block shown on a specific node that shows 10 nearby nodes. Seems pretty simple to do but not using the current code base. Im not much of a coder but I would like to contribute if possible to help solve this problem.
Comment #11
j0k3z CreditAttribution: j0k3z commentedHas anyone figured out how to hack this together?
Comment #12
j0k3z CreditAttribution: j0k3z commentedComment #13
Exploratus CreditAttribution: Exploratus commentedAnybody figure out how to create a map that shows the nearest nodes to a specific node?
Comment #14
brewern CreditAttribution: brewern commentedhttp://geekeemedia.com/drupal/drupal-location-module-proximity-filter/
Comment #15
lolandese CreditAttribution: lolandese commentedThe original post:
...a view in a block to display on node pages with the proximity filter, but how do I set the lat./long. to the current node automatically?
This seems to be solved now. See a working example.
Comment #17
Summit CreditAttribution: Summit commentedBookmarking, greetings, Martijn