index.html 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>jVectorMap demo</title>
  5. <link rel="stylesheet" media="all" href="../jquery-jvectormap.css"/>
  6. <script src="assets/jquery-1.8.2.js"></script>
  7. <script src="../jquery-jvectormap.js"></script>
  8. <script src="../jquery-mousewheel.js"></script>
  9. <script src="../lib/jvectormap.js"></script>
  10. <script src="../lib/abstract-element.js"></script>
  11. <script src="../lib/abstract-canvas-element.js"></script>
  12. <script src="../lib/abstract-shape-element.js"></script>
  13. <script src="../lib/svg-element.js"></script>
  14. <script src="../lib/svg-group-element.js"></script>
  15. <script src="../lib/svg-canvas-element.js"></script>
  16. <script src="../lib/svg-shape-element.js"></script>
  17. <script src="../lib/svg-path-element.js"></script>
  18. <script src="../lib/svg-circle-element.js"></script>
  19. <script src="../lib/vml-element.js"></script>
  20. <script src="../lib/vml-group-element.js"></script>
  21. <script src="../lib/vml-canvas-element.js"></script>
  22. <script src="../lib/vml-shape-element.js"></script>
  23. <script src="../lib/vml-path-element.js"></script>
  24. <script src="../lib/vml-circle-element.js"></script>
  25. <script src="../lib/vector-canvas.js"></script>
  26. <script src="../lib/simple-scale.js"></script>
  27. <script src="../lib/numeric-scale.js"></script>
  28. <script src="../lib/ordinal-scale.js"></script>
  29. <script src="../lib/color-scale.js"></script>
  30. <script src="../lib/data-series.js"></script>
  31. <script src="../lib/proj.js"></script>
  32. <script src="../lib/world-map.js"></script>
  33. <script src="assets/jquery-jvectormap-world-mill-en.js"></script>
  34. <script>
  35. jQuery.noConflict();
  36. jQuery(function(){
  37. var $ = jQuery;
  38. $('#focus-single').click(function(){
  39. $('#map1').vectorMap('set', 'focus', 'AU');
  40. });
  41. $('#focus-multiple').click(function(){
  42. $('#map1').vectorMap('set', 'focus', ['AU', 'JP']);
  43. });
  44. $('#focus-init').click(function(){
  45. $('#map1').vectorMap('set', 'focus', 1, 0, 0);
  46. });
  47. $('#map1').vectorMap({
  48. map: 'world_mill_en',
  49. focusOn: {
  50. x: 0.5,
  51. y: 0.5,
  52. scale: 2
  53. },
  54. series: {
  55. regions: [{
  56. scale: ['#C8EEFF', '#0071A4'],
  57. normalizeFunction: 'polynomial',
  58. values: {
  59. "AF": 16.63,
  60. "AL": 11.58,
  61. "DZ": 158.97,
  62. "AO": 85.81,
  63. "AG": 1.1,
  64. "AR": 351.02,
  65. "AM": 8.83,
  66. "AU": 1219.72,
  67. "AT": 366.26,
  68. "AZ": 52.17,
  69. "BS": 7.54,
  70. "BH": 21.73,
  71. "BD": 105.4,
  72. "BB": 3.96,
  73. "BY": 52.89,
  74. "BE": 461.33,
  75. "BZ": 1.43,
  76. "BJ": 6.49,
  77. "BT": 1.4,
  78. "BO": 19.18,
  79. "BA": 16.2,
  80. "BW": 12.5,
  81. "BR": 2023.53,
  82. "BN": 11.96,
  83. "BG": 44.84,
  84. "BF": 8.67,
  85. "BI": 1.47,
  86. "KH": 11.36,
  87. "CM": 21.88,
  88. "CA": 1563.66,
  89. "CV": 1.57,
  90. "CF": 2.11,
  91. "TD": 7.59,
  92. "CL": 199.18,
  93. "CN": 5745.13,
  94. "CO": 283.11,
  95. "KM": 0.56,
  96. "CD": 12.6,
  97. "CG": 11.88,
  98. "CR": 35.02,
  99. "CI": 22.38,
  100. "HR": 59.92,
  101. "CY": 22.75,
  102. "CZ": 195.23,
  103. "DK": 304.56,
  104. "DJ": 1.14,
  105. "DM": 0.38,
  106. "DO": 50.87,
  107. "EC": 61.49,
  108. "EG": 216.83,
  109. "SV": 21.8,
  110. "GQ": 14.55,
  111. "ER": 2.25,
  112. "EE": 19.22,
  113. "ET": 30.94,
  114. "FJ": 3.15,
  115. "FI": 231.98,
  116. "FR": 2555.44,
  117. "GA": 12.56,
  118. "GM": 1.04,
  119. "GE": 11.23,
  120. "DE": 3305.9,
  121. "GH": 18.06,
  122. "GR": 305.01,
  123. "GD": 0.65,
  124. "GT": 40.77,
  125. "GN": 4.34,
  126. "GW": 0.83,
  127. "GY": 2.2,
  128. "HT": 6.5,
  129. "HN": 15.34,
  130. "HK": 226.49,
  131. "HU": 132.28,
  132. "IS": 12.77,
  133. "IN": 1430.02,
  134. "ID": 695.06,
  135. "IR": 337.9,
  136. "IQ": 84.14,
  137. "IE": 204.14,
  138. "IL": 201.25,
  139. "IT": 2036.69,
  140. "JM": 13.74,
  141. "JP": 5390.9,
  142. "JO": 27.13,
  143. "KZ": 129.76,
  144. "KE": 32.42,
  145. "KI": 0.15,
  146. "KR": 986.26,
  147. "KW": 117.32,
  148. "KG": 4.44,
  149. "LA": 6.34,
  150. "LV": 23.39,
  151. "LB": 39.15,
  152. "LS": 1.8,
  153. "LR": 0.98,
  154. "LY": 77.91,
  155. "LT": 35.73,
  156. "LU": 52.43,
  157. "MK": 9.58,
  158. "MG": 8.33,
  159. "MW": 5.04,
  160. "MY": 218.95,
  161. "MV": 1.43,
  162. "ML": 9.08,
  163. "MT": 7.8,
  164. "MR": 3.49,
  165. "MU": 9.43,
  166. "MX": 1004.04,
  167. "MD": 5.36,
  168. "MN": 5.81,
  169. "ME": 3.88,
  170. "MA": 91.7,
  171. "MZ": 10.21,
  172. "MM": 35.65,
  173. "NA": 11.45,
  174. "NP": 15.11,
  175. "NL": 770.31,
  176. "NZ": 138,
  177. "NI": 6.38,
  178. "NE": 5.6,
  179. "NG": 206.66,
  180. "NO": 413.51,
  181. "OM": 53.78,
  182. "PK": 174.79,
  183. "PA": 27.2,
  184. "PG": 8.81,
  185. "PY": 17.17,
  186. "PE": 153.55,
  187. "PH": 189.06,
  188. "PL": 438.88,
  189. "PT": 223.7,
  190. "QA": 126.52,
  191. "RO": 158.39,
  192. "RU": 1476.91,
  193. "RW": 5.69,
  194. "WS": 0.55,
  195. "ST": 0.19,
  196. "SA": 434.44,
  197. "SN": 12.66,
  198. "RS": 38.92,
  199. "SC": 0.92,
  200. "SL": 1.9,
  201. "SG": 217.38,
  202. "SK": 86.26,
  203. "SI": 46.44,
  204. "SB": 0.67,
  205. "ZA": 354.41,
  206. "ES": 1374.78,
  207. "LK": 48.24,
  208. "KN": 0.56,
  209. "LC": 1,
  210. "VC": 0.58,
  211. "SD": 65.93,
  212. "SR": 3.3,
  213. "SZ": 3.17,
  214. "SE": 444.59,
  215. "CH": 522.44,
  216. "SY": 59.63,
  217. "TW": 426.98,
  218. "TJ": 5.58,
  219. "TZ": 22.43,
  220. "TH": 312.61,
  221. "TL": 0.62,
  222. "TG": 3.07,
  223. "TO": 0.3,
  224. "TT": 21.2,
  225. "TN": 43.86,
  226. "TR": 729.05,
  227. "TM": 0,
  228. "UG": 17.12,
  229. "UA": 136.56,
  230. "AE": 239.65,
  231. "GB": 2258.57,
  232. "US": 14624.18,
  233. "UY": 40.71,
  234. "UZ": 37.72,
  235. "VU": 0.72,
  236. "VE": 285.21,
  237. "VN": 101.99,
  238. "YE": 30.02,
  239. "ZM": 15.69,
  240. "ZW": 5.57
  241. }
  242. }]
  243. }
  244. });
  245. })
  246. </script>
  247. </head>
  248. <body>
  249. <div style="height: 400px"></div>
  250. <div id="map1" style="width: 600px; height: 400px"></div>
  251. <button id="focus-single">Focus on Australia</button>
  252. <button id="focus-multiple">Focus on Australia and Japan</button>
  253. <button id="focus-init">Return to the initial state</button>
  254. </body>
  255. </html>