Skip Navigation

[Resolved] Toggle between map and list view.

This support ticket is created 5 years, 3 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 3 replies, has 2 voices.

Last updated by Luo Yang 5 years, 3 months ago.

Assisted by: Luo Yang.

Author
Posts
#1360141

Tell us what you are trying to do?
I am hoping to have the ability to switch between a map view, and a list view. Currently, my page at hidden link uses a map view, but we are hoping to add a toggle that says "list" view, and would instead show a list of results, not a map. Additionally, we'd like the map to show all of the results with markers, not only the results one the first *page* of the results.

Is there any documentation that you are following?
No, although I have read through some of the toolset forums and read some previous responses.

Is there a similar example that we can see?
No

What is the link to your site?
hidden link

#1360233

Hello,

Q1) I am hoping to have the ability to switch between a map view, and a list view
There isn't such a built-in feature within Toolset plugins, it needs custom codes, for example, you can follow jquery document to setup the toggle effect, see their document:
hidden link

Q2) Additionally, we'd like the map to show all of the results with markers, not only the results one the first *page* of the results.
This is expected result, as a workaround, you can create another view, without filters, pagination or limitation, display all markers in the map.

#1360245

Hello, understand how to do the toggle, but can you elaborate on having the map show *all* results?

We need both the map and also the text results to respond to the filters - but the map to show *all* markers, not just the filters on your map.

Thanks,
Max

#1360259

In your case, it needs two post view, for example:
1) First post view: Search form and text results
- With the filters and search form
- With pagination settings
- Display the search result in text

2) Second post view: Map view
- With the same filters above view 1), use same URL parameters, without the search form
- Without pagination settings
- Display the search results in Google map.

Then display both post views in same page, when you submit the search form, it will pass URL parameters to both views, and get different results.