Hi,
please use jquery ui tabs for toggling and put each map into a tab – because then on tabchange the map would be resized in order to be displayed properly.
best,
Robert
This toggle function is built into my theme.
To me, it works with short codes, no idea whether they are jquery or not.
I’m not at this moment worried about the size, the map just doesn’t show.
sorry, didn’t really mean resize but reload, meaning if you use jquery ui tabs the maps will show up properly. as far as I know there are several Jquery ui tabs plugins on ww.wp.xz.cn you could use…
I really did’t want to use another plugin to make this plugin work.
The toggles are built into my theme.
What do you think is causing this? I might be able to speak to the theme creator to have it adjusted.
Using another plugin is the only current way I can imagine if you want to show your maps like now.
There is a technical limitation that maps will not show properly if they are loaded all at once but than hidden via CSS as it is with your theme. When jquery ui tabs are used, certain actions are fired when a tab is switched which my plugin uses to properly display the map. As your theme uses a custom solution without actions/events fired on toggling, I am unfortunately not able to support this.
So even without the toggles, you can’t put more than one map on a page at any one time ?
no, if maps are not hidden by default via CSS, multiple maps on one page are of course possible
thanks a lot – will check if this code can be used in my plugin…
You seem to have had a lot of updates since this, any chance a fix for this might be included in the next update? (or have I missed something?)
Hi Charly,
I checked the jQuery slideToggle() function used in that plugin – unfortunately there are no events that are fired which I could use to reload the map, which would be needed if it is loaded on the current page but hidden. A more generic approach to that issue is not in sight yet, any developer feedback of how this could be done would be appreciated (related leaflet ticket at https://github.com/Leaflet/Leaflet/issues/2738)
best,
Robert
thank you for following up on this.