-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
208 lines (187 loc) · 9.63 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
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
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
<!DOCTYPE html>
<html>
<head>
<title>Saint Louis University Information Map</title>
<meta id="view" name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<link rel="icon" href="images/map.png" />
<link rel="stylesheet" href="css/fonts.css" />
<link rel="stylesheet" href="css/style.css" />
<link rel="stylesheet" href="css/map-svg-related.css" />
<script type="text/javascript" src="mapdata/full.js"></script>
<script type="text/javascript">
var setgate = null;
function saveInitialSettings(state) {
var initial = {};
initial.Settings = {};
initial.Settings.mode = "0";
initial.Settings.gate = "0";
initial.Settings.entry = true;
initial.Settings.zoom = 100;
initial.Settings.filter = true;
initial.Settings.bfilter = "0";
initial.Settings.ffilter = "0";
initial.Settings.rfilter = "0";
if (!state) {
initial.Settings.mode = "1";
initial.Settings.gate = "" + setgate;
}
localStorage.setItem("settings", JSON.stringify(initial));
}
</script>
<script type="text/javascript" src="js/interactions.js"></script>
<script type="text/javascript" src="js/mapdata.js"></script>
<script type="text/javascript">
if (!onlineMode) {
for (let i = 0; i < dataSources.length; ++i) {
loadDataFromLS(dataSources[0]);
}
}
</script>
</head>
<body>
<script type="text/javascript">
if (localStorage.getItem("setupdone") != undefined) {
let style = document.createElement("style");
style.innerText = "html body div#setup {display: none };";
document.getElementsByTagName("head")[0].appendChild(style);
document.getElementsByTagName("body")[0].setAttribute("style", "overflow: visible;");
}
</script>
<div id="bar">
<input type="image" src="images/settings.png" title="Settings" alt="Settings" onclick="showSettings();" />
<input type="image" src="images/minus.png" title="Zoom Out" alt="-" onclick="magnify(false);" />
<input type="image" src="images/plus.png" title="Zoom In" alt="+" onclick="magnify(true);" />
<input id="zoom" type="text" value="100%" disabled />
<input
type="image"
src="images/github.png"
title="Visit Repository"
alt="Repository"
onclick="window.open('https://github.com/polcats/InteractiveMap')"
id="github"
/>
</div>
<div id="options">
<form id="activeform">
<div class="twocolumns">
<h3 class="first">Mode</h3>
<select class="second" name="active" id="active" onchange="switchActiveMode();">
<option value="0">Building-to-Building Paths </option>
<option value="1">Gate-to-Building Paths</option>
<option value="2">Building Details </option>
</select>
<div class="clear"></div>
</div>
<div class="twocolumns">
<h3 class="first">Gate</h3>
<select class="second" name="gates" id="gates" onchange="changeGate();" disabled> </select>
<div class="clear"></div>
</div>
<div id="cboxcontainer">
<input id="entry" class="checkbox-custom" name="entry" type="checkbox" onclick="entryPointsInteraction();" checked="true" />
<label for="entry" class="checkbox-custom-label">Entry Points</label>
<div class="clear"></div>
<input id="filter" class="checkbox-custom" name="filter" type="checkbox" onclick="interestPointsInteraction();" checked="true" />
<label for="filter" class="checkbox-custom-label">Points of Interests</label>
</div>
<div class="twocolumns">
<h3 class="first">Building</h3>
<select disabled class="second" name="mainfilter" id="filterbldg" onchange="buildingFilter = this.selectedIndex;"> </select>
<div class="clear"></div>
</div>
<div class="twocolumns">
<h3 class="first">Floor</h3>
<select disabled class="second" name="mainfilter" id="filterfloor" onchange="floorFilter = this.selectedIndex;"> </select>
<div class="clear"></div>
</div>
<div class="twocolumns">
<h3 class="first">Type</h3>
<select disabled class="second" name="mainfilter" id="filterroom" onchange="roomFilter = this.selectedIndex;"> </select>
<div class="clear"></div>
</div>
<input
id="save"
class="dismiss"
type="button"
value="Save"
onclick="saveSettings(); this.parentElement.parentElement.removeAttribute('style');"
/>
<input class="dismiss" type="button" value="Cancel" onclick="this.parentElement.parentElement.removeAttribute('style');" />
</form>
</div>
<div id="mapcontainer">
<svg id="map"></svg>
</div>
<!-- display:none in style.css-->
<div id="details">
<h1 id="head"> </h1>
<div id="content"></div>
<div id="textcontainer">
<textarea id="text" class="note" disabled></textarea>
<textarea id="desc" class="desc" disabled></textarea>
<input type="button" value="Edit" class="edit" onclick="notes(0); this.parentNode.childNodes[1].removeAttribute('disabled');" />
<input
type="button"
value="Save"
class="save"
onclick="notes(1); this.parentNode.childNodes[1].setAttribute('disabled', 'disabled');"
/>
</div>
<input type="button" value="Close" id="dismiss" onclick="this.parentNode.removeAttribute('style');" />
</div>
<div id="setup">
<div id="content" style="display: table-cell; vertical-align: middle;">
<img src="images/logo.png" alt="logo of slu infomap" id="logo" />
<input type="button" value="PROCEED" id="proceed" onclick="setUp('0', '1');" />
</div>
</div>
<div id="gateselection" style="display: none;">
<form id="gateform">
<div class="choice">
<input id="radio-1" class="radio-custom" name="radio-group" type="radio" />
<label for="radio-1" class="radio-custom-label" onclick="setgate=0">
<span>Main Gate</span>
<img src="images/0.jpg" alt="Main Gate" title="Main Gate" />
</label>
</div>
<div class="choice">
<input id="radio-3" class="radio-custom" name="radio-group" type="radio" />
<label for="radio-3" class="radio-custom-label" onclick="setgate=1">
<span>Gate 4</span>
<img src="images/4.jpg" alt="Gate 4" title="Gate 4" />
</label>
</div>
<div class="choice">
<input id="radio-2" class="radio-custom" name="radio-group" type="radio" />
<label for="radio-2" class="radio-custom-label" onclick="setgate=2">
<span>Gate 5</span>
<img src="images/5.jpg" alt="Gate 5" title="Gate 3" />
</label>
</div>
<div class="choice">
<input id="radio-4" class="radio-custom" name="radio-group" type="radio" />
<label for="radio-4" class="radio-custom-label" onclick="setgate=3">
<span>Gate 6</span>
<img src="images/6.jpg" alt="Gate 6" title="Gate 6" />
</label>
</div>
</form>
<div id="space"></div>
<input type="button" value="PROCEED" id="proceed" onclick="setUp(4, 1); saveInitialSettings(true);" />
</div>
<script type="text/javascript">
window.onload = function() {
try {
initializeMainSVG(MapData["mapwidth"], MapData["mapheight"], "map", "mapcontainer");
generateStructures(MapData["Structures"]);
generateEntries(Entries["Points"]);
generatePointsOfInterests(PointsOfInterest["Points"]);
generateLabels(Labels["Labels"]);
generateGates(Paths["Gates"]);
generateFilters(PointsOfInterest["BuildingFilters"], PointsOfInterest["FloorFilters"], PointsOfInterest["RoomFilters"]);
loadSettings();
} catch (e) {}
};
</script>
</body>
</html>