Skip Navigation

[Assigned] Map markers not displaying on site

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.

This topic contains 3 replies, has 1 voice.

Last updated by derekD-2 18 hours, 25 minutes ago.

Assisted by: Christopher Amirian.

Author
Posts
#2847526
View Settings.png

Tell us what you are trying to do?
I have created a map view that looks at the Taxonomy of "Countries". Each country in the taxonomy has a custom Location field with the country geocoded. The intent is for each unique country within my content type to have a marker, and eventually each marker will link to a filtered page based on the taxonomy slug.

My view looks like the following:

[wpv-layout-start]
[wpv-items-found]
<!-- wpv-loop-start -->
[wpv-map-render map_id="countries-map" map_height="800px" map_width="100%"]
<wpv-loop>
[wpv-map-marker map_id="countries-map" marker_id="[wpv-taxonomy-slug]" marker_field="wpcf-country-address"]
</wpv-loop>
[/wpv-map-render]
<!-- wpv-loop-end -->
[/wpv-items-found]

[wpv-no-items-found]
No items found
[/wpv-no-items-found]
[wpv-layout-end]

----

I can output the country-address field as plain text and all looks correct there... the map simply wont create markers. No JS errors in the browser console. MySQL version 5.7.44. All Toolset plugins are up to date. Google Maps API is reporting as connected properly (and I have taken all domain restircitions off to ensure this). A test map on a new page with this pasted in an HTML block displays the same issue (no markers):

[wpv-map-render map_id="test-map" map_height="400px" map_width="100%"]
[wpv-map-marker map_id="test-map" marker_id="debug-marker" marker_address="New York, USA"]
[/wpv-map-render]

How can I get Maps to display markers?

#2847534

Christopher Amirian
Supporter

Languages: English (English )

Hi welcome to Toolset support. Would you please check the points below?

1. Rebuild Toolset’s address cache

Go to Toolset → Settings → Maps → Cached data

Click Clear stored cached entries

Then click Check for missing cache entries
This forces Toolset to (re)cache coordinates used by location/address fields and markers.

Please check this documenation:
https://toolset.com/course-lesson/data-caching-for-maps-addresses/

2. Fix the marker_field for a taxonomy term “Location” field

In a Taxonomy View, marker_field must point to the term field slug/meta key exactly as Toolset expects.

Edit the View → in the marker shortcode, click Fields and Views and insert the Location field (so you don’t guess the key), then use the same field slug/key in marker_field.

3. Minimal working test inside a View (don’t use an HTML block)

Create a quick Taxonomy View with 1 term and use only:

[wpv-map-render map_id="test-map" map_height="400px" map_width="100%"]
<wpv-loop>
[wpv-map-marker map_id="test-map" marker_id="[wpv-taxonomy-term-id]" marker_address="New York, USA"]
</wpv-loop>
[/wpv-map-render]

If this work, your issue is the term field key / cache.

5. If the issue persists, try a conflict check:

- IMPORTANT STEP! Create a backup of your website. Or better approach will be to test this on a copy/staging version of the website to avoid any disruption of a live website.
- Switch to the default theme such as "TwentyTwenty" by going to "WordPress Dashboard > Appearance > themes".
- Go to "WordPress Dashboard > Plugins" and deactivate all plugins except:
. Toolset Block/Views
. Toolset types
. Toolset Maps
- Check if you can still recreate the issue.
- If not, re-activate your plugins one by one and check the issue each time to find out the plugin that causes the problem.

Thanks.

#2847546
view block.jpg

Thanks Christopher,

I have done everything you've mentioned (cleared and refreshed map cache data, doublechecked Location field slug, created minimal map view test). The issue persisted.

I then duplicated the site, switched theme to twenty twenty five, disabled all plugins except Toolset blocks, types, maps, and the issue still persists. It seems that there are no conflicts, Maps just refuse to show marker data.

I was placing the map view on my page using a shortcode, and went to place it using the Toolset Views Block which oddly does not show the Taxonomy Views. Space is reserved in the dropdown, but the views do not show, and cannot be placed on the page. Image attached. An issue with the plugin itself, or how I configured the view?

Thanks!

#2847645

Christopher Amirian
Supporter

Languages: English (English )

Hi,

Thank you for testing that. As you mentioned, you have a copy/staging website that can be tested without the fear of breaking the website. I'd appreciate it if you could give the login information for that website by setting the next reply as private.

Please create a new view there and try to add the map markers and give me the name of the view and I will check.

Thanks.