This is 1 solution for example data of the problem. When you click on "Tab Map" the event resize is triggered. This will fix our issue. If "resize" isn't working for you - you are doing something wrong. You trigger it too soon or/and you can't access the map object.