-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
154 lines (137 loc) · 5.44 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
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
<!DOCTYPE html>
<html>
<head>
<title>Made Collection</title>
<meta charset="utf-8" />
<script type="text/javascript" src="js/polymaps.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
<link rel="shortcut icon" href="img/favicon.ico">
<link rel="stylesheet" href="css/styles.css" type="text/css" />
<link rel="stylesheet" href="css/counties2.css" type="text/css" />
</head>
<body onload="init();">
<div id="map"></div>
<script>
function init(){
var po = org.polymaps;
var map = po.map()
.container(document.getElementById("map").appendChild(po.svg("svg")))
.center({lat: 39, lon: -96})
.zoom(4.5)
.zoomRange([3, 7])
//.add(po.interact());
map.add(po.image()
.url(po.url("http://{S}tile.cloudmade.com"
+ "/1a1b06b230af4efdbb989ea99e9841af" // http://cloudmade.com/register
+ "/20760/256/{Z}/{X}/{Y}.png")
.hosts(["a.", "b.", "c.", ""])));
map.add(po.geoJson()
.url("http://polymaps.appspot.com/county/{Z}/{X}/{Y}.json")
.on("load", load)
.id("county"));
map.add(po.geoJson()
.url("http://polymaps.appspot.com/state/{Z}/{X}/{Y}.json")
.on("load", load)
.id("state"));
// san francisco
map.add(po.geoJson()
.features([{geometry: {coordinates: [-122.258, 37.805], type: "Point"}}])
.on("load", load)
.id("SF"));
// LA
map.add(po.geoJson()
.features([{geometry: {coordinates: [-118.243, 34.052], type: "Point"}}])
.on("load", load)
.id("LA"));
// denver
map.add(po.geoJson()
.features([{geometry: {coordinates: [-104.984, 39.737], type: "Point"}}])
.on("load", load)
.id("denver"));
// austin
map.add(po.geoJson()
.features([{geometry: {coordinates: [-97.743, 30.267], type: "Point"}}])
.on("load", load)
.id("austin"));
// portland
map.add(po.geoJson()
.features([{geometry: {coordinates: [-122.676, 45.523], type: "Point"}}])
.on("load", load)
.id("portland"));
// seattle
map.add(po.geoJson()
.features([{geometry: {coordinates: [-122.332, 47.606], type: "Point"}}])
.on("load", load)
.id("seattle"));
// NY
map.add(po.geoJson()
.features([{geometry: {coordinates: [-74.005, 40.714], type: "Point"}}])
.on("load", load)
.id("NY"));
// miami
map.add(po.geoJson()
.features([{geometry: {coordinates: [-80.226, 25.788], type: "Point"}}])
.on("load", load)
.id("miami"));
// chicago
map.add(po.geoJson()
.features([{geometry: {coordinates: [-87.629, 41.878], type: "Point"}}])
.on("load", load)
.id("chicago"));
map.add(po.layer(overlay)
.tile(false)
.id("madeCollection"));
map.add(po.layer(modal)
.tile(false)
.id("modal"));
map.add(po.compass()
.pan("none"));
function load(e) {
for (var i = 0; i < e.features.length; i++) {
var feature = e.features[i];
feature.element.setAttribute("id", feature.data.id);
}
}
/** A lightweight layer implementation for an image overlay. */
function overlay(tile, proj) {
proj = proj(tile);
var tl = proj.locationPoint({lon: -75.375, lat: 53.75}),
br = proj.locationPoint({lon: -75.375, lat: 53.75}),
image = tile.element = po.svg("image");
image.setAttribute("preserveAspectRatio", "none");
image.setAttribute("x", tl.x);
image.setAttribute("y", tl.y);
image.setAttribute("width", 300);
image.setAttribute("height", 169);
image.setAttributeNS("http://www.w3.org/1999/xlink", "href", "img/madeCollection.png");
}
function modal(tile, proj) {
proj = proj(tile);
var tl = proj.locationPoint({lon: -75.000, lat: 30.316}),
br = proj.locationPoint({lon: -75.000, lat: 30.316}),
image = tile.element = po.svg("image");
image.setAttribute("preserveAspectRatio", "none");
image.setAttribute("x", tl.x);
image.setAttribute("y", tl.y);
image.setAttribute("width", 300);
image.setAttribute("height", 169);
image.setAttributeNS("http://www.w3.org/1999/xlink", "href", "img/modal.png");
}
}
</script>
<!-- countdown clock -->
<div id="embed">
<embed src="http://flash-clocks.com/documents/countdown-clock.swf?targetName=Sonic+Boom+Ends+In%3A&dateString=2013.6.29|00:00:00&targetMessage=Today has come&textColor=ffffff&backAlpha=100&backColor=3ca6da" width=180px height=60px wmode="transparent" type="application/x-shockwave-flash">
</div>
<!-- sonic boom audio -->
<audio id="sonicBoom">
<source src="audio/sonicBoom.mp3"></source>
</audio>
<script>
var audio = $("#sonicBoom")[0];
$("#embed").mouseenter(function() {
audio.play();
});
</script>
</body>
</html>