Skip Navigation

[Resolved] Map does not show filter results

This support ticket is created 3 years, 11 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: Africa/Casablanca (GMT+01:00)

This topic contains 5 replies, has 2 voices.

Last updated by Jamal 3 years, 11 months ago.

Assisted by: Jamal.

Author
Posts
#2117269
Screenshot 2021-07-17 at 11.04.19.png
Screenshot 2021-07-17 at 11.04.34.png

Tell us what you are trying to do?

I am trying to create a map next to my View section. Everything goes well, but when I use my filters, the map shows the Gulf of Guinea in stead of The Netherlands ;-). How can I make sure that the map shows the filter-results well?

(When I refresh the page after using the filters, it works properly. Same when I use 'Full page refresh when clicking Submit'. So I think something goes wrong with the AJAX refresh...)

Is there any documentation that you are following?

Yes, I've followed every step in this video: https://toolset.com/lesson-placement/lesson-placements-1622939-1620853/

What is the link to your site?

hidden link
username: demo
password: charlie

#2117345

Hello and thank you for contacting Toolset support.

As you are building the map using blocks, you can set a default center for the map. This way, when no results are returned the map will have a default center. Check this screenshot hidden link

I hope this helps. Let me know if you have any questions.

#2117463
Screenshot 2021-07-17 at 16.22.16.png

Thanks for your reply!

I also happens when there are results returned.

Because when I filter on 'Drenthe' for instance (see screenshot), in View I see the results, but not on the map.

I tried to deactivate the options you showed in your screenshot, but then the Map shows Africa with and without filters.

I look forward to hear from you. Thank you!

#2117529

Can I log in to your website and check everything closely? Your next reply will be private to let you share credentials safely. ** Make a database backup before sharing credentials. **

#2117937

Thank you for the credentials. Unfortunately, I could not test them as I'll also need the HTTP Basic authentification credentials. Check this screenshot hidden link
Your next reply will be private to let you share those credentials too. Please double-check the provided credentials to make sure they will work.

#2118123

Thank you Charlotte, I was able to log in and check the map.

Adding a default center with the setting that I suggested does help to make the map always showing the Netherlands. I used the coordinates of Amsterdam as a test. However, there was still an issue with some results, and the markers did not appear.

First, I removed the existing addresses from the Toolset cache in Toolset->Settings->Maps(tab)->Cached data, but that did not help. I think that the Map Block's marker setting does not handle repeatable addresses well. I did not confirm it, but I came up with a workaround.

I added a Fields&Text block inside the view's loop and put a marker shortcode on it. I tried to reproduce the same content popup like the one you had in the Map Block marker. And it seems to work. I did not remove the marker settings from the Map yet, but I'll suggest that you remove it and rely on the Fields&Text's shortcode:

[wpv-map-marker map_id='map-2' marker_id='marker-3' marker_field='wpcf-adres-praktijk']
<b>[wpv-post-link]</b>
Wachttijd: [types field='wachttijd-in-weken' format='FIELD_VALUE'][/types] weken <br><br> 
<a href="[wpv-post-url]" class="button-coach">Bekijk coach</a>
[/wpv-map-marker]

Please let me know if I am missing something, or if it does not work as it should.