We are building a resource locator. The user can filter on services provided and we'd like them to be able to order the results by distance from a searched address. The filters work, the geolocation works* (the build that is not yet pushed to the url above), and the orderBy distance is not.
This is the query in the code:
And according to hsDebug=true* this is how the query is sent:
What am I missing that is causing the orderBy to not work?
*Thank you to @Jsum and @lscanlan for helping me figure out how to persist the lat and lon from the google maps api.
**Thank you to @mcoley for the hsDebug=true tip. That extension is a lifesaver!
@JAbella are you viewing a page with the query parameters at the end of the url? It looks like it might be empty. e.g. example.com/map?latitude=123&longitude=321
Thanks @stefen -- removing the mi doesn't change the ordering of the returned rows. Sort of related, when I remove the additional filters, and try to sort everything, I get this error:
Does that mean there's an error with my location column? There are no blanks in the column and the lat, lon is properly formed (ie no missing commas, valid data).
@JAbella are you viewing a page with the query parameters at the end of the url? It looks like it might be empty. e.g. example.com/map?latitude=123&longitude=321