-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
executable file
·179 lines (162 loc) · 4.34 KB
/
index.html
File metadata and controls
executable file
·179 lines (162 loc) · 4.34 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
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
<!DOCTYPE HTML>
<html>
<head>
<title>Old Driver</title>
<meta charset=UTF-8 />
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDPrFpCwh0H_yt_FrA-K_RRphfLofFf7J4&sensor=false">
</script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script type="text/javascript" src="stylemap.js"></script>
<script type="text/javascript" src="papaparse.min.js"></script>
<script type="text/javascript" src="game.js"></script>
<script type="text/javascript" src="apicaller.js"></script>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Raleway">
</head>
<style type="text/css">
#overlay-container {
position: absolute;
top: 8px; left: 8px;
width: 98%;
/*height: 500px;*/
min-height: 100%;
/*border: 3px solid #73AD21;*/
/*display: none;*/
pointer-events: none;
background: none !important;
}
button {
pointer-events: auto;
}
.widge {
position: relative;
top: 20px;
left: 20px;
width: 150px;
height: 400px;
/*max-width: 20%;*/
min-width: 50px;
/*max-height: 400px;*/
/*border: 3px solid #73AD21;*/
}
.bottom-left {
position: relative;
bottom: -5px;
left: 20px;
width: 150px;
/*height: 100px;*/
}
.style-panel {
/*vertical-align: middle;*/
/*width: 200px;*/
/*width: 80%;*/
/* padding-top: 10px;
padding-bottom: 10px: */
margin-top: 10px;
height: 100px;
background-color: #333333;
opacity: 0.75;
border-radius: 10px;
}
#googleMap {
width: 100%;
/*min-height: 100%;*/
height: 750px;
}
#logo {
/*Todo: middle*/
height: 100px;
width: 100px;
/*padding: 10px;*/
}
.text-panel {
box-sizing: content-box;
padding: 5%;
padding-left: 12%;
padding-right: 12%;
color: white;
font-family: "Raleway", sans-serif;
font-style: bold;
text-align: center;
font-size: 18px;
}
.text-variable {
box-sizing: content-box;
padding-top: 0%;
padding-left: 2%;
padding-right: 2%;
color: white;
font-family: "Raleway", sans-serif;
font-style: bold;
text-align: center;
font-size: 18px;
}
.bottom {
margin-top: 3px;
height: 40px;
padding-top: 10px;
font-size: 14px;
}
.up {
height: 100px;
}
</style>
<body>
<!-- <input type="file" id="csv-file" name="files" /> -->
<div id="googleMap"></div>
<div id="overlay-container">
<div class="widge">
<img id="logo" src="images/Logo.png">
<div class="style-panel up text-panel" style="display: none">
<!-- You are at Union Square -->
<div class="text-panel">You are at</div>
<div id="current-place" class="text-variable">a</div>
<div id="current-location" class="text-variable">b</div>
</div>
<div class="style-panel up" id="desired-location">
<div class="text-panel" style="font-size: 14px">Where do you want to pick up?</div>
<div id="dest-location" class="text-variable" style="font-size: 14px;display: none">c</div>
<button style="position:relative;padding-left: 5%;background-color: white;color:black;border:none;margin-left: 18px" onclick="turnOnFlag()">Click on the Map</button>
</div>
</div>
<div class="bottom-left">
<div class="style-panel text-panel bottom" id="timer2"></div>
<div class="style-panel text-panel bottom" id="timer"></div>
<div class="style-panel text-panel bottom" id="warring"></div>
<div class="style-panel text-panel bottom" id="money" style="font-size: 10px"></div>
</div>
</div>
</body>
<script type="text/javascript">
var input = document.querySelector('input');
var data;
var isListeningClick = false;
function turnOnFlag() {
//To enable choose pick-up location
isListeningClick = true;
}
function handleFileSelect(evt) {
var file = evt.target.files[0];
Papa.parse(file, {
//page will stay reactive when uploading
worker: true,
//a step callback to receive the results row-by-row
// step: function(row) {
// // console.log("Row:", row.data);
// },
//includ header in Json
header: true,
//parse to numeric and boolean formats
dynamicTyping: true,
//The callback to execute when parsing is complete.
complete: function(results, file) {
console.log(results);
savetodata(results.data);
}
});
}
$(document).ready(function() {
$("#csv-file").change(handleFileSelect);
});
</script>
</html>