Map inside a tab-pane does not load properly

hello,

I have a user dashboard with multiple tabs using wappler’s default Tabs with Nav. In one of the tab-pane-component is a map (using mapbox).

The issue is, if that tab-pane is not set as the initial active tab (check show and active), it does not load properly (only load partially) like this:

otherwise, it works completely fine and fills the entire card. What might be the issue here?

You may have to re-initialise the map upon a click event if I remember correctly?

This thread on Stack may help:

Or just search for re-initialise Google Map…

thanks for the help Dave!

I think that is similar to Teodor's solution (that I just found) and I managed to get it done by following it:

but I had to remove dmx.parse and change it to resize() instead of reflow() because it doesn't work for some reason.

1 Like

The solution you mention is for the masonry component, not for Google Maps.
For google maps you can use the tab shown dynamic event and use the available refresh option: