Hello! Let me try to answer your questions below, I'll start with the latest one:
i thought toolset maps was capable of displaying different address fields on a map > ?
Yes, Toolset is capable of that, but it needs to pull the address information. If we are on a content template, the information is available on the current post. If we are on a view, the information is available on each post in the loop.
To display all markers in the map, we'll need to pull that information for the database, either in the content template or in a view.
all the info is on the page all ready it ant be that hard to drag in the address field to that map surely ?
Indeed, the location of the club can be pulled inside the content template from the club custom fields. But the information of the "Previous trials" needs to be pulled from the view.
i dont want to create a new view as i will need to make a relationship between clubs and venues in toolset , therefore adding info manually ?
Actually we must because that view will help us pull the address information from the previous trials.
But I think that the relationship is already there, otherwise, how are the previous trials pulled.
I run a small test on my local setup, where I try to do similar things, pull one address from the current post, and pull other addresses from a view, and I was able to have all markers in one map. It consists of:
- Created a content template to display the post(similar to club), this content template contains a map and a marker.
[wpv-map-render map_id="city-map"][/wpv-map-render]
[wpv-map-marker map_id='city-map' marker_id='marker-[wpv-post-id]' marker_field='wpcf-location'][/wpv-map-marker]
Note, how I used the same map_id.
- Created a view that will pull the related posts location data(similar to previous trials). I only put the marker on the loop without adding a map:
[wpv-layout-start]
[wpv-items-found]
<!-- wpv-loop-start -->
<wpv-loop>
[wpv-map-marker map_id='city-map' marker_id='marker-[wpv-post-id]' marker_field='wpcf-location'][/wpv-map-marker]
</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]
Note how it uses the same map_id as before.
- Added this view inside the first content template:
[wpv-map-render map_id="city-map"][/wpv-map-render]
[wpv-map-marker map_id='city-map' marker_id='marker-[wpv-post-id]' marker_field='wpcf-location'][/wpv-map-marker]
[wpv-view name="places-markers"] <!-- <== Adding the view inside the content template -->
The result is one map containing the content template marker(club marker) and the related posts markers(previous trials)
I hope this helps. Let me know if you have any doubts, or if you still need assistance on this, I'll log in to your website and double-check everything.