jVectorMap renders too small

孤街醉人 提交于 2019-12-01 20:49:31

If your not including the jquery-jvectormap-2.0.1.css on your page you need to style the content generated by jVectorMap.

In your case adding the following to you styles should do the trick

.jvectormap-container {
    height:100%;
    width:100%;
}

You can look at the http://jvectormap.com/css/jquery-jvectormap-2.0.1.css to hopefully find all the styles you need.

You have to include jquery-jvectormap-2.0.4.css on page to solve this issue. Just check if you have misspelled file name or you may have missed to add this on page.

When you trigger vectorMap() on element that has parent value to display: none it will render as extra small. So solutions is to use visibility: hidden rather that display: none

You can run this code and check if map resize to normal state:

window.dispatchEvent(new Event('resize'));

This is not the answer, but may be helpful:

html, body, #mapa, #mapa_dos{ height: 100%; width: 100%; margin: 0; padding: 0; }

In the example that I'm handling, I have two maps with the id="mapa" and id="mapa_dos". The containers of the div are the html and body tags, so displays the maps in the entire screen.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!