Hi,

I've successfully created a test view and returned a result set based on the nodes distance from the supplied lat/long information I added through the views admin UI (using the "Enter Value" option). I'm a bit stuck on two tasks though:

  • Is it possible to pass through the lat/long from node I'm on? For example the node I'm viewing represents Paris and this has a lat/long. I want my view to show all restaurants within 5 miles of the Paris geocode. I have all restaurants geocoded but I can't see how to pass in the city geocode dynamically to allow for flexible Views.
  • Is it possible to sort the view results based on the nodes distance from the target lat/long?
  • I've been using this module for a year now and this latest version looks great!

    Comments

    allie micka’s picture

    Status: Active » Needs work

    Is it possible to pass through the lat/long from node I'm on?

    Not yet, but I love this idea and will attempt to get it into a default argument handler.

    Is it possible to sort the view results based on the nodes distance from the target lat/lon

    This should be possible with the latest CVS commit.

    idontknowtheanswer’s picture

    Thanks Allie, if you want help testing just shout!

    adamus_maximus’s picture

    Sorting does not work.

    To clarify, I specifed filters and fields that compute spherical distances from a certain point, exposed to the user as a Google API text field. This much works fine. When I try to sort on this same distance calculation, the sorting configuration does not make it into the query. It just sorts by my first column, users_name:

    "ORDER BY users_name ASC"

    adamus_maximus’s picture

    Category: support » bug