map10.html 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <meta name="description" content="ECharts">
  8. <meta name="author" content="kener.linfeng@gmail.com">
  9. <title>ECharts · Example</title>
  10. <link rel="shortcut icon" href="../asset/ico/favicon.png">
  11. <link href="../asset/css/font-awesome.min.css" rel="stylesheet">
  12. <link href="../asset/css/bootstrap.css" rel="stylesheet">
  13. <link href="../asset/css/carousel.css" rel="stylesheet">
  14. <link href="../asset/css/echartsHome.css" rel="stylesheet">
  15. <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
  16. <!--[if lt IE 9]>
  17. <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
  18. <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  19. <![endif]-->
  20. <script src="./www/js/echarts.js"></script>
  21. <script src="../asset/js/codemirror.js"></script>
  22. <script src="../asset/js/javascript.js"></script>
  23. <link href="../asset/css/codemirror.css" rel="stylesheet">
  24. <link href="../asset/css/monokai.css" rel="stylesheet">
  25. <style type="text/css">
  26. .CodeMirror {
  27. height: 550px;
  28. }
  29. </style>
  30. </head>
  31. <body>
  32. <!-- Fixed navbar -->
  33. <div class="navbar navbar-default navbar-fixed-top" role="navigation" id="head"></div>
  34. <div class="container-fluid">
  35. <div class="row-fluid example">
  36. <div id="sidebar-code" class="col-md-4">
  37. <div class="well sidebar-nav">
  38. <div class="nav-header"><a href="#" onclick="autoResize()" class="glyphicon glyphicon-resize-full" id ="icon-resize" ></a>option</div>
  39. <textarea id="code" name="code">
  40. option = {
  41. color: ['#ff7f50','#32cd32','#6495ed'],
  42. title : {
  43. text: '南航主要航空线路',
  44. x:'center'
  45. },
  46. tooltip : {
  47. trigger: 'item',
  48. formatter: '{b}'
  49. },
  50. legend: {
  51. orient: 'vertical',
  52. x:'left',
  53. data:['北京','上海','广州']
  54. },
  55. toolbox: {
  56. show : true,
  57. orient : 'vertical',
  58. x: 'right',
  59. y: 'center',
  60. feature : {
  61. mark : {show: true},
  62. dataView : {show: true, readOnly: false},
  63. restore : {show: true},
  64. saveAsImage : {show: true}
  65. }
  66. },
  67. series : [
  68. {
  69. name: '北京',
  70. type: 'map',
  71. mapType: 'china',
  72. roam: true,
  73. hoverable: false,
  74. data:[],
  75. markLine : {
  76. itemStyle : {
  77. normal: {
  78. borderWidth:1
  79. }
  80. },
  81. data : [
  82. [{name:'北京'},{name:'包头'}],
  83. [{name:'北京'},{name:'北海'}],
  84. [{name:'北京'},{name:'广州'}],
  85. [{name:'北京'},{name:'郑州'}],
  86. [{name:'北京'},{name:'长春'}],
  87. [{name:'北京'},{name:'长治'}],
  88. [{name:'北京'},{name:'重庆'}],
  89. [{name:'北京'},{name:'长沙'}],
  90. [{name:'北京'},{name:'成都'}],
  91. [{name:'北京'},{name:'常州'}],
  92. [{name:'北京'},{name:'丹东'}],
  93. [{name:'北京'},{name:'大连'}],
  94. [{name:'北京'},{name:'东营'}],
  95. [{name:'北京'},{name:'延安'}],
  96. [{name:'北京'},{name:'福州'}],
  97. [{name:'北京'},{name:'海口'}],
  98. [{name:'北京'},{name:'呼和浩特'}],
  99. [{name:'北京'},{name:'合肥'}],
  100. [{name:'北京'},{name:'杭州'}],
  101. [{name:'北京'},{name:'哈尔滨'}],
  102. [{name:'北京'},{name:'舟山'}],
  103. [{name:'北京'},{name:'银川'}],
  104. [{name:'北京'},{name:'衢州'}],
  105. [{name:'北京'},{name:'南昌'}],
  106. [{name:'北京'},{name:'昆明'}],
  107. [{name:'北京'},{name:'贵阳'}],
  108. [{name:'北京'},{name:'兰州'}],
  109. [{name:'北京'},{name:'拉萨'}],
  110. [{name:'北京'},{name:'连云港'}],
  111. [{name:'北京'},{name:'临沂'}],
  112. [{name:'北京'},{name:'柳州'}],
  113. [{name:'北京'},{name:'宁波'}],
  114. [{name:'北京'},{name:'南京'}],
  115. [{name:'北京'},{name:'南宁'}],
  116. [{name:'北京'},{name:'南通'}],
  117. [{name:'北京'},{name:'上海'}],
  118. [{name:'北京'},{name:'沈阳'}],
  119. [{name:'北京'},{name:'西安'}],
  120. [{name:'北京'},{name:'汕头'}],
  121. [{name:'北京'},{name:'深圳'}],
  122. [{name:'北京'},{name:'青岛'}],
  123. [{name:'北京'},{name:'济南'}],
  124. [{name:'北京'},{name:'太原'}],
  125. [{name:'北京'},{name:'乌鲁木齐'}],
  126. [{name:'北京'},{name:'潍坊'}],
  127. [{name:'北京'},{name:'威海'}],
  128. [{name:'北京'},{name:'温州'}],
  129. [{name:'北京'},{name:'武汉'}],
  130. [{name:'北京'},{name:'无锡'}],
  131. [{name:'北京'},{name:'厦门'}],
  132. [{name:'北京'},{name:'西宁'}],
  133. [{name:'北京'},{name:'徐州'}],
  134. [{name:'北京'},{name:'烟台'}],
  135. [{name:'北京'},{name:'盐城'}],
  136. [{name:'北京'},{name:'珠海'}]
  137. ]
  138. },
  139. geoCoord: {
  140. '上海': [121.4648,31.2891],
  141. '东莞': [113.8953,22.901],
  142. '东营': [118.7073,37.5513],
  143. '中山': [113.4229,22.478],
  144. '临汾': [111.4783,36.1615],
  145. '临沂': [118.3118,35.2936],
  146. '丹东': [124.541,40.4242],
  147. '丽水': [119.5642,28.1854],
  148. '乌鲁木齐': [87.9236,43.5883],
  149. '佛山': [112.8955,23.1097],
  150. '保定': [115.0488,39.0948],
  151. '兰州': [103.5901,36.3043],
  152. '包头': [110.3467,41.4899],
  153. '北京': [116.4551,40.2539],
  154. '北海': [109.314,21.6211],
  155. '南京': [118.8062,31.9208],
  156. '南宁': [108.479,23.1152],
  157. '南昌': [116.0046,28.6633],
  158. '南通': [121.1023,32.1625],
  159. '厦门': [118.1689,24.6478],
  160. '台州': [121.1353,28.6688],
  161. '合肥': [117.29,32.0581],
  162. '呼和浩特': [111.4124,40.4901],
  163. '咸阳': [108.4131,34.8706],
  164. '哈尔滨': [127.9688,45.368],
  165. '唐山': [118.4766,39.6826],
  166. '嘉兴': [120.9155,30.6354],
  167. '大同': [113.7854,39.8035],
  168. '大连': [122.2229,39.4409],
  169. '天津': [117.4219,39.4189],
  170. '太原': [112.3352,37.9413],
  171. '威海': [121.9482,37.1393],
  172. '宁波': [121.5967,29.6466],
  173. '宝鸡': [107.1826,34.3433],
  174. '宿迁': [118.5535,33.7775],
  175. '常州': [119.4543,31.5582],
  176. '广州': [113.5107,23.2196],
  177. '廊坊': [116.521,39.0509],
  178. '延安': [109.1052,36.4252],
  179. '张家口': [115.1477,40.8527],
  180. '徐州': [117.5208,34.3268],
  181. '德州': [116.6858,37.2107],
  182. '惠州': [114.6204,23.1647],
  183. '成都': [103.9526,30.7617],
  184. '扬州': [119.4653,32.8162],
  185. '承德': [117.5757,41.4075],
  186. '拉萨': [91.1865,30.1465],
  187. '无锡': [120.3442,31.5527],
  188. '日照': [119.2786,35.5023],
  189. '昆明': [102.9199,25.4663],
  190. '杭州': [119.5313,29.8773],
  191. '枣庄': [117.323,34.8926],
  192. '柳州': [109.3799,24.9774],
  193. '株洲': [113.5327,27.0319],
  194. '武汉': [114.3896,30.6628],
  195. '汕头': [117.1692,23.3405],
  196. '江门': [112.6318,22.1484],
  197. '沈阳': [123.1238,42.1216],
  198. '沧州': [116.8286,38.2104],
  199. '河源': [114.917,23.9722],
  200. '泉州': [118.3228,25.1147],
  201. '泰安': [117.0264,36.0516],
  202. '泰州': [120.0586,32.5525],
  203. '济南': [117.1582,36.8701],
  204. '济宁': [116.8286,35.3375],
  205. '海口': [110.3893,19.8516],
  206. '淄博': [118.0371,36.6064],
  207. '淮安': [118.927,33.4039],
  208. '深圳': [114.5435,22.5439],
  209. '清远': [112.9175,24.3292],
  210. '温州': [120.498,27.8119],
  211. '渭南': [109.7864,35.0299],
  212. '湖州': [119.8608,30.7782],
  213. '湘潭': [112.5439,27.7075],
  214. '滨州': [117.8174,37.4963],
  215. '潍坊': [119.0918,36.524],
  216. '烟台': [120.7397,37.5128],
  217. '玉溪': [101.9312,23.8898],
  218. '珠海': [113.7305,22.1155],
  219. '盐城': [120.2234,33.5577],
  220. '盘锦': [121.9482,41.0449],
  221. '石家庄': [114.4995,38.1006],
  222. '福州': [119.4543,25.9222],
  223. '秦皇岛': [119.2126,40.0232],
  224. '绍兴': [120.564,29.7565],
  225. '聊城': [115.9167,36.4032],
  226. '肇庆': [112.1265,23.5822],
  227. '舟山': [122.2559,30.2234],
  228. '苏州': [120.6519,31.3989],
  229. '莱芜': [117.6526,36.2714],
  230. '菏泽': [115.6201,35.2057],
  231. '营口': [122.4316,40.4297],
  232. '葫芦岛': [120.1575,40.578],
  233. '衡水': [115.8838,37.7161],
  234. '衢州': [118.6853,28.8666],
  235. '西宁': [101.4038,36.8207],
  236. '西安': [109.1162,34.2004],
  237. '贵阳': [106.6992,26.7682],
  238. '连云港': [119.1248,34.552],
  239. '邢台': [114.8071,37.2821],
  240. '邯郸': [114.4775,36.535],
  241. '郑州': [113.4668,34.6234],
  242. '鄂尔多斯': [108.9734,39.2487],
  243. '重庆': [107.7539,30.1904],
  244. '金华': [120.0037,29.1028],
  245. '铜川': [109.0393,35.1947],
  246. '银川': [106.3586,38.1775],
  247. '镇江': [119.4763,31.9702],
  248. '长春': [125.8154,44.2584],
  249. '长沙': [113.0823,28.2568],
  250. '长治': [112.8625,36.4746],
  251. '阳泉': [113.4778,38.0951],
  252. '青岛': [120.4651,36.3373],
  253. '韶关': [113.7964,24.7028]
  254. }
  255. },
  256. {
  257. name: '上海',
  258. type: 'map',
  259. mapType: 'china',
  260. data:[],
  261. markLine : {
  262. itemStyle : {
  263. normal: {
  264. borderWidth:1
  265. }
  266. },
  267. data : [
  268. [{name:'上海'},{name:'包头'}],
  269. [{name:'上海'},{name:'北海'}],
  270. [{name:'上海'},{name:'广州'}],
  271. [{name:'上海'},{name:'郑州'}],
  272. [{name:'上海'},{name:'长春'}],
  273. [{name:'上海'},{name:'重庆'}],
  274. [{name:'上海'},{name:'长沙'}],
  275. [{name:'上海'},{name:'成都'}],
  276. [{name:'上海'},{name:'丹东'}],
  277. [{name:'上海'},{name:'大连'}],
  278. [{name:'上海'},{name:'福州'}],
  279. [{name:'上海'},{name:'海口'}],
  280. [{name:'上海'},{name:'呼和浩特'}],
  281. [{name:'上海'},{name:'合肥'}],
  282. [{name:'上海'},{name:'哈尔滨'}],
  283. [{name:'上海'},{name:'舟山'}],
  284. [{name:'上海'},{name:'银川'}],
  285. [{name:'上海'},{name:'南昌'}],
  286. [{name:'上海'},{name:'昆明'}],
  287. [{name:'上海'},{name:'贵阳'}],
  288. [{name:'上海'},{name:'兰州'}],
  289. [{name:'上海'},{name:'拉萨'}],
  290. [{name:'上海'},{name:'连云港'}],
  291. [{name:'上海'},{name:'临沂'}],
  292. [{name:'上海'},{name:'柳州'}],
  293. [{name:'上海'},{name:'宁波'}],
  294. [{name:'上海'},{name:'南宁'}],
  295. [{name:'上海'},{name:'北京'}],
  296. [{name:'上海'},{name:'沈阳'}],
  297. [{name:'上海'},{name:'秦皇岛'}],
  298. [{name:'上海'},{name:'西安'}],
  299. [{name:'上海'},{name:'石家庄'}],
  300. [{name:'上海'},{name:'汕头'}],
  301. [{name:'上海'},{name:'深圳'}],
  302. [{name:'上海'},{name:'青岛'}],
  303. [{name:'上海'},{name:'济南'}],
  304. [{name:'上海'},{name:'天津'}],
  305. [{name:'上海'},{name:'太原'}],
  306. [{name:'上海'},{name:'乌鲁木齐'}],
  307. [{name:'上海'},{name:'潍坊'}],
  308. [{name:'上海'},{name:'威海'}],
  309. [{name:'上海'},{name:'温州'}],
  310. [{name:'上海'},{name:'武汉'}],
  311. [{name:'上海'},{name:'厦门'}],
  312. [{name:'上海'},{name:'西宁'}],
  313. [{name:'上海'},{name:'徐州'}],
  314. [{name:'上海'},{name:'烟台'}],
  315. [{name:'上海'},{name:'珠海'}]
  316. ]
  317. }
  318. },
  319. {
  320. name: '广州',
  321. type: 'map',
  322. mapType: 'china',
  323. data:[],
  324. markLine : {
  325. itemStyle : {
  326. normal: {
  327. borderWidth:1
  328. }
  329. },
  330. data : [
  331. [{name:'广州'},{name:'北海'}],
  332. [{name:'广州'},{name:'郑州'}],
  333. [{name:'广州'},{name:'长春'}],
  334. [{name:'广州'},{name:'重庆'}],
  335. [{name:'广州'},{name:'长沙'}],
  336. [{name:'广州'},{name:'成都'}],
  337. [{name:'广州'},{name:'常州'}],
  338. [{name:'广州'},{name:'大连'}],
  339. [{name:'广州'},{name:'福州'}],
  340. [{name:'广州'},{name:'海口'}],
  341. [{name:'广州'},{name:'呼和浩特'}],
  342. [{name:'广州'},{name:'合肥'}],
  343. [{name:'广州'},{name:'杭州'}],
  344. [{name:'广州'},{name:'哈尔滨'}],
  345. [{name:'广州'},{name:'舟山'}],
  346. [{name:'广州'},{name:'银川'}],
  347. [{name:'广州'},{name:'南昌'}],
  348. [{name:'广州'},{name:'昆明'}],
  349. [{name:'广州'},{name:'贵阳'}],
  350. [{name:'广州'},{name:'兰州'}],
  351. [{name:'广州'},{name:'拉萨'}],
  352. [{name:'广州'},{name:'连云港'}],
  353. [{name:'广州'},{name:'临沂'}],
  354. [{name:'广州'},{name:'柳州'}],
  355. [{name:'广州'},{name:'宁波'}],
  356. [{name:'广州'},{name:'南京'}],
  357. [{name:'广州'},{name:'南宁'}],
  358. [{name:'广州'},{name:'南通'}],
  359. [{name:'广州'},{name:'北京'}],
  360. [{name:'广州'},{name:'上海'}],
  361. [{name:'广州'},{name:'沈阳'}],
  362. [{name:'广州'},{name:'西安'}],
  363. [{name:'广州'},{name:'石家庄'}],
  364. [{name:'广州'},{name:'汕头'}],
  365. [{name:'广州'},{name:'青岛'}],
  366. [{name:'广州'},{name:'济南'}],
  367. [{name:'广州'},{name:'天津'}],
  368. [{name:'广州'},{name:'太原'}],
  369. [{name:'广州'},{name:'乌鲁木齐'}],
  370. [{name:'广州'},{name:'温州'}],
  371. [{name:'广州'},{name:'武汉'}],
  372. [{name:'广州'},{name:'无锡'}],
  373. [{name:'广州'},{name:'厦门'}],
  374. [{name:'广州'},{name:'西宁'}],
  375. [{name:'广州'},{name:'徐州'}],
  376. [{name:'广州'},{name:'烟台'}],
  377. [{name:'广州'},{name:'盐城'}]
  378. ]
  379. }
  380. }
  381. ]
  382. };
  383. </textarea>
  384. </div><!--/.well -->
  385. </div><!--/span-->
  386. <div id="graphic" class="col-md-8">
  387. <div id="main" class="main" style="height: 530px;"></div>
  388. <div>
  389. <button type="button" class="btn btn-sm btn-success" onclick="refresh(true)">刷 新</button>
  390. <span class="text-primary">切换主题</span>
  391. <select id="theme-select"></select>
  392. <span id='wrong-message' style="color:red"></span>
  393. </div>
  394. </div><!--/span-->
  395. </div><!--/row-->
  396. </div><!--/.fluid-container-->
  397. <footer id="footer"></footer>
  398. <!-- Le javascript
  399. ================================================== -->
  400. <!-- Placed at the end of the document so the pages load faster -->
  401. <script src="../asset/js/jquery.min.js"></script>
  402. <script type="text/javascript" src="../asset/js/echartsHome.js"></script>
  403. <script src="../asset/js/bootstrap.min.js"></script>
  404. <script src="../asset/js/echartsExample.js"></script>
  405. </body>
  406. </html>