Is there a way to set the default map location so that if it doesn't find any results it could be a location I choose? As it is, it's a different country from mine and looks strange to have it load if it's not finding a result.
Also I have that map on a search page.
I have search fields within that CPT.
I have a simple Text input search set to search title and content.
I have ten test posts. One of them contains abcd for example within a longer title.
If on the front end I enter abcd, it fails to find that post. Why is the text input search not finding a result which contains those letters in the title?
Also, I have the Post Name as a custom field. It's set to string and equal to. It's also not finding it with that search.
Why isn't it coming up with the post which has those letters in the title?
To clarify on the no results found Africa image...
I have a container with a map block. Below that I have a container with a view. In that view I have the title of the posts for that CPT. I have ten test posts, they show up there. But if you do a search and it doesn't find anything then the map in the separate block above goes to Africa.
Hello. Thank you for contacting the Toolset support.
As per our support policy, we entertain only one question per ticket. In this ticket, I will help you to set default location when no results found.
Can you please share problem URL and admin access details as well as share what location you want to set as default location when no results are found.
*** 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.
What if it's just the map block for a single post on the custom post type template? I notice the one you showed me is for a view loop on a map search page - which is great, I need that more but I can see possible edge cases for whatever reason the address is missing or doesn't get found on a map on a single post - I don't want it to show Africa.
I suggest a feature request for an easy setting somewhere to simply set your default map location. Doesn't seem like it should have to be this convoluted to make it happen.
I have the shortcode you put in the screenshot. Here it is if it helps anyone else:
[wpv-map-marker map_id='map-4' marker_id='marker-1' address='United States'][/wpv-map-marker]
1. How to have no marker show up? It makes no sense to have a marker on a map in the middle of a place with no address or reason. I just want it to show the US without a marker.
2. How to add zoom level to that shortcode? It's zoomed way in close to nothing, a field in the middle of nowhere.
In that case we will have to use different approach.
I've added the following code to your view's "Custom JS and CSS" section's JS editor. To see it you should select your view block and on right side bar within the "Custom JS and CSS" section's JS box you can see the following code.
I see where you added it. The search page for that post type. On the page where you added it (please don't post publicly) even if I clear the filters, it's still showing map markers for the ten locations below the map. How do I set it up so
1. It's a blank map of the US when the page loads
2. No search results pre-load. I have no idea why those ten items are appearing when you load the page?
How can it possibly be this complicated to simply set a default location on the map?
New threads created by Minesh and linked to this one are listed below: