index.htm 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  5. <title>Highmaps Example</title>
  6. <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
  7. <style type="text/css">
  8. #container {
  9. height: 680px;
  10. min-width: 310px;
  11. max-width: 800px;
  12. margin: 0 auto;
  13. }
  14. .loading {
  15. margin-top: 10em;
  16. text-align: center;
  17. color: gray;
  18. }
  19. </style>
  20. <script type="text/javascript">
  21. $(function () {
  22. // Initiate the chart
  23. $('#container').highcharts('Map', {
  24. title: {
  25. text: 'Highmaps basic lat/lon demo'
  26. },
  27. mapNavigation: {
  28. enabled: true
  29. },
  30. tooltip: {
  31. headerFormat: '',
  32. pointFormat: '<b>{point.name}</b><br>Lat: {point.lat}, Lon: {point.lon}'
  33. },
  34. series: [{
  35. // Use the gb-all map with no data as a basemap
  36. mapData: Highcharts.maps['countries/gb/gb-all'],
  37. name: 'Basemap',
  38. borderColor: '#A0A0A0',
  39. nullColor: 'rgba(200, 200, 200, 0.3)',
  40. showInLegend: false
  41. }, {
  42. name: 'Separators',
  43. type: 'mapline',
  44. data: Highcharts.geojson(Highcharts.maps['countries/gb/gb-all'], 'mapline'),
  45. color: '#707070',
  46. showInLegend: false,
  47. enableMouseTracking: false
  48. }, {
  49. // Specify points using lat/lon
  50. type: 'mappoint',
  51. name: 'Cities',
  52. color: Highcharts.getOptions().colors[1],
  53. data: [{
  54. name: 'London',
  55. lat: 51.507222,
  56. lon: -0.1275
  57. }, {
  58. name: 'Birmingham',
  59. lat: 52.483056,
  60. lon: -1.893611
  61. }, {
  62. name: 'Leeds',
  63. lat: 53.799722,
  64. lon: -1.549167
  65. }, {
  66. name: 'Glasgow',
  67. lat: 55.858,
  68. lon: -4.259
  69. }, {
  70. name: 'Sheffield',
  71. lat: 53.383611,
  72. lon: -1.466944
  73. }, {
  74. name: 'Liverpool',
  75. lat: 53.4,
  76. lon: -3
  77. }, {
  78. name: 'Bristol',
  79. lat: 51.45,
  80. lon: -2.583333
  81. }, {
  82. name: 'Belfast',
  83. lat: 54.597,
  84. lon: -5.93
  85. }, {
  86. name: 'Lerwick',
  87. lat: 60.155,
  88. lon: -1.145,
  89. dataLabels: {
  90. align: 'left',
  91. x: 5,
  92. verticalAlign: 'middle'
  93. }
  94. }]
  95. }]
  96. });
  97. });
  98. </script>
  99. </head>
  100. <body>
  101. <script src="https://cdnjs.cloudflare.com/ajax/libs/proj4js/2.3.6/proj4.js"></script>
  102. <script src="../../js/highmaps.js"></script>
  103. <script src="../../js/modules/exporting.js"></script>
  104. <script src="http://code.highcharts.com/mapdata/countries/gb/gb-all.js"></script>
  105. <div id="container"></div>
  106. </body>
  107. </html>