-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathlive_maps.html
109 lines (82 loc) · 4.33 KB
/
live_maps.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
98
99
100
101
102
103
104
105
106
107
108
109
<!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>Care-A-Lot (Live Map)</title>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="services.html">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.0/dist/css/bootstrap.min.css">
<link rel = "icon" href = "img/healthcare.png">
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css"rel="stylesheet"/>
<link href="https://cdnjs.cloudflare.com/ajax/libs/mdb-ui-kit/3.6.0/mdb.min.css" rel="stylesheet"/>
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap"rel="stylesheet"/>
<script type="text/javascript"src="https://cdnjs.cloudflare.com/ajax/libs/mdb-ui-kit/3.6.0/mdb.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.0/dist/js/bootstrap.bundle.min.js"></script>
<link rel="stylesheet" href="https://pro.fontawesome.com/releases/v5.10.0/css/all.css" integrity="sha384-AYmEC3Yw5cVb3ZcuHtOA93w35dYTsvhLPVnYs9eStHfGJvOvKxVfELGroGkvsg+p" crossorigin="anonymous"/>
<link rel="icon" href="healthcare.png">
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-light fixed-top h-color" style="height:80px;">
<div class="container">
<a class="navbar-brand" href="#" style="color:white; font-size:30px;font-weight:bold;font-family:Roboto;position:absolute;left:20px;">Care-A-Lot</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav ms-auto">
<div class="video__icon">
<a href="live_maps.html"><div class="circle--outer"></div></a>
<a href="live_maps.html"><div class="circle--inner"></div></a>
<a href="live_maps.html"> <p style="font-size: 15px;font-weight:bolder;">LIVE</p></a>
</div>
<li class="nav-item active ">
<a class="nav-link" href="index.html" style="color:white;font-size:20px;position:relative;left:70px">Home</a>
</li>
<li class="nav-item">
<a class="nav-link " href="#" style="color:white;font-size:20px;position:relative;left:90px;">About</a>
</li>
<li class="nav-item">
<a class="nav-link" href="login.html" style="color:white;font-size:20px;position:relative;left:110px;">Services</a>
</li>
<li class="nav-item">
<a class="nav-link" href="contact.html" style="color:white;font-size:20px;position:relative;left:130px;">Contact</a>
</li>
<li class="nav-item">
<a href="login.html" style="position:relative;left:150px;"><i class="fas fa-user-plus fa-3x " style="color:rgb(255, 255, 255);"></i></a>
</li>
</ul>
</div>
</div>
</nav>
<div class="map"></div>
</body>
<script>
const map = document.querySelector(".map")
// const default_lat = 33;
// const default_long = 70;
// const default_zoom = 1;
getLocation();
function getLocation(){
if(navigator.geolocation){
navigator.geolocation.getCurrentPosition(success, fail);
} else{
alert("Geolocation is not supported by this browser!");
}
}
function success(position){
const longitude = position.coords.longitude;
const latitude = position.coords.latitude;
// console.log(latitude, longitude);
map.insertAdjacentHTML('afterend', `
<iframe src="https://www.ventusky.com/?p=${latitude};${longitude};10&l=temperature-2m" width="100%", height=920">
</iframe>
`);
}
function fail(){
alert("Please allow the browser to access your location!!");
location.reload();
}
</script>
</html>