Home › Forums › Front-end Issues › Google Map infoWindow.close() › Reply To: Google Map infoWindow.close()
I was struggling with this as well, but it turns out you need to declare a global array at the top to push the infowindows into.
In case anyone’s interested:
At the top ( after (function($) { ) add var infoWindows = new Array(); , after which you can use the above infoWindows.push(infoWindow); and //close all part to push to and loop through the array.
Make sure to double check the upper/lower case W in infowindow/infoWindows.
Not sure if this is the most efficient way of doing this, but it works.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.