-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
358 lines (225 loc) · 9.79 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
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
<!DOCTYPE html>
<html>
<script src="js/jquery/1.10.2/jquery-1.10.2.min.js"></script>
<script src="js/jquery/1.10.3/jquery-ui.min.js"></script>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<script src="http://cdn.leafletjs.com/leaflet-0.7.2/leaflet.js"></script>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.2/leaflet.css" />
<script src='https://api.tiles.mapbox.com/mapbox.js/v2.1.4/mapbox.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox.js/v2.1.4/mapbox.css' rel='stylesheet' />
<script src='https://api.tiles.mapbox.com/mapbox.js/plugins/leaflet-omnivore/v0.2.0/leaflet-omnivore.min.js'></script>
<script src='https://api.tiles.mapbox.com/mapbox.js/plugins/leaflet-label/v0.2.1/leaflet.label.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox.js/plugins/leaflet-label/v0.2.1/leaflet.label.css' rel='stylesheet' />
<script src='https://api.tiles.mapbox.com/mapbox.js/plugins/leaflet-minimap/v1.0.0/Control.MiniMap.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox.js/plugins/leaflet-minimap/v1.0.0/Control.MiniMap.css' rel='stylesheet' />
<script src="js/jQRangeSlider/lib/jquery.mousewheel.min.js"></script>
<script src="js/jQRangeSlider/jQRangeSlider-min.js"></script>
<!--<script src="js/jQRangeSlider/jQDateRangeSlider-min.js"></script>-->
<script src="js/jQRangeSlider/jQAllRangeSliders-withRuler-min.js"></script>
<link rel="stylesheet" id="themeCSS" href="js/jQRangeSlider/css/iThing.css">
<script src="js/jquery-sparql/jquery.sparql.js"></script>
<link href='https://api.tiles.mapbox.com/mapbox.js/plugins/leaflet-draw/v0.2.2/leaflet.draw.css' rel='stylesheet' />
<script src='https://api.tiles.mapbox.com/mapbox.js/plugins/leaflet-draw/v0.2.2/leaflet.draw.js'></script>
<script src="js/constants.js"></script>
<script src="js/query.js"></script>
<script src="js/map.js"></script>
<script src="js/util.js"></script>
<script src="js/slider.js"></script>
<script src="js/Window.js"></script>
<script src="js/FilterResults.js"></script>
<script src='js/spin.js'></script>
<script type="text/javascript">
var opts = {
lines: 13, // The number of lines to draw
length: 20, // The length of each line
width: 10, // The line thickness
radius: 30, // The radius of the inner circle
corners: 1, // Corner roundness (0..1)
rotate: 0, // The rotation offset
direction: 1, // 1: clockwise, -1: counterclockwise
color: '#000', // #rgb or #rrggbb or array of colors
speed: 1, // Rounds per second
trail: 60, // Afterglow percentage
shadow: false, // Whether to render a shadow
hwaccel: false, // Whether to use hardware acceleration
className: 'spinner', // The CSS class to assign to the spinner
zIndex: 2e9, // The z-index (defaults to 2000000000)
top: '50%', // Top position relative to parent
left: '50%' // Left position relative to parent
};
</script>
<link rel="stylesheet" href="css/bootstrap.min.css" />
<link href="css/historicmaps-style.css" rel="stylesheet">
<html>
<head>
<title>Historic Maps Search</title>
</head>
<body onLoad="javascript:init();">
<div id ="main">
<div id="header">
<div id="logox"><img src="http://sammlungen.ulb.uni-muenster.de/domainimage/wwu_logo.gif"><br>
<span>Karten Portal</span></div>
<div id="search">
<input type="text" size="50 "id="searchField" class="form-control" placeholder="Detailsuche...">
<input id="searchButton" class="btn btn-default dropdown-toggle" type="button" name="btnSearch" value="Suchen" onclick="executeQuery(0)">
<br>
<div id="slider"></div>
</div>
<div id="logoy">
<a target="_blank" href="https://github.com/ifgi/historicmaps-search" title="Source Code" style="padding-right:15px" ><img src="img/github.png" width="30px" height="30px"></a>
<a target="_blank" href="http://www.uni-muenster.de/Geoinformatics/research/projects/lodum.html" title="Linked Open Data University of Münster"><img src="img/rdf.png" width="28px" height="30px"></a>
<a target="_blank" href="http://ulb.uni-muenster.de/" title="Universitäts- und Landesbibliothek Münster"><img src="img/ulb.png" width="30px" height="30px"></a>
<a target="_blank" href="http://ifgi.uni-muenster.de" title="Institut für Geoinformatik"><img src="img/ifgi.png" width="25px" height="30px"></a>
</div>
</div>
<div id="github"></div>
<div id="toolbar">
<div id="mapheader">.</div>
<div id="status">
</div>
</div>
<div id="display">
<div id="properties">
<b><br></b><button id="btnProperties" onclick="executeQuery(0)" class="btn btn-default dropdown-toggle">Set Properties</button><br><br><br>
</div>
<div id="map">
<div id="zoom" class="custom-buttons">
<a href='#' class='active' ><img id="imgZoom" value="off" title ="Disable automatic zoom to map area" src="img/locked.png"></a>
</div>
<div id="predicates" class="custom-buttons">
<a href='#' value="on" class='active' ><img id="imgPredicates" value="off" title ="Show RDF properties list" src="img/predicates.png"></a>
</div>
<div id="bbox" class="custom-buttons">
<a href='#' value="on" class='active' ><img id="imgBBOX" value="off" title ="Apply spatial filter to current map view" src="img/bbox.png"></a>
</div>
<div id="resetview" class="custom-buttons">
<a href='#' value="on" class='active' ><img id="imgReset" value="off" title ="Remove all filters" src="img/reset.png"></a>
</div>
</div>
<div id="listContainer" >
<div id="result" ></div>
<div id="next"></div>
</div>
</div>
</div>
<script type="text/javascript">
function showSpin(){
target = document.getElementById('result');
spinner = new Spinner(opts).spin(target);
target.appendChild(spinner.el);
}
function hideSpin(){
spinner.stop();
}
$('#resetview').on('click', function(){
showSpin();
resetSearch();
});
$('#zoom').on('click', function(){
if($("#imgZoom").attr("value")=="on") {
$("#imgZoom").attr("src", "img/locked.png");
$("#imgZoom").attr("title", "Enable automatic zoom to map area");
$("#imgZoom").attr("value", "off");
} else {
$("#imgZoom").attr("src", "img/unlocked.png");
$("#imgZoom").attr("title", "Disable automatic zoom to map area");
$("#imgZoom").attr("value", "on");
}
});
$('#predicates').on('click', function(){
if($("#imgPredicates").attr("value")=="off") {
$("#imgPredicates").attr('value', 'on');
$("#properties").toggle("slow");
$('#map').css("width", "63%");
$("#imgPredicates").attr("title","Hide RDF properties list");
} else {
$("#imgPredicates").attr('value', 'off');
$('#map').css("width", "75%");
$("#properties").toggle("slow");
$("#imgPredicates").attr("title","Show RDF properties list");
}
});
$('#bbox').on('click', function(){
if($("#imgBBOX").attr("value")=="on") {
$("#imgBBOX").attr("src", "img/bbox.png");
$("#imgBBOX").attr('value', 'off');
$("#imgBBOX").attr("title",'Apply spatial filter to current map view');
removeSpatiatConstraint();
} else {
$("#imgBBOX").attr("src", "img/globe.png");
$("#imgBBOX").attr('value', 'on');
$("#imgBBOX").attr("title",'Remove spatial filter');
setSpatiatConstraint();
}
});
$( document ).ready(function() {
if(getQueryVariable("source")=='goettingen'){
showSpin();
setSliderRange(1901, 2015, 1901, 2015);
minVal = 1901;
maxVal = 2015;
executeQuery();
} else {
setTemporalLimit();
}
//setTemporalLimit();
//minVal = parseInt(jsonObj.results.bindings[i].mindate.value);
//maxVal = parseInt(jsonObj.results.bindings[i].maxdate.value);
//** Loading RDF properties from file. (Done with a local file to avoid CORS issues)
$.get("rdf/historicmapsphen.rdf", function(xmlResponse){
var rdfClasses = getRdfClasses(xmlResponse);
var counter = 0;
for(var i = 0; i < rdfClasses.length; i++){
if(rdfClasses[i].children.length == 0){
$("#properties").append("<p id='pOntologyContentTag" + counter +"'><input type='checkbox' id='" + rdfClasses[i].name + "' value='" + rdfClasses[i].uri + "'><label for 'pOntologyContentTag"+counter+"'>" + rdfClasses[i].name + '</label>' );
counter++;
}
}
})
//**Creating list for query results.
$("#result").append('<ul id="itemsContainer" style="list-style-type:none"></ul>');
//** Hiding predicates list.
$('#properties').css("display", "none");
});
//** Updates array with the current selected predicates.
$("body").on("change", "#properties", function() {
var selected = [];
$('#properties input:checked').each(function() {
selected.push((this).value);
});
arrayCheckboxes=selected;
});
//** Setting min and max values for the time slider.
$("#slider").bind("valuesChanged", function(e, data){
maxVal = data.values.max;
minVal = data.values.min;
executeQuery(0);
});
$( window ).load(function() {
console.log( "#DEBUG gui.js -> Window Loaded" );
});
//** Firing the search button once ENTER is pressed on the search text field.
$("#searchField").keyup(function(event){
if(event.keyCode == 13){
$("#searchButton").click();
}
})
function resetSearch(){
//** Clear text search field
$("#searchField").val("");
//** Reset map view
LMap.setView([40, 5], 3);
//** Reset slider
var bounds = $("#slider").rangeSlider("option", "bounds");
setSliderRange(bounds.min, bounds.max, bounds.min, bounds.max);
//** Remove all thematic constraints
$('#properties').find('input[type=checkbox]:checked').removeAttr('checked');
arrayCheckboxes = [];
//** Removes map area geometry or spatial constraint (if applicable)
mapsGroup.clearLayers();
removeSpatiatConstraint();
//executeQuery(0);
}
</script>
</body>
</html>