Tell us what you are trying to do?
We have implemented the Toolset Map on a view using "by distance" features, which works as expected.
item 1) There is a requirement for the associated list of items needing to be sorted by distance not by post_title. (see example below)
Item 2) There is a requirement to show all markers on the map from the entire query not just the ones on current page when using pagination (when viewing page one, only markers for that page are displayed on the map)
What is the purpose?
Item 1) The end user is searching for a service from a specified location (zip/post code) and there could be 50 results. End user expectation is the closest location will be at the top of the list view. Sorting alphabetically is confusing and not addressing the user need. (if the furthest location begins with "A" it will be at the top of the list)
Item 2) The end user is wanting to see all queried service locations on the map.
(at the moment we are achieving this by removing pagination however this has a negative impact when there are a lot of results)
Is there a similar example that we can see? (example without pagination)
hidden link
Hello,
Q1) There is a requirement for the associated list of items needing to be sorted by distance not by post_title.
Yes, it is possible, you can follow our document to sort Views result by distance:
https://toolset.com/documentation/user-guides/display-on-google-maps/filtering-and-ordering-map-markers-by-distance/
Section "Ordering Views by Distance"
Q2) There is a requirement to show all markers on the map from the entire query not just the ones on current page when using pagination
There isn't such kind of built-in feature within Views, for example, in the post view, there are 10 items in each pagination, the marker shortcode [wpv-map-marker] will be outputted 10 times, so in your map, it will display only 10 markers in the map.
In your case, you might consider to create two post views:
- Query all posts without pagination, output the map
- Query posts with pagination, output the post information in text.
My issue is resolved now. Thank you!