-
-
Notifications
You must be signed in to change notification settings - Fork 176
/
Copy pathindex.html
71 lines (71 loc) · 1.82 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>geolocation</title>
<link
rel="stylesheet"
href="https://unpkg.com/leaflet@1.7.1/dist/leaflet.css"
integrity="sha512-xodZBNTC5n17Xt2atTPuE1HxjVMSvLVW9ocqUKLsCC5CXdbqCmblAshOMAS6/keqq/sMZMZ19scR4PsZChSR7A=="
crossorigin=""
/>
<script
src="https://unpkg.com/leaflet@1.7.1/dist/leaflet.js"
integrity="sha512-XQoYMqMTK8LvdxXYG3nZ448hOEQiglfqkJs1NOQV44cWnUrBc8PkAOcXy20w0vlaXaVUearIOBhiXZ5V3ynxwA=="
crossorigin=""
></script>
<style>
html {
overflow-x: hidden;
}
#geo-map {
width: 600px;
height: 300px;
margin: 0 auto;
}
#geo-data {
display: flex;
flex-direction: row;
margin: 0 auto;
justify-content: space-evenly;
}
#geo-message {
text-align: center;
}
#geo-data div {
margin: 10px;
font-size: 20px;
}
.geo {
display: flex;
flex-direction: column;
justify-content: center;
width: 80vw;
margin: 10px auto;
}
#geo-btn {
width: 130px;
margin: 0 calc((100vw - 130px) / 2);
}
</style>
</head>
<body>
<div class="geo">
<div id="geo-data">
<div id="geo-long">
<span>longitude: </span>
</div>
<div id="geo-lat">
<span>latitude :</span>
</div>
</div>
<div id="geo-message">status: <span id="status">-</span></div>
</div>
<div id="geo-map"></div>
<br />
<button id="geo-btn">tampilkan data lokasi</button>
<script src="geolocation.js"></script>
</body>
</html>