Tell us what you are trying to do?
Use the Map focus on marker inside a view loop of posts
I have a map using the markers of a view, I gave my map an ID of locationmap . for the Markers I selected "View Block" as the source and I gave the marker an ID of mark[wpv-post-id] then in my loop I'm using this:
<button class="js-wpv-addon-maps-focus-map" data-map="locationmap" data-marker="mark[wpv-post-id]">Focus On [wpv-post-id]</button>
I have also tried to manually trigger one of these outside of my view like so with no luck.
I can't seam to inspect the marker ID so maybe I can't use [wpv-post-id] inside the markerID?? not sure what I am missing or doing wrong here, If I manually add a marker to my map with an ID then I can get the focus to work. There should be a way to get the focus to work when using a loop for your markers right??
I rebuilt this using the classic views UX and it works fine, only when trying to do it in the block editor do I run into issues. So I guess this can just be marked resloved unless you want to check this and forward to the developers if you can confirm that it is a bug
Hello! As Minesh is on vacation, I wanted to let you know that the developers are aware of this limitation in the Map block and they will be fixing it in an upcoming release. Until then, we recommend using the legacy editor for this use case. We'll update you about this as soon as we have it published.