Title: Using toggle for multiple maps on apage
Last modified: August 21, 2016

---

# Using toggle for multiple maps on apage

 *  [hkcharlie](https://wordpress.org/support/users/hkcharlie/)
 * (@hkcharlie)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/using-toggle-for-multiple-maps-on-apage/)
 * I’m using a toggle function to put multiple maps on one page and it doesn’t seem
   to be working, I don’t know why.
 * [http://thepeoplesgame.net/pitches](http://thepeoplesgame.net/pitches)
 * [https://wordpress.org/plugins/leaflet-maps-marker/](https://wordpress.org/plugins/leaflet-maps-marker/)

Viewing 13 replies - 1 through 13 (of 13 total)

 *  Plugin Author [Robert Seyfriedsberger](https://wordpress.org/support/users/harmr/)
 * (@harmr)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/using-toggle-for-multiple-maps-on-apage/#post-4899137)
 * 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
 *  Thread Starter [hkcharlie](https://wordpress.org/support/users/hkcharlie/)
 * (@hkcharlie)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/using-toggle-for-multiple-maps-on-apage/#post-4899184)
 * 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.
 *  Plugin Author [Robert Seyfriedsberger](https://wordpress.org/support/users/harmr/)
 * (@harmr)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/using-toggle-for-multiple-maps-on-apage/#post-4899185)
 * 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 wordpress.org you could use…
 *  Thread Starter [hkcharlie](https://wordpress.org/support/users/hkcharlie/)
 * (@hkcharlie)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/using-toggle-for-multiple-maps-on-apage/#post-4899188)
 * 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.
 *  Plugin Author [Robert Seyfriedsberger](https://wordpress.org/support/users/harmr/)
 * (@harmr)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/using-toggle-for-multiple-maps-on-apage/#post-4899191)
 * 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.
 *  Thread Starter [hkcharlie](https://wordpress.org/support/users/hkcharlie/)
 * (@hkcharlie)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/using-toggle-for-multiple-maps-on-apage/#post-4899192)
 * So even without the toggles, you can’t put more than one map on a page at any
   one time ?
 *  Plugin Author [Robert Seyfriedsberger](https://wordpress.org/support/users/harmr/)
 * (@harmr)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/using-toggle-for-multiple-maps-on-apage/#post-4899193)
 * no, if maps are not hidden by default via CSS, multiple maps on one page are 
   of course possible
 *  Thread Starter [hkcharlie](https://wordpress.org/support/users/hkcharlie/)
 * (@hkcharlie)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/using-toggle-for-multiple-maps-on-apage/#post-4899237)
 * the designer of my theme sent me this, I thought I would shhare it :
 * [http://stackoverflow.com/questions/7512100/google-map-problem-when-hide-and-then-toggle](http://stackoverflow.com/questions/7512100/google-map-problem-when-hide-and-then-toggle)
 *  Plugin Author [Robert Seyfriedsberger](https://wordpress.org/support/users/harmr/)
 * (@harmr)
 * [12 years ago](https://wordpress.org/support/topic/using-toggle-for-multiple-maps-on-apage/#post-4899248)
 * thanks a lot – will check if this code can be used in my plugin…
 *  Thread Starter [hkcharlie](https://wordpress.org/support/users/hkcharlie/)
 * (@hkcharlie)
 * [12 years ago](https://wordpress.org/support/topic/using-toggle-for-multiple-maps-on-apage/#post-4899373)
 * I tried this : [http://wordpress.org/plugins/jquery-collapse-o-matic/](http://wordpress.org/plugins/jquery-collapse-o-matic/)
 * it didn’t work.
 *  Thread Starter [hkcharlie](https://wordpress.org/support/users/hkcharlie/)
 * (@hkcharlie)
 * [11 years, 12 months ago](https://wordpress.org/support/topic/using-toggle-for-multiple-maps-on-apage/#post-4899391)
 * 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?)
 *  Plugin Author [Robert Seyfriedsberger](https://wordpress.org/support/users/harmr/)
 * (@harmr)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/using-toggle-for-multiple-maps-on-apage/#post-4899392)
 * 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](https://github.com/Leaflet/Leaflet/issues/2738))
   best, Robert
 *  Thread Starter [hkcharlie](https://wordpress.org/support/users/hkcharlie/)
 * (@hkcharlie)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/using-toggle-for-multiple-maps-on-apage/#post-4899393)
 * thank you for following up on this.

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘Using toggle for multiple maps on apage’ is closed to new replies.

 * ![](https://ps.w.org/leaflet-maps-marker/assets/icon.svg?rev=970936)
 * [Leaflet Maps Marker (Google Maps, OpenStreetMap, Bing Maps)](https://wordpress.org/plugins/leaflet-maps-marker/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/leaflet-maps-marker/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/leaflet-maps-marker/)
 * [Active Topics](https://wordpress.org/support/plugin/leaflet-maps-marker/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/leaflet-maps-marker/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/leaflet-maps-marker/reviews/)

 * 13 replies
 * 2 participants
 * Last reply from: [hkcharlie](https://wordpress.org/support/users/hkcharlie/)
 * Last activity: [11 years, 11 months ago](https://wordpress.org/support/topic/using-toggle-for-multiple-maps-on-apage/#post-4899393)
 * Status: not resolved