Skip Navigation

[Resolved] Map focus on marker inside loop not working

This thread is resolved. Here is a description of the problem and solution.

Problem: Subscriber users were not able to edit their own posts.

Solution: Make sure that the permissions are allowed on the post type and the used form in:

  • Toolset->Access control->Post Types
  • Toolset->Access control->Forms

Relevant Documentation:

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 4 replies, has 3 voices.

Last updated by nicholasM 3 months, 3 weeks ago.

Assigned support staff: Jamal.

Author
Posts
#1987819

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.

<p><a class="js-wpv-addon-maps-focus-map" href="#" data-map="locationmap" data-marker="mark69">vic<span class="tb-shortcode-placeholder"> </span><span id="tb-shortcode-mce-placement-fix5" class="tb-shortcode-placeholder"> </span><span id="tb-caret-placement-fix" class="tb-shortcode-placeholder"> </span></a></p>

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??

Is there any documentation that you are following?
https://toolset.com/documentation/programmer-reference/maps/maps-shortcodes/#map-focus-on-marker

#1988121

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

#1989991

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Please allow me to discuss this that if we suppose to support the same thing with Map Block and I'll get in touch with you as soon as possible.

#2004175

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

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.

#2007679

My issue is resolved now. Thank you!