Skip Navigation

[Resolved] Static map marker on page in loop with Ajax filters

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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 1 reply, has 2 voices.

Last updated by Luo Yang 1 year, 7 months ago.

Assisted by: Luo Yang.

Author
Posts
#2597833

I want to render a map with markers with Ajax filters for taxonomy in a custom post type called Locations. I want a marker for the address field for the current page to be generated on the map. And I want other markers to be generated in a loop with query related to the same taxonomy filtered front end with Ajax filters with manual regeration when the filter content changes. I can place the static marker by placing the map marker shortcode outside the loop on an associated map rendered on the same page. And the markers in the loop are generated when the page loads on the same map. But the Ajax checkboxes are ineffective to change the markers in the loop being generated on the map. I note that a grid being generated on the same page does correctly change when the filters change. But not the markers on the same map. I would prefer not to reinvent the wheel. Can you provide a method for accomplishing this goal?

#2598411

Hello,

Where do you put the map shortcode [wpv-map ...]?

Since you are using AJAX search, you can put the map shortcode and the static marker shortcode inside section "Loop Editor"
within shortcodes [wpv-layout-start] ... [wpv-layout-end]

So after the AJAX search, it will reder the map and markers again.