using css class js-wpv-addon-maps-reload-map <-- reloads the map but then prevents any of my bootstrap modals from firing ad I have to hard refresh the page.
if however I use the css class: js-wpv-addon-maps-restore-map <-- this works and and all modals work.
Is this expected behavior? or do I need to some something special?
thanks
Hi,
Thank you for contacting us and I'd be happy to assist.
From your message, I'll assume that the bootstrap modals are inside the map marker content.
If that is correct this is the expected behavior, as the "js-wpv-addon-maps-restore-map" class only reverts the map to its initial state while the "js-wpv-addon-maps-reload-map" reloads or re-initiates it, as a whole. As a result, any dynamic elements inside the map or map marker will need to re-initialize as well after the reload, or they won't fire/execute.
I hope this makes it more clear.
regards,
Waqar
Cool, that's ok... one more thing on that so I am clear...
using css class js-wpv-addon-maps-reload-map <-- this closes the marker (initial state before clicked).
using css class: js-wpv-addon-maps-restore-map <-- this keeps the marker open when you use it... is there a way to make it close the marker (this is the behavior I was hoping for with the first option).
Alternatively, is there a way you can click out of the map and it close, rather than using the close X in the top right each time?
thanks.
Thanks for writing back.
I've performed some test but no matter whether I use the "js-wpv-addon-maps-restore-map" class or the "js-wpv-addon-maps-reload-map" class, it doesn't stop the bootstrap modals from firing.
The reason they are not firing on your website could be that the code of your modal HTML seems to be inside the map marker shortcode ( [wpv-map-marker]...[/wpv-map-marker] ). Can you test this by moving the modal HTML out of the map marker shortcode?
I'm afraid, there is no direct Toolset function available to programmatically close all the map markers on click or on map restore. So, this will requires some custom script code from Google Maps API. For pointers around that you can consult community forums like https://stackoverflow.com/ or someone from our recommended contactor's list:
https://toolset.com/contractors/