mapWorld.html 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269
  1. <html>
  2. <head>
  3. <meta charset="utf-8">
  4. <script src="esl.js"></script>
  5. <script src="config.js"></script>
  6. <script src="lib/jquery.min.js"></script>
  7. </head>
  8. <body>
  9. <style>
  10. html, body, #main {
  11. width: 100%;
  12. height: 100%;
  13. margin: 0;
  14. }
  15. </style>
  16. <div id="main"></div>
  17. <script>
  18. require([
  19. 'echarts',
  20. 'echarts/chart/map',
  21. 'echarts/component/legend',
  22. 'echarts/component/geo',
  23. 'echarts/component/visualMap'
  24. ], function (echarts) {
  25. $.get('../map/json/world.json', function (worldJson) {
  26. echarts.registerMap('world', worldJson);
  27. var chart = echarts.init(document.getElementById('main'), null, {
  28. renderer: 'canvas'
  29. });
  30. var itemStyle = {
  31. normal:{
  32. borderWidth: 0.5,
  33. borderColor: 'black'
  34. },
  35. emphasis:{
  36. label:{show:true}
  37. // shadowOffsetX: 0,
  38. // shadowOffsetY: 0,
  39. // shadowBlur: 20,
  40. // shadowColor: 'rgba(0, 0, 0, 0.3)'
  41. }
  42. };
  43. chart.setOption({
  44. title : {
  45. text: 'World Population (2010)',
  46. subtext: 'from United Nations, Total population, both sexes combined, as of 1 July (thousands)',
  47. sublink : 'http://esa.un.org/wpp/Excel-Data/population.htm',
  48. left: 'center',
  49. top: 'top'
  50. },
  51. tooltip : {
  52. trigger: 'item',
  53. formatter : function (params) {
  54. var value = (params.value + '').split('.');
  55. value = value[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g, '$1,')
  56. + '.' + value[1];
  57. return params.seriesName + '<br/>' + params.name + ' : ' + value;
  58. }
  59. },
  60. visualMap: {
  61. min: 0,
  62. max: 1000000,
  63. text:['High','Low'],
  64. realtime: true,
  65. calculable : true,
  66. color: ['orangered','yellow','lightskyblue']
  67. },
  68. series : [
  69. {
  70. name: 'World Population (2010)',
  71. type: 'map',
  72. map: 'world',
  73. roam: true,
  74. top: 60,
  75. width: '80%',
  76. itemStyle: itemStyle,
  77. data:[
  78. {name : 'Afghanistan', value : 28397.812},
  79. {name : 'Angola', value : 19549.124},
  80. {name : 'Albania', value : 3150.143},
  81. {name : 'United Arab Emirates', value : 8441.537},
  82. {name : 'Argentina', value : 40374.224},
  83. {name : 'Armenia', value : 2963.496},
  84. {name : 'French Southern and Antarctic Lands', value : 268.065},
  85. {name : 'Australia', value : 22404.488},
  86. {name : 'Austria', value : 8401.924},
  87. {name : 'Azerbaijan', value : 9094.718},
  88. {name : 'Burundi', value : 9232.753},
  89. {name : 'Belgium', value : 10941.288},
  90. {name : 'Benin', value : 9509.798},
  91. {name : 'Burkina Faso', value : 15540.284},
  92. {name : 'Bangladesh', value : 151125.475},
  93. {name : 'Bulgaria', value : 7389.175},
  94. {name : 'The Bahamas', value : 66402.316},
  95. {name : 'Bosnia and Herzegovina', value : 3845.929},
  96. {name : 'Belarus', value : 9491.07},
  97. {name : 'Belize', value : 308.595},
  98. {name : 'Bermuda', value : 64.951},
  99. {name : 'Bolivia', value : 716.939},
  100. {name : 'Brazil', value : 195210.154},
  101. {name : 'Brunei', value : 27.223},
  102. {name : 'Bhutan', value : 716.939},
  103. {name : 'Botswana', value : 1969.341},
  104. {name : 'Central African Republic', value : 4349.921},
  105. {name : 'Canada', value : 34126.24},
  106. {name : 'Switzerland', value : 7830.534},
  107. {name : 'Chile', value : 17150.76},
  108. {name : 'China', value : 1359821.465},
  109. {name : 'Ivory Coast', value : 60508.978},
  110. {name : 'Cameroon', value : 20624.343},
  111. {name : 'Democratic Republic of the Congo', value : 62191.161},
  112. {name : 'Republic of the Congo', value : 3573.024},
  113. {name : 'Colombia', value : 46444.798},
  114. {name : 'Costa Rica', value : 4669.685},
  115. {name : 'Cuba', value : 11281.768},
  116. {name : 'Northern Cyprus', value : 1.468},
  117. {name : 'Cyprus', value : 1103.685},
  118. {name : 'Czech Republic', value : 10553.701},
  119. {name : 'Germany', value : 83017.404},
  120. {name : 'Djibouti', value : 834.036},
  121. {name : 'Denmark', value : 5550.959},
  122. {name : 'Dominican Republic', value : 10016.797},
  123. {name : 'Algeria', value : 37062.82},
  124. {name : 'Ecuador', value : 15001.072},
  125. {name : 'Egypt', value : 78075.705},
  126. {name : 'Eritrea', value : 5741.159},
  127. {name : 'Spain', value : 46182.038},
  128. {name : 'Estonia', value : 1298.533},
  129. {name : 'Ethiopia', value : 87095.281},
  130. {name : 'Finland', value : 5367.693},
  131. {name : 'Fiji', value : 860.559},
  132. {name : 'Falkland Islands', value : 49.581},
  133. {name : 'France', value : 63230.866},
  134. {name : 'Gabon', value : 1556.222},
  135. {name : 'United Kingdom', value : 62066.35},
  136. {name : 'Georgia', value : 4388.674},
  137. {name : 'Ghana', value : 24262.901},
  138. {name : 'Guinea', value : 10876.033},
  139. {name : 'Gambia', value : 1680.64},
  140. {name : 'Guinea Bissau', value : 10876.033},
  141. {name : 'Equatorial Guinea', value : 696.167},
  142. {name : 'Greece', value : 11109.999},
  143. {name : 'Greenland', value : 56.546},
  144. {name : 'Guatemala', value : 14341.576},
  145. {name : 'French Guiana', value : 231.169},
  146. {name : 'Guyana', value : 786.126},
  147. {name : 'Honduras', value : 7621.204},
  148. {name : 'Croatia', value : 4338.027},
  149. {name : 'Haiti', value : 9896.4},
  150. {name : 'Hungary', value : 10014.633},
  151. {name : 'Indonesia', value : 240676.485},
  152. {name : 'India', value : 1205624.648},
  153. {name : 'Ireland', value : 4467.561},
  154. {name : 'Iran', value : 240676.485},
  155. {name : 'Iraq', value : 30962.38},
  156. {name : 'Iceland', value : 318.042},
  157. {name : 'Israel', value : 7420.368},
  158. {name : 'Italy', value : 60508.978},
  159. {name : 'Jamaica', value : 2741.485},
  160. {name : 'Jordan', value : 6454.554},
  161. {name : 'Japan', value : 127352.833},
  162. {name : 'Kazakhstan', value : 15921.127},
  163. {name : 'Kenya', value : 40909.194},
  164. {name : 'Kyrgyzstan', value : 5334.223},
  165. {name : 'Cambodia', value : 14364.931},
  166. {name : 'South Korea', value : 51452.352},
  167. {name : 'Kosovo', value : 97.743},
  168. {name : 'Kuwait', value : 2991.58},
  169. {name : 'Laos', value : 6395.713},
  170. {name : 'Lebanon', value : 4341.092},
  171. {name : 'Liberia', value : 3957.99},
  172. {name : 'Libya', value : 6040.612},
  173. {name : 'Sri Lanka', value : 20758.779},
  174. {name : 'Lesotho', value : 2008.921},
  175. {name : 'Lithuania', value : 3068.457},
  176. {name : 'Luxembourg', value : 507.885},
  177. {name : 'Latvia', value : 2090.519},
  178. {name : 'Morocco', value : 31642.36},
  179. {name : 'Moldova', value : 103.619},
  180. {name : 'Madagascar', value : 21079.532},
  181. {name : 'Mexico', value : 117886.404},
  182. {name : 'Macedonia', value : 507.885},
  183. {name : 'Mali', value : 13985.961},
  184. {name : 'Myanmar', value : 51931.231},
  185. {name : 'Montenegro', value : 620.078},
  186. {name : 'Mongolia', value : 2712.738},
  187. {name : 'Mozambique', value : 23967.265},
  188. {name : 'Mauritania', value : 3609.42},
  189. {name : 'Malawi', value : 15013.694},
  190. {name : 'Malaysia', value : 28275.835},
  191. {name : 'Namibia', value : 2178.967},
  192. {name : 'New Caledonia', value : 246.379},
  193. {name : 'Niger', value : 15893.746},
  194. {name : 'Nigeria', value : 159707.78},
  195. {name : 'Nicaragua', value : 5822.209},
  196. {name : 'Netherlands', value : 16615.243},
  197. {name : 'Norway', value : 4891.251},
  198. {name : 'Nepal', value : 26846.016},
  199. {name : 'New Zealand', value : 4368.136},
  200. {name : 'Oman', value : 2802.768},
  201. {name : 'Pakistan', value : 173149.306},
  202. {name : 'Panama', value : 3678.128},
  203. {name : 'Peru', value : 29262.83},
  204. {name : 'Philippines', value : 93444.322},
  205. {name : 'Papua New Guinea', value : 6858.945},
  206. {name : 'Poland', value : 38198.754},
  207. {name : 'Puerto Rico', value : 3709.671},
  208. {name : 'North Korea', value : 1.468},
  209. {name : 'Portugal', value : 10589.792},
  210. {name : 'Paraguay', value : 6459.721},
  211. {name : 'Qatar', value : 1749.713},
  212. {name : 'Romania', value : 21861.476},
  213. {name : 'Russia', value : 21861.476},
  214. {name : 'Rwanda', value : 10836.732},
  215. {name : 'Western Sahara', value : 514.648},
  216. {name : 'Saudi Arabia', value : 27258.387},
  217. {name : 'Sudan', value : 35652.002},
  218. {name : 'South Sudan', value : 9940.929},
  219. {name : 'Senegal', value : 12950.564},
  220. {name : 'Solomon Islands', value : 526.447},
  221. {name : 'Sierra Leone', value : 5751.976},
  222. {name : 'El Salvador', value : 6218.195},
  223. {name : 'Somaliland', value : 9636.173},
  224. {name : 'Somalia', value : 9636.173},
  225. {name : 'Republic of Serbia', value : 3573.024},
  226. {name : 'Suriname', value : 524.96},
  227. {name : 'Slovakia', value : 5433.437},
  228. {name : 'Slovenia', value : 2054.232},
  229. {name : 'Sweden', value : 9382.297},
  230. {name : 'Swaziland', value : 1193.148},
  231. {name : 'Syria', value : 7830.534},
  232. {name : 'Chad', value : 11720.781},
  233. {name : 'Togo', value : 6306.014},
  234. {name : 'Thailand', value : 66402.316},
  235. {name : 'Tajikistan', value : 7627.326},
  236. {name : 'Turkmenistan', value : 5041.995},
  237. {name : 'East Timor', value : 10016.797},
  238. {name : 'Trinidad and Tobago', value : 1328.095},
  239. {name : 'Tunisia', value : 10631.83},
  240. {name : 'Turkey', value : 72137.546},
  241. {name : 'United Republic of Tanzania', value : 44973.33},
  242. {name : 'Uganda', value : 33987.213},
  243. {name : 'Ukraine', value : 46050.22},
  244. {name : 'Uruguay', value : 3371.982},
  245. {name : 'United States of America', value : 312247.116},
  246. {name : 'Uzbekistan', value : 27769.27},
  247. {name : 'Venezuela', value : 236.299},
  248. {name : 'Vietnam', value : 89047.397},
  249. {name : 'Vanuatu', value : 236.299},
  250. {name : 'West Bank', value : 13.565},
  251. {name : 'Yemen', value : 22763.008},
  252. {name : 'South Africa', value : 51452.352},
  253. {name : 'Zambia', value : 13216.985},
  254. {name : 'Zimbabwe', value : 13076.978}
  255. ]
  256. }
  257. ]
  258. });
  259. });
  260. });
  261. </script>
  262. </body>
  263. </html>