Skip Navigation

[Resolved] Having the map display after no results found.

This support ticket is created 3 years, 7 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 1 reply, has 2 voices.

Last updated by Waqar 3 years, 7 months ago.

Assisted by: Waqar.

Author
Posts
#2033473

Tell us what you are trying to do?
If a search was not found can the result just be the overview of the map?
Is there any documentation that you are following?
no
Is there a similar example that we can see?
Search 29412 from the location search on this page ( hidden link ) and you will see the search result text alert come up.
What is the link to your site?
hidden link

#2033703

Hi,

Thank you for contacting us and I'd be happy to assist.

When no results are found, there are no posts to get the location information from for the map markers. This is why it won't be possible to show an overview of all the locations on the map.

You can center the map, to a specific location, when no results are found, by adding a map marker shortcode for that specific location, inside the view's "[wpv-no-items-found].....[/wpv-no-items-found]" tags:
( ref: https://toolset.com/documentation/programmer-reference/maps/maps-shortcodes/#wpv-map-marker)


[wpv-map-marker map_id='map-1' marker_id='marker-no-item' address='New York, United States' marker_icon='none'][/wpv-map-marker]

Please replace "map-1" with your map's actual ID and "New York, United States" with the target default location to center the map on.

I hope this helps and please let me know if you need any further assistance around this.

regards,
Waqar