Map does not load when plugin is called in other module (tab)

More
4 years 9 months ago #13092 by Gnop
Hi,

I would like to display a map in a tabbed module.

When I call the plugin in another module, for instance in a moule that displays tabs, then the map is not loaded (only partially, completely zoomed out, and unable to navigate in it).
When I call the plugin in a normal article, it works like it should.

I tried several options for Map Initialization Type: only the onload setting displays the (faulty) map. domready and jQueryReady display nothing at all, only wihite space.
I cannot edit the module's settings, it is a pretty standard tab module. Other tab modules show the same behaviour.

Compatible Mode does also not affect behaviour

Any help would be much appreciated!

Thanks, and Zh-component is one of the best Joomla extension around! :-)

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

More
4 years 9 months ago - 4 years 9 months ago #13093 by Dima
Hi.
It can be if map is not on first active tab.

In my docs read
wiki.zhuk.cc/index.php/Zh_OpenStreetMap_Description#Override

About "Invalidate Map" parameters.

Ie you need to create map override.
And set selector to find your tab. And invalidation type.
You can set it to One time. Because always in case you play with browser size after first initialization.
Ie (case for always)
- click on tab, see correct map
- click to other tab
- change browser size (maximize)
- click on tab where map
In this case map will be with incorrect size.
I thin it is rare case and therefore as for me I like "One time"

Don't forget support my developments: post review in JED , donate , help with translation ;)
Last edit: 4 years 9 months ago by Dima.

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

More
4 years 9 months ago #13094 by Dima
After creation Override just assign it to map in map details on advanced options tab.

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.

More
4 years 9 months ago #13095 by Gnop
Great, that looks like the solution, but what value to enter in Invalidate Map Size Container Selector? There are so many possibilities? I tried li.uk-active but that fails...
Attachments:

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

More
4 years 9 months ago - 4 years 9 months ago #13096 by Dima
As you can see.
You have ul element for whole tab container.
And li elements for tabs.

As you can see, li elements hasn't any id, therefore we need select not only by selector.

You should set
Invalidate Map Size Container Selector: #wk-8da
Invalidate Map Size Container Index: 1

It means you will find ul tag by id and second tab (0-first) will be checked

Don't forget support my developments: post review in JED , donate , help with translation ;)
Last edit: 4 years 9 months ago by Dima.

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

More
4 years 9 months ago #13097 by Gnop
Hmmm that is strange... after each page refresh, the ul element id changes: it was wk-8da, then wk-124, then wk-d21..... so each refresh it is wk-***.
Can we make it check on second tab on ANY ul element with id wk***?

By the way, it is YooTheme's WidgetKit Switcher's module (tabs), in case it is of any importance.

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

Time to create page: 0.226 seconds
Powered by Kunena Forum