-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEmergency.html
214 lines (177 loc) · 5.2 KB
/
Emergency.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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta charset="utf-8">
<title>Places Searchbox</title>
<style>
#map {
height: 73%;
}
html, body {
height: 100%;
margin: 0;
padding: 0;
}
#description {
font-family: Roboto;
font-size: 15px;
font-weight: 300;
}
#infowindow-content .title {
font-weight: bold;
}
#infowindow-content {
display: none;
}
#map #infowindow-content {
display: inline;
}
.pac-card {
margin: 20px 20px 0 0;
border-radius: 50px 0 0 50px;
box-sizing: border-box;
-moz-box-sizing: border-box;
outline: none;
box-shadow: 0 50px 25px rgba(0, 0, 0, 0.67);
background-color: rgba(21, 243, 232, 0.98);
font-family: Roboto;
}
#pac-container {
padding-bottom: 120px;
margin-right: 120px;
}
.pac-controls {
display: inline-block;
padding: 120px 120px;
}
.pac-controls label {
font-family: Roboto;
font-size: 130px;
font-weight: 500;
}
#pac-input {
background-color: rgb(13, 235, 216);
font-family: Roboto;
font-size: 15px;
font-weight: 500;
margin-left: 15px;
padding: 0 110px 0 130px;
text-overflow: ellipsis;
width: 900px;
}
#pac-input:focus {
border-color: #042C6D;
}
#title {
color: #15F7EB;
background-color: #1808EB;
font-size: 20px;
font-weight: 300;
padding: 6px 12px;
}
#target {
width: 345px;
}
.topnav {
overflow: hidden;
background-color: #333;
}
.topnav a {
margin-top: 30px;
float: right;
display: block;
color: #f2f2f2;
text-align: center;
padding: 14px 16px;
text-decoration: none;
font-size: 17px;
}
.topnav a:hover {
background-color: #008CBA;
color: black;
}
.button {
background-color: #008CBA;
border: none;
color: white;
padding: 15px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 28px;
margin-top: 10px;
}
.button:hover {
background-color: #1fb9ec;
}
</style>
</head>
<body>
<div class="topnav">
<img src="imgs/1.jpg" align="left" width="120" >
<a href="Emergency" align="center"><font size="6">Book Emergency</font></a>
<a href="Remedies.html" align="center"><font size="6">Home Remedies</font></a>
<a href="Doctors.html" align="center"><font size="6">Find doctor</font></a>
<a class="active" href="index.html" align="center"><font size="6">Home </font></a>
</div>
<input id="pac-input" class="controls" type="text" placeholder="Enter your current location ">
<div id="map"></div>
<script>
function initAutocomplete() {
var map = new google.maps.Map(document.getElementById('map'), {
center: {lat: -33.8688, lng: 151.2195},
zoom: 13,
mapTypeId: 'roadmap'
});
var input = document.getElementById('pac-input');
var searchBox = new google.maps.places.SearchBox(input);
map.controls[google.maps.ControlPosition.TOP_LEFT].push(input);
map.addListener('bounds_changed', function() {
searchBox.setBounds(map.getBounds());
});
var markers = [];
searchBox.addListener('places_changed', function() {
var places = searchBox.getPlaces();
if (places.length == 0) {
return;
}
markers.forEach(function(marker) {
marker.setMap(null);
});
markers = [];
var bounds = new google.maps.LatLngBounds();
places.forEach(function(place) {
if (!place.geometry) {
console.log("Returned place contains no geometry");
return;
}
var icon = {
url: place.icon,
size: new google.maps.Size(71, 71),
origin: new google.maps.Point(0, 0),
anchor: new google.maps.Point(17, 34),
scaledSize: new google.maps.Size(25, 25)
};
markers.push(new google.maps.Marker({
map: map,
icon: icon,
title: place.name,
position: place.geometry.location
}));
if (place.geometry.viewport) {
bounds.union(place.geometry.viewport);
} else {
bounds.extend(place.geometry.location);
}
});
map.fitBounds(bounds);
});
}
</script>
<script src="https://maps.googleapis.com/maps/api/js? key= AIzaSyDuC3uIyfEgD8YO7h6QM_NAva2fO9rykqQ&libraries=places&callback=initAutocomplete"async defer></script>
<center>
<a onclick="alert('Ambulance is on its way to your location.')" class="button" id="left">Call Ambulance</a>
</center>
</body>
</html>