continents.html 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  4. <head>
  5. <title>JQVMap - World Map</title>
  6. <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  7. <link href="../dist/jqvmap.css" media="screen" rel="stylesheet" type="text/css"/>
  8. <script type="text/javascript" src="http://code.jquery.com/jquery-1.11.3.min.js"></script>
  9. <script type="text/javascript" src="../dist/jquery.vmap.js"></script>
  10. <script type="text/javascript" src="../dist/maps/continents/jquery.vmap.asia.js"></script>
  11. <script type="text/javascript" src="../dist/maps/continents/jquery.vmap.europe.js"></script>
  12. <script type="text/javascript" src="../dist/maps/continents/jquery.vmap.australia.js"></script>
  13. <script type="text/javascript" src="../dist/maps/continents/jquery.vmap.africa.js"></script>
  14. <script type="text/javascript" src="../dist/maps/continents/jquery.vmap.north-america.js"></script>
  15. <script type="text/javascript" src="../dist/maps/continents/jquery.vmap.south-america.js"></script>
  16. <script type="text/javascript" src="js/jquery.vmap.sampledata.js"></script>
  17. <script>
  18. jQuery(document).ready(function () {
  19. $('h2').each(function () {
  20. $(this).click(function () {
  21. $('.tab-selected').removeClass('tab-selected');
  22. $(this).addClass('tab-selected');
  23. $('.map').css('z-index', '0');
  24. $('#vmap-' + this.id).parent().css('z-index', '1');
  25. });
  26. });
  27. $('h2:first').addClass('tab-selected');
  28. $('.map:first').css('z-index', '1');
  29. jQuery('#vmap-asia').vectorMap({
  30. map: 'asia_en',
  31. backgroundColor: '#333333',
  32. color: '#ffffff',
  33. hoverOpacity: 0.7,
  34. selectedColor: '#666666',
  35. enableZoom: true,
  36. showTooltip: true,
  37. values: sample_data,
  38. scaleColors: ['#C8EEFF', '#006491'],
  39. normalizeFunction: 'polynomial'
  40. });
  41. jQuery('#vmap-europe').vectorMap({
  42. map: 'europe_en',
  43. backgroundColor: '#333333',
  44. color: '#ffffff',
  45. hoverOpacity: 0.7,
  46. selectedColor: '#666666',
  47. enableZoom: true,
  48. showTooltip: true,
  49. values: sample_data,
  50. scaleColors: ['#C8EEFF', '#006491'],
  51. normalizeFunction: 'polynomial'
  52. });
  53. jQuery('#vmap-australia').vectorMap({
  54. map: 'australia_en',
  55. backgroundColor: '#333333',
  56. color: '#ffffff',
  57. hoverOpacity: 0.7,
  58. selectedColor: '#666666',
  59. enableZoom: true,
  60. showTooltip: true,
  61. values: sample_data,
  62. scaleColors: ['#C8EEFF', '#006491'],
  63. normalizeFunction: 'polynomial'
  64. });
  65. jQuery('#vmap-africa').vectorMap({
  66. map: 'africa_en',
  67. backgroundColor: '#333333',
  68. color: '#ffffff',
  69. hoverOpacity: 0.7,
  70. selectedColor: '#666666',
  71. enableZoom: true,
  72. showTooltip: true,
  73. values: sample_data,
  74. scaleColors: ['#C8EEFF', '#006491'],
  75. normalizeFunction: 'polynomial'
  76. });
  77. jQuery('#vmap-northamerica').vectorMap({
  78. map: 'north-america_en',
  79. backgroundColor: '#333333',
  80. color: '#ffffff',
  81. hoverOpacity: 0.7,
  82. selectedColor: '#666666',
  83. enableZoom: true,
  84. showTooltip: true,
  85. values: sample_data,
  86. scaleColors: ['#C8EEFF', '#006491'],
  87. normalizeFunction: 'polynomial'
  88. });
  89. jQuery('#vmap-southamerica').vectorMap({
  90. map: 'south-america_en',
  91. backgroundColor: '#333333',
  92. color: '#ffffff',
  93. hoverOpacity: 0.7,
  94. selectedColor: '#666666',
  95. enableZoom: true,
  96. showTooltip: true,
  97. values: sample_data,
  98. scaleColors: ['#C8EEFF', '#006491'],
  99. normalizeFunction: 'polynomial'
  100. });
  101. });
  102. </script>
  103. <style>
  104. * {
  105. margin: 0;
  106. padding: 0;
  107. }
  108. h2 {
  109. background: none repeat scroll 0 0 #cccccc;
  110. border: 1px solid #aaaaaa;
  111. border-top-left-radius: 5px;
  112. border-top-right-radius: 5px;
  113. float: left;
  114. padding: 5px;
  115. font-size: 20px;
  116. font-weight: normal;
  117. cursor: pointer;
  118. }
  119. h2.tab-selected {
  120. background: #888888;
  121. border: 1px solid #000000;
  122. }
  123. .map {
  124. position: absolute;
  125. z-index: 0;
  126. left: 0;
  127. top: 35px;
  128. }
  129. </style>
  130. </head>
  131. <body>
  132. <h2 id="asia">Asia</h2>
  133. <div class="map">
  134. <div id="vmap-asia" style="width: 600px; height: 400px;"></div>
  135. </div>
  136. <h2 id="europe">Europe</h2>
  137. <div class="map">
  138. <div id="vmap-europe" style="width: 600px; height: 400px;"></div>
  139. </div>
  140. <h2 id="australia">Australia</h2>
  141. <div class="map">
  142. <div id="vmap-australia" style="width: 600px; height: 400px;"></div>
  143. </div>
  144. <h2 id="africa">Africa</h2>
  145. <div class="map">
  146. <div id="vmap-africa" style="width: 600px; height: 400px;"></div>
  147. </div>
  148. <h2 id="northamerica">North America</h2>
  149. <div class="map">
  150. <div id="vmap-northamerica" style="width: 600px; height: 400px;"></div>
  151. </div>
  152. <h2 id="southamerica">South America</h2>
  153. <div class="map">
  154. <div id="vmap-southamerica" style="width: 600px; height: 400px;"></div>
  155. </div>
  156. </body>
  157. </html>