简体   繁体   中英

How to render JVectormap?

What am i doing wrong? I follwed the steps on Jvectormap website , installed jquery, downloaded and linked everything to the specific files but the map doesnt render for me. The map i used is "world-mill" and jvectormap-2.0.5.min.js

<!DOCTYPE html>
<html>
<head>
<title>jVectorMap demo</title>
<link
  rel="stylesheet"
  href="/node_modules/jquery/src/lib/jquery-jvectormap-2.0.5.css"
  type="text/css"
  media="screen"
/>
<script src="/node_modules/jquery/src/jquery.js"></script>
<script src="/node_modules/jquery/src/lib/jquery-jvectormap-2.0.5.min.js"></script>
<script src="/node_modules/jquery/src/lib/jquery-jvectormap-world-mill.js"></script>
<title>JVectorMap</title>
</head>
<body>
<div id="world-map" style="width: 600px; height: 400px"></div>
<script>
  $(function () {
    $('#world-map').vectorMap({
      map:'world_mill',
    });
  });
</script>
</body>
</html>

I got it working but using just the specific files needed, i downloaded jQuery manually from here instead of installing it using npm from the console inside vscode.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM