Two Maps on one page, separate post types
-
Hi
We’ve been working with this plugin for a while now and are really happy with it!
Now we want to add two maps onto the same page (using Kadence Blocks Plugin to have tabs, one map per tab). They are two separate maps in the backend, they display different post types and are filtered via independent ACF fields.
There are some issues we’ve run into, they all happen only for the second map in the second tab:
1. The navlist appears empty upon page load, but the map shows the relevant markers. When we select a filter (dropdown or checkbox type) the map reloads and only shows the relevant markers and the navlist loads too. After deselecting said filter the map and the navlist now show all the markers that would/should be visible upon page load.
2. Filters of type range/slider do not work on the second map, the posts/markers don’t get filtered. The posts/markers on the first map however disappear when slider filters on the second map are used.
When the same ACF fields are used as filters with a different filter type (checkbox, dropdown, radio button) the posts/markers are filtered. We have double checked that all the affected fields are of type number in the ACF field group settings since we thought that could be the issue, but it seems it wasn’t.
3. The reset button on the first map resets all the filters, navlists and maps of both the maps. The reset button on the second map seems to do nothing
We looked through the support forum beforehand and saw this post https://www.ads-software.com/support/topic/multiple-maps-with-different-markers/ and tried to follow the advice. We have set up a new taxonomy that can be set for both post types and could be used as a filter on either/both maps. Using the display option with categoryfilter however did not seem to change anything for us. But the taxonomy is there in case it could be helpful with our issues.
We also saw this page https://locateandfilter.com/2-maps-in-the-same-page/ in your documentation and thought it would be helpful, but it didn’t seem to include the information we needed.
The second map works absolutely fine when displayed with the exact same settings on a separate page, the navlist is filled upon page load, the sliders work, the reset button works.
So, is what we want to achieve, to have two maps displayed on the same page in separate tabs, even possible?
Thanks in advance!
(P.S. Full Disclosure: we have made some minor changes to the plugin code, like adding an if statement to the reset function, because for single post types the reset button would cause the map view to go to default start position instead of centering the single marker like it does upon page load.
We would gladly provide you with a ZIP file containing the plugin files with our alterations)The page I need help with: [log in to see the link]
- You must be logged in to reply to this topic.