Skip Navigation

[Resolved] Map doesn't work (again)

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

This topic contains 11 replies, has 2 voices.

Last updated by rubenM-3 2 years ago.

Assisted by: Luo Yang.

Author
Posts
#2488969

Hi, I've got a page, "Search", with a map and a custom search. I asked some help with map a few days ago, and Luo solved it (Thanks!). Now it doesn't work again, I can't change it's configuration in block editor, and in frontend if I select a marker, it doesn't show the post data. In block editor console is showing some JS error,
thank you!

#2489233

Hello,

I can see the problem in your website, I see below JS error message when edit the "Search" page:
TypeError: Cannot read properties of undefined (reading 'map')

Then I tested it in a fresh WP installation:
Login URL:
hidden link
Test page admin side:
hidden link
Frontend:
hidden link

Both works fine, so there should be other compatibility issues in your website, you can try these:
1) Deactivate all other plugins, switch to WordPress default theme and test again.
2) If the problem is fixed, activate other plugins/theme one by one, try to locate the problem plugin/theme
3) If the problem persists, please provide a copy of your website in below private message box, I need to test and debug it in my localhost.
https://toolset.com/faq/provide-supporters-copy-site/

#2489289
#2490931

I am downloading the files, will update here if find anything

#2491837

Hi Luo, any ideas? I'd like to show the website tomorrow, and I've been trying to use a Shortcode, [wpv-map-render map_id="map-12" map_height="500px" cluster="on" cluster_min_size="3"][/wpv-map-render]. The map shows in page, but no markers and no centering: hidden link

Thank you

#2491847

Yes, you can display the markers with shortcode directly, for example, edit the post view "Llistat Ubicacions":
hidden link

In section "Loop item in Primera Vista", line 23, display the marker shortcode:
[wpv-map-marker map_id='map-12' marker_id='marker-12' marker_field='wpcf-adreca'][wpv-post-title][/wpv-map-marker]

Test it in frontend:
hidden link

It works fine too.

More help:
https://toolset.com/documentation/programmer-reference/maps/maps-shortcodes/#wpv-map-marker
Adds a marker on a map.

#2494275

Hi Luo,
still can't change map properties in Block Editor.

Thank you!

#2495841
map-block2.jpg

Map blocks requires WordPress blocks(Gutenberg) editor, but your website is using "Classic Editor" plugin, and break some WordPress settings.

Please try these in your website:
1) Backup your website first
2) Deactivate plugin "Classic Editor"
3) Install/activate Gutenberg plugin, you can download it here:
https://wordpress.org/plugins/gutenberg/
And test again
It works fine with your duplicator package in my localhost, see my screenshot map-block2.jpg

You can still edit the posts with classic editor by these:
Dashboard-> Toolset-> Post Types, find and edit one of post type, option "Editor", choose: Per post
When you edit those posts, you will be able to switch to classic editor.

#2498397

Hi Luo,
tomorrow I'll try this option. But a quick question, Divi Google Maps is not working. Did we disable it? If I need to create a simple Google Map, for contact's page, can I do it with Toolset?

#2498691

Yes, we disable the Divi map in your previous thread, since it conducts JS error.

And you can use Toolset plugin to setup simple Google Map easily, see our document:
https://toolset.com/course-lesson/displaying-a-simple-map/

#2501533

Hi Luo,
first, map is working in a block editor, with Gutenberg installed. Thank you.

About inserting a map in a Divi Page, with a Toolset map, I can't use your tutorial because it's based in Block Editor, and my contact's page is Divi. I try to insert a Toolset View, but I don't know how to just create a map. I just need a map with a marker. Can I create with code, like [wpv-map-render] and insert in a Divi Text Block?

Thank you!

#2505191

Sorry for the delay answer, I just come back from vacation.

You can use shortcodes to create maps, for example:

[wpv-map-render map_id="my-map" map_width="400px" map_height="200px" fitbounds="off" general_zoom="6" single_zoom="15" cluster="on"]
[wpv-map-marker map_id="my-map" marker_id="my-marker-1" marker_title="This is a marker" address="New York, NY, USA"]This is the content of the marker popup.[/wpv-map-marker]
#2505239

My issue is resolved now. Thank you!