Skip Navigation

[Resolved] Map is not displaying in View

This thread is resolved. Here is a description of the problem and solution.

Problem:

I put the post title and address in there just so I could see that something was happening.

On the page, the place where there should be a map is just blank. and got this JS error in my Chrome browser console window:
Uncaught TypeError: Cannot read property 'sort' of undefined

I'm able to display a map on the post single page just fine.

In my testing, I also disabled all plugins.

Solution:

the problem is in another view "Check This One Out Widget", ID: 129, please edit it, in section "Filter and Loop Output Integration Editor", add below codes:

[wpv-filter-meta-html]

And test again.

the shortcode [wpv-filter-meta-html] is for The entire Filter section of view.

Relevant Documentation:

This support ticket is created 6 years, 10 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/Hong_Kong (GMT+08:00)

This topic contains 5 replies, has 2 voices.

Last updated by Luo Yang 6 years, 10 months ago.

Assisted by: Luo Yang.

Author
Posts
#605552

I am trying to display multiple markers on a map using a View inserted into a page.

[wpv-layout-start]
	[wpv-items-found]
	[wpv-map-render map_id='map-listings'][/wpv-map-render]
	<!-- wpv-loop-start -->
		<wpv-loop>
          [wpv-map-marker map_id='map-listings' marker_id='marker-[wpv-post-id]' marker_field='wpcf-map-address'][/wpv-map-marker]
          [wpv-post-title]<br/>
          [types field='map-address'][/types]<br/>
          <hr/>
        </wpv-loop>
	<!-- wpv-loop-end -->
	[/wpv-items-found]
	[wpv-no-items-found]
		<strong>[wpml-string context="wpv-views"]No items found[/wpml-string]</strong>
	[/wpv-no-items-found]
[wpv-layout-end]

I put the post title and address in there just so I could see that something was happening.

On the page, the place where there should be a map is just blank.

I'm able to display a map on the post single page just fine.

In my testing, I also disabled all plugins.

My test page is here: hidden link

#605639

Dear Darry,

I tested the URL you mentioned above, and got this JS error in my Chrome browser console window:
Uncaught TypeError: Cannot read property 'sort' of undefined
in case there is any compatibility problem, please try this:
1) You are follow our document to setup the google map API key:
https://toolset.com/documentation/user-guides/display-on-google-maps/#api-key
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, I need to test and debug it in my localhost, thanks

#608773

Thanks for the details, I can download the file, will feedback if there is anything found

#608786

Here are what I found, the problem is in another view "Check This One Out Widget", ID: 129, please edit it, in section "Filter and Loop Output Integration Editor", add below codes:
[wpv-filter-meta-html]
And test again.

the shortcode [wpv-filter-meta-html] is for The entire Filter section of view.

#608967

That totally fixed it, thanks so much

#609150

You are welcome