-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex3.html
60 lines (45 loc) · 1.42 KB
/
index3.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
<!DOCTYPE html>
<meta charset="utf-8">
<body>
<p style="text-align: center">Place the red circle on the
<strong>most</strong> uncertain object on the map, then press enter.</p>
<div id='js-geojson-example'></div>
<script src="js/jquery.js"></script>
<script src="js/d3.js"></script>
<script src="js/common.js"></script>
<script src="js/js.cookie.js"></script>
<link rel="stylesheet" href="css/style.css" />
<script>
$(document).ready(function() {
$('body').keypress(function(e) {
if (e.keyCode == 13) {
window.location.href = "index4_intro.html";
}
});
});
// load the car data
d3.json("Data/car.json", function(carjson) {
var cardata = randomize(carjson);
$.post("server.py", {
session: Cookies.get('session'),
data: JSON.stringify(cardata),
page: "3"
}, function(data) {
console.log("file written");
});
car.selectAll('path')
.data(cardata.features)
.enter()
.append('svg:circle')
.attr("transform", function(d) {
return "translate(" + projection(d.geometry.coordinates) + ")";
})
.attr('r', function(d) {
return radius(d.properties.accuracy);
})
.attr('fill-opacity', function(d) {
return opacity(d.properties.accuracy);
});
});
</script>
</body>