Multiple maps in tabs showing empty box maps

  • Kiko
  • Kiko's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
5 months 15 hours ago #11304 by Kiko
Kiko created the topic: Multiple maps in tabs showing empty box maps
Hi,

See:
www.parquenacionalsierraguadarrama.es/en...tes/hiking/94-routes

I have different maps in the same article (as pluging maps), but in different tabs. The tabs are created by means of regular labs tabs extension. The map on first tab is shown as expected, although in the other tabs there is only the "map box" without the map itself. When I refresh one tab (F5) the map is loaded, but then the other maps in different tabs are not shown. It seems that map not being able to handle maps being loaded in initially hidden elements. Note that in the first tab there are two maps in fact, so there is not a problem of multiple maps in the same page).

I have tried to change in configuration "Compatible Mode" and "Map Initialization Type" to different combinations, but it didn't work.

I know that this is a issue of two extensions working toghether, but I wonder if there is a solution from the ZhGooglemap part.

Best wishes.

Please Log in or Create an account to join the conversation.

More
5 months 14 hours ago #11307 by Dima
Dima replied the topic: Multiple maps in tabs showing empty box maps
Hi.
I think your problem caused the fact, that map on invisible tab is not correct displayed, because it's div width is 0 (or display:none style). In that case after tab is displayed, you have to inform map that bounds are changed.
I suggest try to display your map by iframe call, in this case tab will be displayed, after this map will be loaded. And in this case all dimensions of divs will be calculated correctly

Don't forget support my developments: post review in JED, donate ;)

Post your sites as examples into my directory
Zh GoogleMap: forum.zhuk.cc/index.php/forum/gm-user-s-sites
Zh YandexMap: forum.zhuk.cc/index.php/forum/ym-user-s-sites

Please Log in or Create an account to join the conversation.

Time to create page: 0.047 seconds

Donate


Go to top