- Posts: 1
- Thank you received: 0
Multiple maps in tabs showing empty box maps
- Kiko
- Topic Author
- Offline
- New Member
Less
More
7 years 3 months ago #11304
by Kiko
Multiple maps in tabs showing empty box maps was created by Kiko
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.
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.
- Dima
- Offline
- Platinum Member
7 years 3 months ago #11307
by Dima
Don't forget support my developments: post review in JED , donate , help with translation
Replied by Dima on 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
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 , help with translation
Please Log in or Create an account to join the conversation.
Time to create page: 0.201 seconds