Tell us what you are trying to do?
We have a directory site with business listings, that we want to show on a map, above a grid of the listings. We can output the listings onto a map on page load, but after using the custom search filters with AJAX reload - the map is empty. I am calling the WPViews.view_addon_maps.reload_map method (code snippet below) on the js_event_wpv_parametric_search_results_updated event, but it does not reload the map. I know the search results updated event is firing - you can see the logs in the console.
I have found a number of support posts on your forums that reference WPViews.view_addon_maps.reload_map - but can't find any actual documentation of this method.
jQuery(document).ready(function(){
jQuery( document ).on( 'js_event_wpv_parametric_search_results_updated', function( event, data ) {
console.log('js_event_wpv_parametric_search_results_updated called');
var timeoutID = window.setTimeout( function(){
WPViews.view_addon_maps.reload_map('directory-map');
console.log('WPViews.view_addon_maps.reload_map called');
}, 1000 );
});
});
Is there any documentation that you are following?
How to setup the view with map and posts:
https://toolset.com/lesson-placement/lesson-placements-1622939-1620853/
What is supposed to be the solution to my issue:
https://toolset.com/forums/topic/maps-in-tabs-ultimate-shortcode-2/
Is there a similar example that we can see?
I can't seem to find one.
What is the link to your site?
hidden link
You'll see the map corresponds to the listings when you load the page. But if you filter - for example, by town>Newport, there are listings in the grid below, but the map is empty, and it does not reload when I call the reload_map method.
You can look at the console to see when the output of the console.logs in the code snippet above.
I can provide an admin login to this staging site for you.
Also:
- The marker popup HTML does not work.
- Sometimes when I'm editing the map module in the content template, some of the settings are reverted to their defaults - such as the minimum number of markers in a cluster.