Problem:
A Google Map on a page is initially hidden in a closed accordion. When the accordion is expanded the map is not rendered.
Solution:
The Google Maps code that renders the map does not work if the map is hidden in a container with zero height. It is necessary to trigger a redraw of the map once the container has been expanded.
The following JS can force a re-draw of a map with id="map-1". How exactly this JS is added depends on the implementation of the accordions or tabs.
WPViews.view_addon_maps.reload_map('map-1');
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.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | - |
- | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | - |
Supporter timezone: Europe/London (GMT+00:00)
This topic contains 5 replies, has 2 voices.
Last updated by 6 years, 11 months ago.
Assisted by: Nigel.