All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

showing the distance in the results tag

Ross Hulford 16 May 2014 11:15 question, complete

I am trying to implement a search by distance

http://pastie.org/9181435

it takes a lat/long value from my channel and in the results I would like to show the distance. This is what i have

{exp:low_search:results status="not closed" show_expired="yes" dynamic="off" limit="3" paginate="bottom"} {if count == 1}

{low_search_distance}

but I get no distance.

Replies

  1. Low 16 May 2014 11:28

    As per the docs, the distance:to parameter should contain:

    The two channel field names that contain the latitude and longitude values separated by a vertical bar, used to calculate the distance. Eg. cf_entry_lat|cf_entry_long


    Right now, it looks like you're filling the parameter with an actual lat/long value derived from a member.

    On top of that, the distance:from parameter, which should contain actual lat/long values, still holds the example data.

    Try and rectify the values for those two parameters, does that help?

  2. Ross Hulford 16 May 2014 11:41

    Nice one low!