Skip Navigation

[Résolu] Setting up a Search page with map and grid of listings

Ce fil est résolu. Voici une description du problème et la solution proposée.

Problem:

My problem is how do I setup the markers to display on the top map, currently I am not getting any markers displaying.

Solution:

It is a compatibility problem, see the solution provided by client:
https://toolset.com/forums/topic/setting-up-a-search-page-with-map-and-grid-of-listings/#post-860375

Relevant Documentation:

This support ticket is created Il y a 6 années et 7 mois. 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.

Aucun de nos assistants n'est disponible aujourd'hui sur le forum Jeu d'outils. Veuillez créer un ticket, et nous nous le traiterons dès notre prochaine connexion. Merci de votre compréhension.

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/Hong_Kong (GMT+08:00)

Ce sujet contient 2 réponses, a 2 voix.

Dernière mise à jour par Line49 Design Il y a 6 années et 7 mois.

Assisté par: Luo Yang.

Auteur
Publications
#849985

Tell us what you are trying to do? I want to setup a page that has a Google map at top showing the markers for the custom posts that are being displayed in the search results, followed by the search filters and then the Search results which will be a grid of custom posts.

Is there any documentation that you are following? I have started with this page: lien caché. I want to add the map above the Refine your search section and will change the layout under Search Results from a list to a grid.

Is there a similar example that we can see?

What is the link to your site? lien caché

My problem is how do I setup the markers to display on the top map, currently I am not getting any markers displaying. I can figure out how to change the lists of posts into a grid. I just don't know how to get the map above the filters and have the search results below the filters and the markers show on the map.

Here is my view code:
[wpv-layout-start]
[wpv-items-found]
[wpv-map-render map_id="map-10" map_height="400px" spiderfy="on" fitbounds='off' single_zoom='13' general_zoom='11' scrollwheel='off' marker_icon="//www.2018.vancouvernewcondos.com/wp-content/uploads/2018/05/office-building.png"][/wpv-map-render]
<h2>[wpml-string context="wpv-views"]Search Results[/wpml-string]</h2>
<!-- wpv-loop-start -->
<wpv-loop><div class="row">
<div class="col-sm-12"> [wpv-post-body view_template="Building Search"]</div>
</div>
</wpv-loop>
<!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-no-items-found]
<h2>[wpml-string context="wpv-views"]No items found[/wpml-string]</h2>
<p>[wpml-string context="wpv-views"]Please try another search.[/wpml-string]</p>
[/wpv-no-items-found]
[wpv-layout-end]

and here is my Content template:
<div class="row">
<div class="col-xs-12 col-sm-3 thumbBlock">
[wpv-if image="_thumbnail_id" evaluate="!empty($image)"][wpv-post-featured-image size="category-thumb"][/wpv-if]
[wpv-if image="_thumbnail_id" evaluate="empty($image)"][/wpv-if]
</div>
<div class="col-xs-12 col-sm-9 vertical-layout">
<h2>[wpv-post-link]</h2>
<h3>[types field="address" output="raw"][/types]</h3>
[vnc2015excerpt]
</div>
[wpv-conditional if="( $(wpcf-map-address) ne '' )"]
[wpv-map-marker map_id='map-10' marker_id='marker-[wpv-post-id]' marker_title='[wpv-post-title output='sanitize']' marker_field='wpcf-map-address']
[wpv-post-body view_template="markercontent"]
[/wpv-map-marker]
[/wpv-conditional]
</div>

Thank you.

#852315

Hello,

I have checked the HTML source code of your website:
view-source:lien caché

There isn't HTML codes for [wpv-map-render map_id="map-10" ...]

It is abnormal, please check these:
1) you are using the latest version of Toolset plugins, you can download them here:
https://toolset.com/account/downloads/

2) deactivate other plugins and switch to wordpress default theme, and test again

3) If the problem still persists, please provide a database dump file (ZIP file) of your website in below private detail box, also point out the problem page URL, I need to test and debug it in my localhost, thanks

#860375

Hi,

It turns out that it was this parameter fitbounds='off' which was causing the issue with the map.