-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmap.html
More file actions
120 lines (73 loc) · 2.77 KB
/
Copy pathmap.html
File metadata and controls
120 lines (73 loc) · 2.77 KB
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<html>
<head>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.3.4/dist/leaflet.css" />
<script src="https://unpkg.com/leaflet@1.3.4/dist/leaflet.js"></script>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="styles.css">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<title>Fake Love</title>
</head>
<body>
<nav role="navigation">
<div id="menuToggle">
<input type="checkbox" />
<span></span>
<span></span>
<span></span>
<ul id="menu">
<a href="index.html">
<li>Home</li>
</a>
<a href="info.html">
<li>About Elipse</li>
</a>
<a href="index2.html" target="index2.html">
<li>When is the next eclipse?</li>
</a>
<a href="map.html" target="map.html">
<li>Map</li>
</a>
<a href="count.html" target="count.html">
<li>Countdown</li>
</a>
</ul>
</div>
</nav>
<div class="w3-container">
<img src="banner.jpg" alt="" style="padding:inherit; width:104%; margin-left:-2%">
</div>
</br>
</br>
<center>
Latitude: <input type="text" name="lat" id="lat" />
Longitude: <input type="text" name="lng" id="lng" />
<input type="button" onclick="zoomTo()" value="Esketit" class="w3-button w3-round-xxlarge"/>
<br />
</br>
<br />
</br><br />
<div id="mapid" style="height: 500px"></div>
</center>
<script>
var map = L.map('mapid').setView([51.505, -0.09], 13);
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
}).addTo(map);
function zoomTo() {
var lat = document.getElementById("lat").value;
var lng = document.getElementById("lng").value;
var my_icon = L.icon({
iconUrl: 'cat.png',
iconSize: [84, 77],
iconAnchor: [22, 94],
popupAnchor: [-3, -76]
});
var zoom = 10;
var marker = L.marker([lat, lng], {icon: my_icon}).addTo(map);
map.setView([lat, lng], zoom);
}
</script>
</body>
</html>