I've set up a custom post type with an address custom field. I've got 3 test posts all with valid addresses.
Using views (after following the Toolset guide) I've created a view for the map, I'm attempting to display the custom post type as a marker for each post. When I put the map on my site, Google Maps only showing marker from 1 custom post.
The loop editor code is as follows:
[wpv-layout-start]
[wpv-items-found]
[wpv-map-render map_id="map-7" map_height="450px" cluster="on"][/wpv-map-render]
<!-- wpv-loop-start -->
<wpv-loop>
[wpv-map-marker map_id='map-7' marker_id='marker-16' marker_field='wpcf-partner-address']
<h4>[wpv-post-title]</h4><br>
<h6>[types field='partner-address'][/types]</h6><br>
<h6>Tel: [types field='partner-phone-number'][/types]</h6><br>
<h6>Website: [types field='partner-website'][/types]</h6><br>[/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]
Hello,
Two issues:
1) Each map marker should use an unique ID, for example, you can replace this line from:
[wpv-map-marker map_id='map-7' marker_id='marker-16' marker_field='wpcf-partner-address']
To:
[wpv-map-marker map_id='map-7' marker_id='marker-[wpv-post-id]' marker_field='wpcf-partner-address']
2) Dashboard-> Toolset-> Settings-> Maps
Please provide the second Google API key into box "2nd key for server-side requests"
More help:
https://toolset.com/documentation/user-guides/display-on-google-maps/creating-a-google-maps-api-key/