-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
97 lines (94 loc) · 5.27 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<!DOCTYPE html>
<html lang="en">
<head prefix="og: http://ogp.me/ns#">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>taiwan map</title><!-- libraries-->
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script type="text/javascript" src="https://d3js.org/d3.v3.min.js"></script><!-- custom files-->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="index.css">
<script type="text/javascript" src="https://d3js.org/topojson.v1.min.js"></script>
<script type="text/javascript" src="map/districtmap.js"></script>
<script type="text/javascript" src="map/countymap.js"></script>
<script type="text/javascript" src="index.js"></script>
<script type="text/javascript" src="data/county_data.js"></script>
<script type="text/javascript" src="data/district_data.js"></script>
<script type="text/javascript" src="data/viewbox_data.js"></script>
<script type="text/javascript" src="data/taipei_street_data.js"></script>
</head>
<body>
<div id='header'>台灣火災地圖</div>
<div class="container row mb-5">
<div class="col-lg-8 col-sm-12">
<svg width="100%" height="600px" viewbox='100 100 600 200' transform="scale(1.3)" preserveAspectRatio="xMidYMid"></svg>
<div id='scalediv'>
<span>尺規圖</span>
<div id='scalecolor'></div>
<div id='scalenum'>
<span id='leftnum'>0</span>
<span id="rightnum">5000</span>
</div>
</div>
</div>
<div id="info" class="col-lg-4 col-sm-12" style="max-width: 400px">
<div>
<h1 id="name">?</h1>
<h2 id="total">?</h2>
<p id="unit">( 火災次數 / 年 )</p>
<button id="findDetailBtn" type="button" class="btn btn-outline-light" onclick="goToDistrictMap()">看地區細節</button>
<button id="backToFullMapBtn" type="button" class="btn btn-outline-light" style="display: none" onclick="backToFullMap()">返回全國地圖</button>
<button id="useRatioBtn" type="button" class="btn btn-outline-light" onclick="useRatioMode()">看比率</button>
<button id="useTotalBtn" type="button" class="btn btn-outline-light" style="display: none" onclick="useTotalMode()">看總數</button>
</div>
<div id="firecaseTable" class="my-4">
<p>火災前三名路段</p>
<table class="table" style="color: white">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">路段</th>
<th scope="col">火災次數</th>
</tr>
</thead>
<tbody id="tableBody">
</tbody>
</table>
<button id="popModalBtn" class="btn btn-sm btn-outline-light" style="display: none;" data-toggle="modal" data-target="#detailDataModal">看全部路段資料...</button>
</div>
<hr/>
<div class="mt-5 row">
<h4 class="col-12">計算你的住址的火險值</h4>
<a class="m-auto btn btn-light" href="./QApage.html">
點我進入~
</a>
</div>
</div>
<div class="modal fade text-dark" id="detailDataModal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLongTitle">完整火災資料</h5>
</div>
<div class="modal-body">
<table class="table">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">路段</th>
<th scope="col">火災次數</th>
</tr>
</thead>
<tbody id="fullDataTable">
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
</body>
</html>