Hello. Thank you for contacting the Toolset support.
I would like to know are you using Toolset Blocks view or classic view to display the map? and what location you want to set as default location when no search results are found?
Can you please try to add the following code to "Custom JS" section of your content template:
jQuery(document).ready(function($){
jQuery( document ).on('js_event_wpv_addon_maps_init_map_completed', function( event, event_settings ) {
var mapid = 'map-1'; // replace with your original map ID
var map = WPViews.view_addon_maps.get_map(mapid);
var markers = WPViews.view_addon_maps.markers[mapid];
if(markers.length == 0) {
mylat = 47.116386; /// replace with your desired location lat
mylong = -101.299591; /// replace with your desired location long
map.setZoom(3);
map.setCenter(new google.maps.LatLng(mylat,mylong));
}
});
});
Where:
- Replace mapid variable value with your original map ID
- Set mylat and mylong variable values with your desired location lat and long.
Please let me know how if you require further assistance.