continents.html 5.5 KB
Newer Older
Michael Ollifarel Sagala committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <title>JQVMap - World Map</title>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">

    <link href="../dist/jqvmap.css" media="screen" rel="stylesheet" type="text/css"/>

    <script type="text/javascript" src="http://code.jquery.com/jquery-1.11.3.min.js"></script>
    <script type="text/javascript" src="../dist/jquery.vmap.js"></script>

    <script type="text/javascript" src="../dist/maps/continents/jquery.vmap.asia.js"></script>
    <script type="text/javascript" src="../dist/maps/continents/jquery.vmap.europe.js"></script>
    <script type="text/javascript" src="../dist/maps/continents/jquery.vmap.australia.js"></script>
    <script type="text/javascript" src="../dist/maps/continents/jquery.vmap.africa.js"></script>
    <script type="text/javascript" src="../dist/maps/continents/jquery.vmap.north-america.js"></script>
    <script type="text/javascript" src="../dist/maps/continents/jquery.vmap.south-america.js"></script>

    <script type="text/javascript" src="js/jquery.vmap.sampledata.js"></script>

    <script>
      jQuery(document).ready(function () {
        $('h2').each(function () {
          $(this).click(function () {
            $('.tab-selected').removeClass('tab-selected');
            $(this).addClass('tab-selected');
            $('.map').css('z-index', '0');
            $('#vmap-' + this.id).parent().css('z-index', '1');
          });
        });
        $('h2:first').addClass('tab-selected');
        $('.map:first').css('z-index', '1');

        jQuery('#vmap-asia').vectorMap({
          map: 'asia_en',
          backgroundColor: '#333333',
          color: '#ffffff',
          hoverOpacity: 0.7,
          selectedColor: '#666666',
          enableZoom: true,
          showTooltip: true,
          values: sample_data,
          scaleColors: ['#C8EEFF', '#006491'],
          normalizeFunction: 'polynomial'
        });
        jQuery('#vmap-europe').vectorMap({
          map: 'europe_en',
          backgroundColor: '#333333',
          color: '#ffffff',
          hoverOpacity: 0.7,
          selectedColor: '#666666',
          enableZoom: true,
          showTooltip: true,
          values: sample_data,
          scaleColors: ['#C8EEFF', '#006491'],
          normalizeFunction: 'polynomial'
        });
        jQuery('#vmap-australia').vectorMap({
          map: 'australia_en',
          backgroundColor: '#333333',
          color: '#ffffff',
          hoverOpacity: 0.7,
          selectedColor: '#666666',
          enableZoom: true,
          showTooltip: true,
          values: sample_data,
          scaleColors: ['#C8EEFF', '#006491'],
          normalizeFunction: 'polynomial'
        });
        jQuery('#vmap-africa').vectorMap({
          map: 'africa_en',
          backgroundColor: '#333333',
          color: '#ffffff',
          hoverOpacity: 0.7,
          selectedColor: '#666666',
          enableZoom: true,
          showTooltip: true,
          values: sample_data,
          scaleColors: ['#C8EEFF', '#006491'],
          normalizeFunction: 'polynomial'
        });
        jQuery('#vmap-northamerica').vectorMap({
          map: 'north-america_en',
          backgroundColor: '#333333',
          color: '#ffffff',
          hoverOpacity: 0.7,
          selectedColor: '#666666',
          enableZoom: true,
          showTooltip: true,
          values: sample_data,
          scaleColors: ['#C8EEFF', '#006491'],
          normalizeFunction: 'polynomial'
        });
        jQuery('#vmap-southamerica').vectorMap({
          map: 'south-america_en',
          backgroundColor: '#333333',
          color: '#ffffff',
          hoverOpacity: 0.7,
          selectedColor: '#666666',
          enableZoom: true,
          showTooltip: true,
          values: sample_data,
          scaleColors: ['#C8EEFF', '#006491'],
          normalizeFunction: 'polynomial'
        });
      });
    </script>
    <style>
      * {
        margin: 0;
        padding: 0;
      }

      h2 {
        background: none repeat scroll 0 0 #cccccc;
        border: 1px solid #aaaaaa;
        border-top-left-radius: 5px;
        border-top-right-radius: 5px;
        float: left;
        padding: 5px;
        font-size: 20px;
        font-weight: normal;
        cursor: pointer;
      }

      h2.tab-selected {
        background: #888888;
        border: 1px solid #000000;
      }

      .map {
        position: absolute;
        z-index: 0;
        left: 0;
        top: 35px;
      }
    </style>
  </head>
  <body>
    <h2 id="asia">Asia</h2>

    <div class="map">
      <div id="vmap-asia" style="width: 600px; height: 400px;"></div>
    </div>
    <h2 id="europe">Europe</h2>

    <div class="map">
      <div id="vmap-europe" style="width: 600px; height: 400px;"></div>
    </div>
    <h2 id="australia">Australia</h2>

    <div class="map">
      <div id="vmap-australia" style="width: 600px; height: 400px;"></div>
    </div>
    <h2 id="africa">Africa</h2>

    <div class="map">
      <div id="vmap-africa" style="width: 600px; height: 400px;"></div>
    </div>
    <h2 id="northamerica">North America</h2>

    <div class="map">
      <div id="vmap-northamerica" style="width: 600px; height: 400px;"></div>
    </div>
    <h2 id="southamerica">South America</h2>

    <div class="map">
      <div id="vmap-southamerica" style="width: 600px; height: 400px;"></div>
    </div>
  </body>
</html>