SHARE
TWEET

Untitled

a guest Sep 17th, 2019 83 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4.   <title>BattleMap</title>
  5.   <meta charset="UTF-8">
  6.   <link rel="stylesheet" href="src/jquery-jvectormap-2.0.3.css" type="text/css" media="screen" />
  7.   <script src="src/jquery.js"></script>
  8.   <script src="src/jquery-jvectormap.js"></script>
  9.   <script src="src/jquery-jvectormap-world-mill.js"></script>
  10. </head>
  11. <body>
  12.   <div id="world-map" style="width: 1200px; height: 800px"></div>
  13.   <script type="module">
  14.     import markers from './battles.js'
  15.     $(function () {
  16.       $('#world-map').vectorMap({
  17.         map: 'world_mill',
  18.         markers,
  19.         onMarkerClick: function (event, index) {
  20.           alert(`
  21.             ${markers[index].name}\n
  22.             ${markers[index].date}\n
  23.             ${markers[index].abstract}\n
  24.             ${markers[index].weburl}\n
  25.             `
  26.           )
  27.         }
  28.       })
  29.     })
  30.   </script>
  31. </body>
  32. </html>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top