I am trying to:
Display posts on a map within a View.
Link to a page where the issue can be seen: lien caché (site is in privacy mode, so please use username "flywheel", password "yielding-event" to view).
I expected to see: A map showing locations of selected posts, together with a grid showing post details below
Instead, I got: Map is blank, but the correct posts show in the grid below.
The View has a loop which lists the posts, with a [wpv-map-marker] element for each. The markers have map_id="map-2", which corresponds to the map_id="map-2" in the [wpv-map-render] shortcode above:
[wpv-layout-start]
[wpv-items-found]
<div class="google-maps parks-map-height">
[wpv-map-render map_id="map-2" cluster="on" cluster_grid_size="45" scrollwheel="off" marker_icon="/wp-content/uploads/2016/01/mps-google-marker.png" map_height="100%"]
</div>
<ul id="js-map-elements">
<!-- wpv-loop-start -->
<wpv-loop>
[wpv-map-marker map_id="map-2" marker_id="marker-[wpv-post-id]" marker_title="[wpv-post-title]" lat="[types field='latitude'][/types]" lon="[types field='longitude'][/types]"][wpv-post-link][/wpv-map-marker]
<div class="parks-third">
<li><div class="mp-park-img"><a href="[wpv-post-url]">[wpv-post-featured-image size="parks-thumb" attr="class=park-pic"]</a></div><h4 class="mp-park-name">[wpv-post-link]</h4>
<div class="mp-area">[wpv-post-taxonomy type="area" separator=", " format="text" show="name" order="asc"]</div>
<div class="mp-park-desc">[wpv-post-excerpt length="60"]</div>
<h5 class="goto"><a href="[wpv-post-url]">Go to park page "</a></h5>
</li>
</div>
</wpv-loop>
<!-- wpv-loop-end -->
</ul>
[/wpv-items-found]
[wpv-no-items-found]
<div class="mp-no-parks">[wpml-string context="wpv-views"]<strong>Sorry, no parks matched your search</strong>[/wpml-string]</div>
[/wpv-no-items-found]
[wpv-layout-end]
However, when the page is rendered, the map_id has changed (data-map="map-2-1"), so the markers are no longer being displayed on the map:
<div id="wpv-view-layout-1094-TCPID13" class="js-wpv-view-layout js-wpv-layout-responsive js-wpv-view-layout-1094-TCPID13" data-viewnumber="1094-TCPID13" data-pagination="{"id":"1094","base_permalink":"/explore-parks/?wpv_view_count=1094-TCPID13&wpv_paged=WPV_PAGE_NUM","query":"normal","type":"disabled","effect":"fade","duration":"500","speed":5,"pause_on_hover":"disabled","stop_rollover":"false","cache_pages":"enabled","preload_images":"enabled","preload_pages":"enabled","preload_reach":"1","spinner":"builtin","spinner_image":"<em><u>lien caché</u></em>","callback_next":"","manage_history":"enabled","has_controls_in_form":"disabled","infinite_tolerance":"0","max_pages":0,"page":1,"loop":{"type":"","name":"","data":[],"id":0}}" data-permalink="/explore-parks/?wpv_view_count=1094-TCPID13">
<div class="google-maps parks-map-height">
<div id="js-wpv-addon-maps-render-map-2-1" style="width:100%; height:100%;" class="wpv-addon-maps-render js-wpv-addon-maps-render js-wpv-addon-maps-render-map-2-1" data-map="map-2-1" data-generalzoom="5" data-generalcenterlat="0" data-generalcenterlon="0" data-fitbounds="on" data-singlezoom="14" data-singlecenter="on" data-maptype="roadmap" data-showlayerinterests="false" data-markericon="/wp-content/uploads/2016/01/mps-google-marker.png" data-markericonhover="" data-draggable="on" data-scrollwheel="off" data-doubleclickzoom="on" data-maptypecontrol="on" data-fullscreencontrol="off" data-zoomcontrol="on" data-streetviewcontrol="on" data-backgroundcolor="" data-cluster="on" data-clustergridsize="45" data-clustermaxzoom="" data-clusterclickzoom="on" data-clusterminsize="2" data-stylejson="//mps2.flywheelsites.com/wp-content/plugins/toolset-maps/resources/json/Standard.json" data-spiderfy="off" data-streetview="off" data-markerid="" data-location="" data-lat="0" data-long="0" data-heading="" data-pitch=""></div>
</div>
<ul id="js-map-elements">
<div style="display:none" class="wpv-addon-maps-marker js-wpv-addon-maps-marker js-wpv-addon-maps-marker-marker-8114-1 js-wpv-addon-maps-markerfor-map-2" data-marker="marker-8114-1" data-markertitle="Abbeyview Park, Dunfermline" data-markerfor="map-2" data-markerlat="56.066505" data-markerlon="-3.422373" data-markericon="" data-markericonhover="" data-streetview="no"><a href="<em><u>lien caché</u></em>">Abbeyview Park, Dunfermline</a></div>
<div class="parks-third">
<li><div class="mp-park-img"><a href="<em><u>lien caché</u></em>"><img width="235" height="150" src="<em><u>lien caché</u></em>" class="attachment-parks-thumb size-parks-thumb wp-post-image" alt="" /></a></div><h4 class="mp-park-name"><a href="<em><u>lien caché</u></em>">Abbeyview Park, Dunfermline</a></h4>
<div class="mp-area">Fife</div>
<div class="mp-park-desc"><p>Extensive, unusually shaped local park, Abbeyview Park is lo …</p>
</div>
<h5 class="goto"><a href="<em><u>lien caché</u></em>">Go to park page "</a></h5>
</li>
</div>
... etc.
This View was rendering correctly until recently, so I wondered if the latest plugin updates could have caused this. However reverting to the previous versions of Maps, Views and Types doesn't solve the problem. Other maps on the site (eg on the home page lien caché) are working as expected.
I'd be glad if you could take a look at this for me. Can provide access to the site if required (this is a copy of the live site, so no problem to make changes.)
Many thanks,
Chris