I see commits are being made every few days, so I'm excited to see how quickly this module is progressing. I'm sure this is in the back of someone's mind but I wanted to create an issue just to make sure.

Views Relationships don't seem to be working yet for distance. If I create a node and insert coordinates into that node, I can create a view that shows the distance of the node exactly as I would expect. However, what I want to do is show the distance of the author. I've created a relationship that allows me to insert the author's coordinates into the Views output just fine, but if I add the field for the author's distance, the whole Views output disappears.

Comments

jimmyobomsawin’s picture

Title: using Views Relationships for distance/proximity » Set options for origin on Distance field in Views
Category: bug » feature

***scratch this comment - I was intending to make a new post but apparently forgot what window I was in***

jimmyobomsawin’s picture

Title: Set options for origin on Distance field in Views » Using Views Relationships for distance/proximity
Category: feature » bug

Setting issues back, my mistake!

cesareaugusto’s picture

If I create a node and insert coordinates into that node, I can create a view that shows the distance of the node exactly as I would expect.

How did you do that? I got a view which is a block containing filtered nodes close to the current node (each node got a geofield which stores its position). I want the view results to be sorted accordingly to the distance from the current node. When setting sort criteria I can find the Content: Geofield (Distance from point) criterium though it seems I can put only a fixed point, no option for computing distance from the current node geofield. Any tips?

andrew_k’s picture

I am trying to achieve something similar. I would like to find nodes relative to a lat/long point that I
will pass in via the url. Is this currently possible? I'm using the latest 2.x-dev

Brandonian’s picture

Status: Active » Fixed

I've pushed some changes to the views handler which takes relationships into account.

@andrew_k, currently the best way to do that is via an exposed filter. I haven't yet added an argument handler because I'm not 100% sure what format I should take that sort of data in from the url. At first glance, you'd probably want a url argument like ?lat=x&lon=x, but views arguments typically are part of the main url, so formatting that in a way that makes sense isn't a solved issue. If you have any suggestions, please open another ticket.

Brandonian’s picture

@andrew_k, I went ahead and opened another ticket.

#1514916: How to handle Argument handler with Views

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.