-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.html
193 lines (168 loc) · 8.53 KB
/
main.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
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>
That ain't my ticket!
</title>
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Raleway:200">
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.6.0/pure-min.css">
<link rel="stylesheet" href="style.css">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!--[if lte IE 8]>
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.6.0/grids-responsive-old-ie-min.css">
<![endif]-->
<!--[if gt IE 8]><!-->
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.6.0/grids-responsive-min.css">
<!--<![endif]-->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="/home/kivy/react-tutorial/move.js/move.js"></script>
<script src="printDirections.js"></script>
<script src= "geo.js"> </script>
<head>
<body>
<div class="pure-g">
<h1 class="pure-u-1-3 pure-u-md-1-3" id="web_name"> Tick2Court </h1>
<p class="pure-u-2-3 pure-u-md-2-3" id="top_text">
Type in the address of where you got pulled over, and we will find the locations of its corresponding court
</p>
<br />
<br />
<hr>
<div id="address_box_buffer" class="pure-u-1-6">
</div id="displaybox"> <!-- sketchy code. DONOT FIX! BREAKS EVERYTHING! -->
<div id="address_box" class="pure-u-2-3">
<p id="form_text" class="pure-u-1">
Type in the address where you got the ticket
</p>
<form class="pure-form pure-g" method="post">
<input id="address" class="pure-input-2-3" type="text" placeholder="Street Address" required>
<button class="pure-button pure-input-1-3" onclick="changeDisplay()" id="submit">
<i class="fa fa-gavel"></i>
</button>
</form>
</div>
<hr>
<div class="hide" id="popup">
<div class="pure-u-1">
<h3> Court in charge of inputted address <h3>
</div>
<div id="courts" class="pure-u-1-2">
<div id="courtInfo" class="pure-u-1">
<div id="courtName"> City of Clayton Municipal Court </div>
<div id="courtAddress">S Brentwood Blvd </div>
<div id="courtPhone">314-290-8441</div>
<a id="siteLink" href="">
<div>Visit Website</div>
</a>
</div>
<div id="directions" class="">
<br />
<button id="printDirections" class="pure-button"> Get Directions </button>
</div>
<br />
</div>
<div id="map" class="pure-u-1-2">
<!--
<div id='Lat0' value="" hidden></div>
<div id='Lng0' value="" hidden></div>
<div id='Lat1' value="" hidden></div>
<div id='Lng1' value="" hidden></div>
-->
</div>
<!--
<b>Legal Services</b>
<br />
We recommend <a href="http://www.lsem.org/">Legal Services of Eastern Missouri</a>
<br />
If you cannot afford a lawyer, they may be able to find a volunteer
<br />
<a href="tel:+1-800-444-0514">1-800-444-0514</a>
<br />
Hours: Monday-Thursday 8:30 AM-3:30 PM
<br />
Fridays 1:30 PM-3:30 PM
<br>
Please note if emergency
-->
</div>
</div>
</div>
</div>
<div id="box" class="pure-u-1 pure-md-1"> df</div>
<script src="/home/kivy/react-tutorial/move.js/move.js">
move('#box')
.y(200)
.duration('3s')
.end();
</script>
<script>
// Note: This example requires that you consent to location sharing when
// prompted by your browser. If you see the error "The Geolocation service
// failed.", it means you probably did not give permission for the browser to
// locate you.
//document.getElementById('submit').addEventListener('click', initMap);
var myX;
var myY;
var pos = {
lat: 38.627003,
lng: -90.199404
};
function initMap() {
console.log("map init");
var map = new google.maps.Map(document.getElementById('map'), {
center: {lat: 38.627003, lng: -90.199404},
zoom: 15
});
var infoWindow = new google.maps.InfoWindow({map: map});
// Try HTML5 geolocation.
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function(position) {
infoWindow.setPosition(pos);
infoWindow.setContent("here"); //Make name of
map.setCenter(pos);
}, function() {
handleLocationError(true, infoWindow, map.getCenter());
});
} else {
// Browser doesn't support Geolocation
handleLocationError(false, infoWindow, map.getCenter());
}
}
function initMap_new(x, y) {
pos = {
lat: x,
lng: y
}
console.log("map init");
var map = new google.maps.Map(document.getElementById('map'), {
center: {lat: x, lng: y},
zoom: 15
});
var infoWindow = new google.maps.InfoWindow({map: map});
// Try HTML5 geolocation.
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function(position) {
infoWindow.setPosition(pos);
infoWindow.setContent("here"); //Make name of
map.setCenter(pos);
}, function() {
handleLocationError(true, infoWindow, map.getCenter());
});
} else {
// Browser doesn't support Geolocation
handleLocationError(false, infoWindow, map.getCenter());
}
}
function handleLocationError(browserHasGeolocation, infoWindow, pos) {
infoWindow.setPosition(pos);
infoWindow.setContent(browserHasGeolocation ?
'Error: The Geolocation service failed.' :
'Error: Your browser doesn\'t support geolocation.');
}
</script>
<script src="https://maps.googleapis.com/maps/api/js?key=&signed_in=true&callback=initMap" async defer>
</script>
</body>
</html>