HTML5 216
[Deadmap] DIY Town Deadmap By Silversunset on 4th October 2017 05:10:55 PM
  1. <!DOCTYPE html>
  2. <!--Instructions
  3.  * Save this file as index.html and upload to somewhere like Bitballoon.com. An example of this default file can be viewed at http://townmap.bitballoon.com/
  4.  * do a find/replace on "Your Town Name" and change it to whatever you'd like this page to be called
  5.  * do a find/replace on "Your Background Image here" to add a map background to the chart
  6.  * To rename a series, look for "series: [{name: 'Misc'," and change the name between the '' to the new name
  7.  * To change the coordinate boundaries of your map (the default goes from 1250,3000 -> 1750,3500) edit the xAxis and yAxis lines "Max" and "Min" numbers to be your corner boundaries
  8.  * Each category has examples for how to set a plot point
  9. -->
  10.  
  11.     Your Town Name
  12.  
  13.     <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
  14.     <script src="https://code.highcharts.com/highcharts.js"></script>
  15.     <script src="https://code.highcharts.com/highcharts-more.js"></script>
  16.     <script src="https://code.highcharts.com/modules/exporting.js"></script>
  17.     <style type="text/css">
  18.       table, th, td {
  19.         text-align: left;
  20.         font-size: 12px;
  21.         width: 200px;
  22.       }
  23.       p {
  24.         position: absolute;
  25.         top: 400px;
  26.         left: 25px;
  27.         width: 150px;
  28.         font-size: 12px;
  29.       }
  30.       footer {
  31.         font-style: italic;
  32.         font-size: 12px;
  33.         color: rgb(0, 0, 0);
  34.         position: absolute;
  35.         top: 700px;
  36.         left: 25px;
  37.         width: 150px;
  38.       }
  39.       #townlist tr:nth-child(even), .spawnerlist tr:nth-child(even) {
  40.         background-color: #e5e5e5;
  41.       }
  42.       #townlist tr:nth-child(odd), .spawnerlist tr:nth-child(odd) {
  43.         background-color: #fcfcfc;
  44.       }
  45.       #townlist th, #townlist td, .spawnerlist th, .spawnerlist td {
  46.         padding-left: 5px;
  47.         padding-right: 5px;
  48.         text-align: left;
  49.         white-space: nowrap;
  50.         font-size: 1.25em;
  51.       }
  52.       #townlist th, .spawnerlist th {
  53.         background-color: #cccccc;
  54.       }
  55.       #townlist {
  56.         position: absolute;
  57.         top: 850px;
  58.         left: 20px;
  59.         margin-bottom: 500px;
  60.         border-collapse: collapse;
  61.       }
  62.       .search {
  63.         width: 350px;
  64.       }
  65.       .chartinfo th, .chartinfo td {
  66.         background-color: white;
  67.         font-size: 12px;
  68.       }
  69.       .chartinfo h3 {
  70.         text-align: center;
  71.         margin-bottom: 0;
  72.         padding: 5px 0;
  73.         font-size: 1.5em;
  74.       }
  75.       #container {
  76.       height: 700px;
  77.       width: 800px;
  78.       text-align: left;
  79.       margin: 100 20 20 20;
  80.       z-index: 20;
  81.       }
  82.       .spawnerlist {
  83.         position: absolute;
  84.         top: 158px;
  85.         left: 850px;
  86.       }
  87.       .spawnerlist th {text-align: center;}
  88.       .spawnerlist table {border-collapse: collapse;}
  89.     </style>
  90. </head>
  91.  
  92.  
  93. <div id="container"></div>
  94.  
  95. Highcharts.setOptions({lang: {thousandsSep: "",}});
  96.  
  97. Highcharts.chart('container', {
  98.         chart: {type: 'scatter',plotBorderWidth: 1,zoomType: 'xy', marginLeft: 200,plotBackgroundImage: 'Your Background Image here'},
  99.         legend: {enabled: true, layout: 'vertical',align: 'left',verticalAlign: 'top',floating: true,y:40,x:-20, footer: {text: 'Click and drag to select an area to zoom'},title: {text: 'Categories',style: {fontStyle: 'italic'}},},
  100.         title: {text: 'Your Town Name'},
  101.         xAxis:{gridLineWidth:1,max:1750,min:1250,tickInterval:50,title:{text:''},labels:{format:'{value}'},plotLines:[{color:'gray',dashStyle:'dot',width:2,tickAmount:5,value:0,label:{rotation:0,y:0,style:{fontStyle:'italic'},},zIndex:3}]},
  102.         yAxis:{startOnTick:false,endOnTick:false,reversed:true,tickInterval:50,max:3500,min:3000,title:{text:''},labels:{format:'{value}'},maxPadding:0.2,plotLines:[{color:'gray',dashStyle:'dot',tickAmount:5,width:2,value:0,label:{align:'right',style:{fontStyle:'italic'},x:0},zIndex:3}]},
  103.         plotOptions:{series:{dataLabels:{enabled:true,format:'{point.name}',},stickyTracking:false,},tooltip:{snap:0}},
  104.         credits: {href: "http://nerd.nu", text: "Your Town Name" },
  105.  
  106.  tooltip: {
  107.             useHTML: true,
  108.             headerFormat: '<table class="chartinfo">',
  109.             pointFormat: '<tr><th colspan="2"><h3>{point.name}</h3></th></tr>' +
  110.                 '<tr><th>Coordinates:</th><td>{point.x},{point.y}</td></tr>' +
  111.                 '<tr><th>Notes:</th><td>{point.Notes}</td></tr>' +
  112.                 '<tr><th colspan=2><img src="{point.Img}" style="height:100%;"></th></tr>',
  113.             footerFormat: '</table>',
  114.             followPointer: false,
  115.             hideDelay: 30,
  116.         },
  117.         series: [{
  118.                 name: 'Misc',
  119.             color: 'rgba(0,53,255, 0.5)',
  120.             marker: {symbol: 'circle'},
  121.             data: [
  122.                 //{x: 1425, y: 3275, name: 'Storage/Farms', Img: 'https://i.imgur.com/zWineuQ.png',},     //Example for formatting: Place point with image
  123.                 //{x: 1626, y: 3394, name: 'Guardian Grinder',},                                          ////Example for formatting: Place point without image
  124.             ]
  125.         }, {
  126.             name: 'Roads',
  127.             color: 'rgba(255,165,0, 1)',
  128.             lineWidth:2,
  129.             dataLabels: {enabled: false,},
  130.             enableMouseTracking: false,
  131.             marker: {enabled: false,},
  132.             data: [
  133.                 //[1500,3000],[1500,3250],null,                                 //Example for formatting: roads
  134.             ]
  135.         }, {
  136.             name: 'Rails',
  137.             color: 'rgba(0,0,255, 1)',
  138.             dashStyle: 'ShortDot',
  139.             lineWidth:2,
  140.             dashStyle: 'ShortDot',
  141.             dataLabels: {enabled: false,},
  142.             enableMouseTracking: false,
  143.             marker: {enabled: false,},
  144.             data: [
  145.                 //[1500,3000],[1500,3250],null,                                 //Example for formatting: rails
  146.             ]
  147.         }, {
  148.             name: 'Border',
  149.             color: 'rgba(255,0,0, .8)',
  150.             lineWidth:1,
  151.             dataLabels: {enabled: false,},
  152.             enableMouseTracking: false,
  153.             marker: {enabled: false,},
  154.             data: [
  155.                     //[1250,3000],[1750,3000],[1750,3500],[1250,3500],[1250,3000],null,       //Example for formatting: claim borders
  156.                 ]
  157.       }]
  158. });
  159.  
  160. </body>
  161. </html>
Raw Paste