forked from trwstin/NextStop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
45 lines (35 loc) · 1.38 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
<!DOCTYPE html>
<html lang="en">
<head>
<title>GetMeOff</title>
<link rel="icon" type="image/x-icon" href="/assets/favicon.ico">
<link rel="stylesheet" href="styles.css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<img src="assets\logo_text.png" alt="Logo" class="logo">
<div class="Input">
<input type="text" placeholder="Enter Destination..." id='location-input' name="search" class="Input-text">
</div>
<button class="btn" onclick="redirect()">START JOURNEY</button>
<script>
function redirect() {
var input = document.getElementById('location-input').value;
localStorage.setItem('location', input);
location.replace("/travel.html");
}
let autocomplete;
function initAutocomplete() {
autocomplete = new google.maps.places.Autocomplete(
document.getElementById('location-input'),
{
types:['establishment'],
componentRestrictions: {'country':['SG']},
fields: ['placed_id', 'geometry', 'name']
}
);
}
</script>
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDK2q8iY-IOGHbjem0sG4X2CVycs04UYj8&libraries=places&callback=initAutocomplete" async defer></script>
</body>
</html>