Skip Navigation

[Résolu] reload map disables bootstrap modal js-wpv-addon-maps-reload-map

This support ticket is created Il y a 3 années et 5 mois. There's a good chance that you are reading advice that it now obsolete.

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.

Aucun de nos assistants n'est disponible aujourd'hui sur le forum Jeu d'outils. Veuillez créer un ticket, et nous nous le traiterons dès notre prochaine connexion. Merci de votre compréhension.

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/Karachi (GMT+05:00)

Ce sujet contient 3 réponses, a 2 voix.

Dernière mise à jour par Waqar Il y a 3 années et 5 mois.

Assisté par: Waqar.

Auteur
Publications
#2095177

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

#2095413

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

#2095559

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.

#2097925

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/