Skip Navigation

[Resolved] Markers showing up as seperate maps not one map with multiple markers

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

Problem: I created a View that includes a Map and several Markers, but instead of all the Markers showing on one Map they are all showing on separate Maps. I want one Map with all the Markers.

Solution: Make sure the wpv-render-map shortcode is not placed in between the wpv-loop tags in the Loop Output editor.

Relevant Documentation:
https://toolset.com/documentation/user-guides/display-on-google-maps/#displaying-markers

This support ticket is created 6 years, 7 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 3 replies, has 2 voices.

Last updated by Christian Cox 6 years, 7 months ago.

Assisted by: Christian Cox.

Author
Posts
#729432

Hello,

We are currently working on creating a map with multiple markers. We created the view as per the instructions in the wiki but once the view is embedded within the page, each marker appears as a separate map instead of the same map with multiple markers. Can you please advise why this would be the case?

Thanks in advance

#730449

Most likely the problem is the map shortcode is placed inside the same wpv-loop tags as the marker shortcode. This results in multiple maps being rendered on the page. Instead, move the map shortcode just above the wpv-loop tags, or completely outside the View. If this does not resolve the problem, please copy + paste the code from your View's Loop Output editor here for me to review.

#730966

Hello Christian,

Here is the code to verify.

[wpv-layout-start]
[wpv-items-found]
<!-- wpv-loop-start -->
<wpv-loop>
[wpv-map-render map_id="map-4" map_width="100%" map_height="800" cluster="on" spiderfy="on" cluster_min_size="2" cluster_grid_size="60"][/wpv-map-render]
[wpv-map-marker map_id="map-4" marker_id="marker-[wpv-post-id]" marker_field="wpcf-frp-address"][/wpv-map-marker]
</wpv-loop>

<!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-no-items-found]
[wpml-string context="wpv-views"]No items found[/wpml-string]
[/wpv-no-items-found]
[wpv-layout-end]

#734206

Okay thanks, as I suspected the wpv-map-render shortcode is inside the wpv-loop tags. You should move the wpv-map-render shortcode to be outside of the wpv-loop tags. Anything inside the wpv-loop tags will be repeated for each result in the View.