Jvectormap very small on div change

前端 未结 5 513
抹茶落季
抹茶落季 2021-02-09 01:54

I have two divs, one with the world map and one with the US map. When the USA is clicked on the world map I want to hide that div and bring the US map into view.

This wo

5条回答
  •  一生所求
    2021-02-09 02:34

    I was having the same issue with jVectorMap display sizing and found a way to get them to display properly.

    The problem is when you create your map object. For it to display properly, the vectorMap object must be visible when you create it. That being said, when you put them in tabs, you should:

    1. Click first tab.
    2. Create first map.
    3. Click Second tab.
    4. Create Second map.. ..
      You can eventually click the first tab again so it's the active one on the page load.

    Hope this helps anyone having the same issue.

提交回复
热议问题