map.html 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  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. series : [
  42. {
  43. name: 'Map',
  44. type: 'map',
  45. mapLocation: {
  46. x : 'left',
  47. y : 'top',
  48. height : 500
  49. },
  50. selectedMode: 'multiple',
  51. itemStyle: {
  52. normal: {
  53. borderWidth:2,
  54. borderColor:'lightgreen',
  55. color: 'orange',
  56. label: {
  57. show: false
  58. }
  59. },
  60. emphasis: { // 也是选中样式
  61. borderWidth:2,
  62. borderColor:'#fff',
  63. color: '#32cd32',
  64. label: {
  65. show: true,
  66. textStyle: {
  67. color: '#fff'
  68. }
  69. }
  70. }
  71. },
  72. data:[
  73. {
  74. name: '广东',
  75. value: Math.round(Math.random()*1000),
  76. itemStyle: {
  77. normal: {
  78. color: '#32cd32',
  79. label: {
  80. show: true,
  81. textStyle: {
  82. color: '#fff',
  83. fontSize: 15
  84. }
  85. }
  86. },
  87. emphasis: { // 也是选中样式
  88. borderWidth:5,
  89. borderColor:'yellow',
  90. color: '#cd5c5c',
  91. label: {
  92. show: false,
  93. textStyle: {
  94. color: 'blue'
  95. }
  96. }
  97. }
  98. }
  99. }
  100. ],
  101. markPoint : {
  102. itemStyle : {
  103. normal:{
  104. color:'skyblue'
  105. }
  106. },
  107. data : [
  108. {name : '天津', value : 350},
  109. {name : '上海', value : 103},
  110. {
  111. name : 'echarts',
  112. symbol: 'image://../asset/img/echarts-logo.png',
  113. symbolSize: 21,
  114. x: 300,
  115. y: 100
  116. }
  117. ]
  118. },
  119. geoCoord: {
  120. '上海': [121.4648,31.2891],
  121. '天津': [117.4219,39.4189]
  122. }
  123. }
  124. ]
  125. };
  126. </textarea>
  127. </div><!--/.well -->
  128. </div><!--/span-->
  129. <div id="graphic" class="col-md-8">
  130. <div id="main" class="main" style="height: 530px;"></div>
  131. <div>
  132. <button type="button" class="btn btn-sm btn-success" onclick="refresh(true)">刷 新</button>
  133. <span class="text-primary">切换主题</span>
  134. <select id="theme-select"></select>
  135. <span id='wrong-message' style="color:red"></span>
  136. </div>
  137. </div><!--/span-->
  138. </div><!--/row-->
  139. </div><!--/.fluid-container-->
  140. <footer id="footer"></footer>
  141. <!-- Le javascript
  142. ================================================== -->
  143. <!-- Placed at the end of the document so the pages load faster -->
  144. <script src="../asset/js/jquery.min.js"></script>
  145. <script type="text/javascript" src="../asset/js/echartsHome.js"></script>
  146. <script src="../asset/js/bootstrap.min.js"></script>
  147. <script src="../asset/js/echartsExample.js"></script>
  148. </body>
  149. </html>