Skip to content

Commit 31f316a

Browse files
committed
map and route
1 parent a34c61f commit 31f316a

9 files changed

+669
-223
lines changed

css/map_view.css

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
#map_id * {
2+
cursor: default;
3+
}
4+
#map_id {
5+
width: 900px;
6+
height: 300px;
7+
margin: 0;
8+
padding: 0;
9+
}
10+
#map_id .map_class, .map_class svg {
11+
position: absolute;
12+
}
13+
#map_id .map_class svg.map_marker {
14+
width: 10px;
15+
height: 10px;
16+
}
17+
#map_id .map_class svg.map_marker2 {
18+
width: 500px;
19+
height: 500px;
20+
}
21+
#map_id .map_class svg.map_marker.mouseon {
22+
width: 500px;
23+
height: 500px;
24+
}
25+
#map_id .map_stop {
26+
fill: gray;
27+
stroke: white;
28+
stroke-width: 1px;
29+
cursor: pointer !important;
30+
}
31+
#map_id .map_stop.fade {
32+
stroke: none;
33+
fill-opacity: 0.2;
34+
}
35+
#map_id .map_stop.mouseon {
36+
fill: red;
37+
fill-opacity: 1.0;
38+
}
39+
#map_id text.map_stop_info {
40+
font-size: 18px;
41+
}
42+
#map_id .map_stop_info {
43+
visibility: hidden;
44+
}
45+
#map_id .map_stop_info.mouseon {
46+
visibility: visible;
47+
}

css/route_view.css

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#route_id {
2+
font-family: Arial, sans-serif;
3+
font-size:10px;
4+
}
5+
#route_id .axis path, .axis line {
6+
fill: none;
7+
stroke:#b6b6b6;
8+
shape-rendering: crispEdges;
9+
}
10+
/*.tick line{fill:none;stroke:none;}*/
11+
#route_id .tick text {
12+
fill:#999;
13+
}
14+
#route_id g.journal.active {
15+
cursor:pointer;
16+
}
17+
#route_id text.label {
18+
font-size:12px;
19+
font-weight:bold;
20+
cursor:pointer;
21+
}
22+
#route_id text.value {
23+
font-size:12px;
24+
font-weight:bold;
25+
}

data/routes2.json

