Low search distance no results show suggestions.
Hi, I'm using Low distance search to search lat/lng coordinates stored in a "Store" channel.
The distance:to is taken from the lat/lng field in the channel entry.
The distance:from lat/lng is from a Google maps reverse lookup. The visitor enters a place name in search field and I use geocoder.geocode to get the lat/lng and pass to a hidden distance:from field.
This works great but there is an issue (Not a Low search issue) when there are two places with the same name as the visitor has search for.
e.g. A visitors searches for Ravensthorpe, Google gets the lat/lng for Ravensthorpe, Northampton and I use these to perform a search. As there are no stores in Ravensthorpe, Northampton so no results.
The issue I'm having is there is a store in Ravensthorpe, Dewsbury so what I'm doing at the minute is using a channel entries tag with search:address="{low_search_location_field}" within the Low no results tag to search the entries.
I know this is a bit long-winded and not really an Low problem but I just wondering if is there is a better way to do this?
Thanks
Wayne.
Replies
Low 11 May 2018 18:57
Not really, sorry. As you said, the issue here has more to do with the address-to-lat/long than with Low Search's workings itself.
If anything, if you come across duplicate names, maybe use JS to detect them and append the right county/region to it so it will match the right coordinates.