Hi
I cannot seem to center the map on a locations pin when clicking the link in the post grid item. I've already done this and I checked other posts on the forum too and it seems that it should work but there must be an error somewhere in my code. I use legacy views.
This is the page link: hidden link
This is the map code:
[wpv-map-render map_id="map-playgrounds" map_height="530" cluster="on" spiderfy="on"][/wpv-map-render]
This is the view loop:
<wpv-loop wrap="3" pad="true">
[wpv-item index=1]
<div class="row ">
<div class="col-md-4">[wpv-post-body view_template="loop-item-in-playgorunds-grid-view"]</div>
[wpv-map-marker map_id="map-playgrounds" marker_id="marker-[wpv-post-id]" marker_title="[wpv-post-title]" marker_field="wpcf-map-location"][wpv-post-featured-image]<br>[wpv-post-link][/wpv-map-marker]
[wpv-item index=other]
<div class="col-md-4">[wpv-post-body view_template="loop-item-in-playgorunds-grid-view"]</div>
[wpv-map-marker map_id="map-playgrounds" marker_id="marker-[wpv-post-id]" marker_title="[wpv-post-title]" marker_field="wpcf-map-location"][wpv-post-featured-image]<br>[wpv-post-link][/wpv-map-marker]
[wpv-item index=3]
<div class="col-md-4">[wpv-post-body view_template="loop-item-in-playgorunds-grid-view"]</div>
[wpv-map-marker map_id="map-playgrounds" marker_id="marker-[wpv-post-id]" marker_title="[wpv-post-title]" marker_field="wpcf-map-location"][wpv-post-featured-image]<br>[wpv-post-link][/wpv-map-marker]
</div>
[wpv-item index=pad]
<div class="col-md-4"></div>
[wpv-item index=pad-last]
<div class="col-md-4"></div>
</div>
</wpv-loop>
And this is the loop item template:
<article class="grid-item">
<a href="[wpv-post-url]" class="entry-featured-image-url">
[wpv-post-featured-image size="custom" width="330" height="220" crop="true"]
</a>
<div class="grid-item-info">
<h4 class="item-title">[wpv-post-link]</h4>
<div class="item-excerpt">[wpv-post-excerpt]<br>
<a href="#" class="js-wpv-addon-maps-focus-map js-toolset-maps-hover-map-map-playgrounds-marker-marker-[wpv-post-id] js-toolset-maps-open-infowindow-map-map-playgrounds-marker-marker-[wpv-post-id]" data-map="map-playgrounds" data-marker="marker-[wpv-post-id]">[wpml-conditional lang="ro"]Arată pe hartă[/wpml-conditional][wpml-conditional lang="hu"]Mutasd a térképen[/wpml-conditional][wpml-conditional lang="en"]Show on map[/wpml-conditional]</a></div>
</div>
</article>
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Jozsef,
Thank you for getting in touch.
Would you mind allowing me to have admin access to the website so that I can have a more detailed look at this for you ?
Based on what I see in your code this should be working as intended.
I've enabled the private fields for your next response.
Thanks,
Shane
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Joszef,
Thank you for the credentials.
I managed to take a look at this one for you and did a simple test to re-add the map outside of the elementor builder. What I found is that when the map is added directly to the view then the focus on marker button works. This means that there is some interference between elementor and the normal functions of our map.
My advice is that you should add the map shortcode to the view itself outside of the wpv-loop tags in order to retain the ability to focus on your markers.
Please let me know if this helps.
Thanks,
Shane
Your solution works perfectly, thank you Shane!
My issue is resolved now. Thank you!