I'm using the maps distance functionality to calculate the distance between a location entered in a search box and custom posts on my site.
Everything works, but when I display the distance in a table and try to sort it, it is sorted as a string and not a number.
How do I get this sorted as a number?
I'm sorry Matthew, we don't have support for ordering by distance in tables.
The table gets generated with what appears to be a sorting control for the column, but it doesn't work, the logic required for it to function isn't hooked up.
We have an existing internal ticket about this, and I'm adding this thread to it to boost the priority, but it's quite an old ticket so it doesn't look like it will get implemented anytime soon.
I suggest you don't have orderable columns in your table, and instead set the order of the View to always be by distance.
Ok fair enough. I'm pretty sure I'll be able to handle sorting on the front end with another library then since it's not supported with Toolset so no problem.
I would actually really like to be able to sort by distance and haven't been able to make that work either. I'm using the Legacy Builder. I can sort by Post Title, Date, etc, but nothing for Distance. Where should I be looking?