Skip Navigation

[Resolved] Listings w/ Multiple Addresses not appearing on Map View

This support ticket is created 5 years, 2 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 2 replies, has 2 voices.

Last updated by Christian Cox 5 years, 2 months ago.

Assisted by: Christian Cox.

Author
Posts
#1369173
1368307-screencapture_findtmstherapy_co_clinic_anew_era_tms_2019_10_23_18_40_36.png

Similarily... I have the map/marker working on my clinic profile pages that have 1 location ... but it is not working on the clinic that has multiple locations.

#1369191

Hello again, is it possible for me to get a wp-admin login for this site? I think it will help speed up the investigation if I can quickly see how things are configured.

#1369441
query-filter.png
content-selection.png
new-view-popup.png

Okay the Clinic Address custom field is inside the Clinic Info RFG. There can be more than one, so you must use a View. Edit this Content Template:
hidden link

You should not use the wpv-map-marker shortcode here, because it will only display one marker:

{!{wpv-map-render map_id="map-3" marker_icon="//findtmstherapy.co/wp-content/uploads/2019/10/FindTMS_icon_32px.png"}!}{!{/wpv-map-render}!}{!{wpv-map-marker map_id='map-3' marker_id='marker-4' marker_field='wpcf-clinic-address'}!}{!{/wpv-map-marker}!}

Instead, create a View of the RFG to loop over all the Clinic Infos and display a marker for each row in the RFG. Here are the steps you can try:
- Create a new View and choose "Display all results" in the popup (see new-view-popup.png).
- In the Content Selection area, select Clinic Info RFG. (see content-selection.png)
- In the Query Filter section, add a new "Post Relationship or repeatable field group owner" filter, and choose the Clinic Info relationship. The relationship should be based on the post where the View is shown (see query-filter.png).
- In the Loop Output editor panel, click "Skip wizard".
- Copy and paste this Map Marker shortcode inside the wpv-loop tags:

{!{wpv-map-marker map_id='map-3' marker_id='marker-3-[wpv-post-id]' marker_field='wpcf-clinic-address'}!}{!{/wpv-map-marker}!}

- Notice in the map marker shortcode I changed the marker_id to include the map ID (number 3) and also the wpv-post-id shortcode. Now the marker ID will always be unique, and it will not cause problems if you have more than one map on the same page.
- Insert the new View in the "Content template for Clinics" Content Template just after the wpv-map-render shortcode for map-3.