+201
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,201 @@
1+
[{"routes": ["Burruss Hall", "Hutcheson Hall", "War Memorial Hall", "Squires Ebnd", "Alumni Mall Ebnd", "Alumni Mall Wbnd", "Squires Wbnd", "Roanoke/Church Ebnd", "Roanoke/Wharton Ebnd", "Roanoke/Rutledge Ebnd", "Roanoke/Woolwine Ebnd", "Harding/Owens Ebnd", " Harding/Cork Ebnd", "Harding/Patrick Henry Ebnd", "Harding/Apperson Ebnd", "Harding/Vista Ebnd", "Harding/Roanoke Ebnd", "Ascot/Harding Ebnd", "Ascot/Hampton", "Ascot/Harding Wbnd", "Harding/Rucker Wbnd", "Harding/Sutton Wbnd", "Harding/Apperson Wbnd", "Harding/Patrick Henry Wbnd", "Harding/Cork Wbnd", "Roanoke/Woolwine Wbnd", "Roanoke/Rutledge Wbnd", "Roanoke/Wharton Wbnd", "Roanoke/Penn Wbnd", "Main/Roanoke Sbnd", "Main St Post Office"], "total": 31, "name": "Harding Ave"},
2+
3+
{"routes": ["Burruss Hall",
4+
"Davidson Hall",
5+
"West Campus/Perry Nbnd",
6+
"McBryde Hall",
7+
"Squires Wbnd",
8+
"Prices Fork/Old Glade Wbnd",
9+
"Vet School Wbnd",
10+
"Prices Fork/Plantation Wbnd",
11+
"Prices Fork/Huntington Wbnd",
12+
"Hethwood Square on Hethwood",
13+
"Tall Oaks/Hethwood Ebnd",
14+
"Tall Oaks/Foxhunt Ebnd",
15+
"Tall Oaks/Heather Ebnd",
16+
"Tall Oaks/Foxtrail Sbnd",
17+
"Stroubles Cr",
18+
"Tall Oaks/Foxridge Nbnd",
19+
"Tall Oaks/Copper Croft Nbnd",
20+
"Heather/Tall Oaks Nbnd",
21+
"Heather/Plymouth Nbnd",
22+
"Heather/Huntington Nbnd",
23+
"Prices Fork/Huntington Ebnd",
24+
"Prices Fork/Plantation Ebnd",
25+
"Vet School Ebnd",
26+
"Prices Fork/Old Glade Ebnd"], "total": 24, "name": "Hethwood"},
27+
28+
{"routes": ["Burruss Hall",
29+
"Alumni Mall Wbnd",
30+
"Squires Wbnd",
31+
"Litton Reaves Hall",
32+
"Overflow Lot Wbnd",
33+
"Oak Lane North",
34+
"Oak Lane South",
35+
"Overflow Lot Ebnd",
36+
"I Lot/Cage Sbnd",
37+
"Food Science Bldg",
38+
"McComas Hall",
39+
"Cassell Coliseum",
40+
"Tennis Courts",
41+
"Oak Lane Nbnd",
42+
"Bioinfomatics Bldg",
43+
"Life Sciences 1 Bldg",
44+
"Main/Lee Nbnd",
45+
"Main St Post Office"], "total": 18, "name": "Hokie Express"},
46+
47+
48+
{"routes": ["Squires Ebnd",
49+
"Alumni Mall Ebnd",
50+
"Alumni Mall Wbnd",
51+
"Squires Wbnd",
52+
"Main/Montgomery Nbnd",
53+
"Main/Lucas Nbnd S",
54+
"Lucas/Main Ebnd",
55+
"Lucas/Giles Ebnd",
56+
"Giles/Northview Nbnd",
57+
"Giles/Heights Nbnd",
58+
"Giles/Patrick Henry Nbnd",
59+
"Patrick Henry/Giles Wbnd",
60+
"Patrick Henry/Main Wbnd",
61+
"1500 North Main Nbnd",
62+
"Main/Giles Nbnd",
63+
"Main/Red Maple Nbnd",
64+
"Pheasant Run",
65+
"Seneca/Patrick Henry Sbnd",
66+
"Main/Patrick Henry Sbnd",
67+
"1200 North Main Sbnd",
68+
"Main/Northview Sbnd",
69+
"Main/Lucas Sbnd",
70+
"Main/Montgomery Sbnd",
71+
"Main/Kabrich Sbnd",
72+
"Main/Collegiate Ct Sbnd",
73+
"Main/Turner Sbnd",
74+
"1500 North Main Sbnd",
75+
"Patrick Henry/Seneca Wbnd",
76+
"Main/Turner Nbnd",
77+
"Main/Whipple Sbnd",
78+
"Red Maple/October Glory"], "total": 31, "name": "Main Street-North"},
79+
80+
{"routes": ["Squires Ebnd",
81+
"Alumni Mall Ebnd",
82+
"Alumni Mall Wbnd",
83+
"Squires Wbnd",
84+
"Main/Roanoke Sbnd",
85+
"Blacksburg Municipal Building",
86+
"Main/Eheart Sbnd",
87+
"Main/Eakin Sbnd",
88+
"Main/Edgewood Sbnd",
89+
"Main/Airport Sbnd",
90+
"Main/Faystone Sbnd",
91+
"Gables Shopping Center",
92+
"Main/Landsdowne Sbnd",
93+
"Fairfax/Ellett Ebnd",
94+
"Fairfax/New Kent Ebnd",
95+
"New Kent/Loudon Ebnd",
96+
"New Kent/Sussex Ebnd",
97+
"Grissom/Nellies Cave Nbnd",
98+
"Marlington/Grissom Wbnd",
99+
"Marlington/Emerald Wbnd",
100+
"Marlington/Grayland Wbnd",
101+
"Marlington/Main Wbnd",
102+
"Main/Landsdowne Nbnd",
103+
"Main/Ardmore Nbnd",
104+
"Blacksburg Square",
105+
"Main/Cohee Nbnd",
106+
"Main/Sunset Nbnd",
107+
"Main/Graves Nbnd",
108+
"Main/Hemlock Nbnd",
109+
"Main/Eakin Nbnd",
110+
"Main/Clay Nbnd",
111+
"Main/Lee Nbnd",
112+
"Main St Post Office",
113+
"Marlington/Grayland Ebnd",
114+
"Marlington/Emerald Ebnd",
115+
"Grissom/Nellies Cave Sbnd",
116+
"New Kent/Sussex Wbnd",
117+
"New Kent/Loudon Wbnd",
118+
"Fairfax/Ellett Wbnd",
119+
"Main/Hemlock Sbnd"], "total": 40, "name": "Main Street-South"},
120+
121+
{"routes": ["Newman Library",
122+
"Old Security Bldg",
123+
"Stanger/Perry Nbnd",
124+
"Torgersen Hall",
125+
"Wright House",
126+
"Litton Reaves Hall",
127+
"McComas Hall",
128+
"Cassell Coliseum",
129+
"Tennis Courts",
130+
"Progress/Broce Nbnd",
131+
"Progress/University Terr Nbnd",
132+
"Progress/Patrick Henry Nbnd",
133+
"The Village on Patrick Henry Wbnd",
134+
"Patrick Henry/Toms Creek Wbnd",
135+
"University City/Toms Creek Wbnd",
136+
"Shawnee on University City Wbnd",
137+
"Shawnee on University City Sbnd",
138+
"University City/Broce Sbnd",
139+
"University City/Glade Sbnd",
140+
"University Mall Sbnd",
141+
"Prices Fork/Turner Ebnd",
142+
"Progress/Watson Nbnd"], "total": 22, "name": "Toms Creek"},
143+
144+
{"routes": ["Burruss Hall",
145+
"Davidson Hall",
146+
"West Campus/Perry Nbnd",
147+
"Alumni Mall Wbnd",
148+
"Squires Wbnd",
149+
"Toms Creek/Winston Nbnd",
150+
"Gilbert Linkous Nbnd",
151+
"Toms Creek/Watson Nbnd",
152+
"Toms Creek/McBryde Nbnd",
153+
"Patrick Henry/Toms Creek Ebnd",
154+
"The Village on Patrick Henry Ebnd",
155+
"Patrick Henry/Progress Ebnd",
156+
"Progress/Hunt Club Sbnd",
157+
"Progress/University Terr Sbnd",
158+
"Progress/Broce Sbnd",
159+
"Toms Creek/Hunt Club Nbnd",
160+
"Progress/Watson Sbnd",
161+
"Main/Kabrich Sbnd",
162+
"Main/Collegiate Ct Sbnd",
163+
"Main/Turner Sbnd"], "total": 20, "name": "Toms Creek B"},
164+
165+
{"routes": ["Squires Ebnd",
166+
"Main/Roanoke Sbnd",
167+
"Main/Landsdowne Sbnd",
168+
"Main/Ardmore Nbnd",
169+
"Main St Post Office",
170+
"New River Valley Mall",
171+
"NRV Theatre",
172+
"Wal Mart",
173+
"Laurel/Sycamore",
174+
"Laurel/Peppers Ferry",
175+
"DMV on Arbor",
176+
"Post Office on Arbor",
177+
"Arbor/Market",
178+
"Shoppers Way"], "total": 14, "name": "Two Town Trolley"},
179+
180+
{"routes": ["Burruss Hall",
181+
"Davidson Hall",
182+
"West Campus/Perry Nbnd",
183+
"Alumni Mall Wbnd",
184+
"Squires Wbnd",
185+
"University Mall Nbnd",
186+
"University City/Glade Nbnd",
187+
"University City/Broce Nbnd",
188+
"Shawnee on University City Nbnd",
189+
"Shawnee on University City Ebnd",
190+
"University City/Falcon Ebnd",
191+
"University City/Toms Creek Ebnd",
192+
"Patrick Henry/Toms Creek Ebnd",
193+
"The Village on Patrick Henry Ebnd",
194+
"Patrick Henry/Progress Ebnd",
195+
"Progress/Hunt Club Sbnd",
196+
"Progress/University Terr Sbnd",
197+
"Progress/Broce Sbnd",
198+
"Progress/Watson Sbnd",
199+
"Main/Kabrich Sbnd",
200+
"Main/Collegiate Ct Sbnd",
201+
"Main/Turner Sbnd"], "total": 22, "name": "University City Boulevard"}]

demo/index.html

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2+
<html xmlns="http://www.w3.org/1999/xhtml">
3+
4+
<head>
5+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6+
<link rel="stylesheet" type="text/css" href="../css/map_view.css">
7+
<link rel="stylesheet" type="text/css" href="../css/route_view.css">
8+
</head>
9+
10+
<body>
11+
<div id="map_id"></div>
12+
<div id="route_id"></div>
13+
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>
14+
<script type="text/javascript" src="../d3.v3/d3.v3.js"></script>
15+
<script type="text/javascript" src="../js/map_view.js"></script>
16+
<script type="text/javascript" src="../js/route_view.js"></script>
17+
</body>
18+
19+
</html>

0 commit comments

Comments
 (0)