Hello. Thank you for contacting the Toolset support.
Displyaing 2500 markers on map is obviously will affect your page performance even without using Toolset. Maybe you want to paginate the results and based on paginated results you want to display the markers on the map.
On the farms page (hidden link) I changed the view to not show the list of all the items showing on the map. What I'd really like to do is show a blank map at the start - is that possible? Then when someone uses the filters, it will show only a subset of the total items.
The map that shows all the pins at once is hard to use anyway.
That went a little bit further than I was expecting! See Image attached.
That also wiped out the filters down below as well as the pins on the map. It seems like the pins need to be "hidden" instead of not rendering the view - I still need that below.
Ok. Can you please share admin access details. Let me reivew how you configure your map and view and then I will be able to guide you in the right direction.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I have set the next reply to private which means only you and I have access to it.
I've added the following code to "Custom Code" section offered by Toolset:
=> hidden link
function tssupp_no_initial_results( $query_results, $view_settings, $view_id ){
$target_views = array( 2165); // Comma-separated list of View IDs
if ( in_array( $view_id, $target_views ) ) {
// if there is a search term set
if ( !isset( $query_results->query['tax_query'] ) && !isset( $query_results->query['s'] ) ) {
$query_results->posts = array();
$query_results->post_count = 0;
$query_results->found_posts = 0;
}
}
return $query_results;
}
add_filter( 'wpv_filter_query_post_process', 'tssupp_no_initial_results', 10, 3 );
Also, I've removed the marker from your map block from the following page in backend:
- hidden link
And also added the view block that should displa ythe result. You can either add one view block that shows search form and result, that should also work.
Almost! Very close. Is there any way that we can have the default mat come up centered on North Carolina USA - just with no data? So it doesn't look like the map is broken?
To set the map center to "North Carolina USA" I've grab the lat and long for the same address and you will find the option to set a default center With your Maps block.
=> Check this screenshot hidden link
What you need to do is, You will have to disable the setting "Adjust zoom and center to show all markers at once" option on the map, in order to get a default center. Once you input the default center value, you can reactivate the option, and the map center lat/long you configure will be in effect.
I've already done that for you. Can you please confirm it works as expected.