I am trying to use jVectorMap in an application and I'm receiving this error.
The example shown on their website says that all you have to do is put, $('#map').vectorMap({map: 'world_mill_en'});
on your page.
Well, I have both a div with an id of map as well as this script loaded, and I am getting this error. What is ? I'm guessing it has something to do with SVG or some setting that isn't being set (like height or width?)
Here's my use of the script:
<script>
$('#map').vectorMap({map: 'world_mill_en'});
</script>
And my div:
<div id="map"></div>
How do I set the height/width of the div? Or do I set this value in vectormap, or is it something else entirely?
Here is how my header scripts are organized:
<script src="js/jquery-1.11.2/jquery-1.11.2.min.js"></script>
<script src="js/jquery.mobile-1.4.5/jquery.mobile-1.4.5.min.js"></script>
<script src="jvectormap/jquery-jvectormap-2.0.2.min.js"></script>
<link rel="stylesheet" href="jvectormap/jquery-jvectormap-2.0.2.css" />
<script src="jvectormap/jquery-jvectormap-world-mill-en.js"></script>
#map {width:100px;height:100px;}
or style attributestyle="width:100px;height:100px;"
– Urana<body>
. (And that child was a regular <h1> element which had no width/height explicitly set. Later jvectormap tries to scale this element and as it doesn't have explicit size set, it fails with sizes of 0,0 – Lumumba