forked from ifgi/historicmaps-search
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
157 lines (97 loc) · 4.26 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
<!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>
<link rel="stylesheet" id="themeCSS" href="js/jQRangeSlider/css/classic.css">
<script src="js/jquery-sparql/jquery.sparql.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>
<link rel="stylesheet" href="css/historicmaps.css" />
</head>
<body onLoad="javascript:init();">
<div id="header">
<h1>Historic Maps Search (Prototype) </h1>
</div>
<div id="textsearch">
<input id="searchField" name="txtSearch" type="text" size="30" >
<input id="searchButton" type="button" name="btnSearch" value="Search" onclick="executeQuery(0)">
</div>
<div id="slider"></div>
<div id="container">
<div id="nav">
<b>RDF Properties</b><button id="btnProperties" onclick="executeQuery(0)">Set Properties</button><br>
</div>
<button id="btnSpatialConstraint" onclick="setSpatiatConstraint()">Set Spatial Constraint</button>
<button id="btnRemoveSpatialConstraint" onclick="removeSpatiatConstraint()" disabled>Remove Spatial Constraint</button>
<label for="chkZoom"> <input type="checkbox" id="chkZoom" checked>Automatic zoom to map area</label>
<br>
<div id="map"></div>
<div id="listContainer">
<p><span id="status" ></span></p>
<div id="result"></div>
<div id="next"></div>
</div>
</div>
<script type= "application/javascript">
$( document ).ready(function() {
setTemporalLimit();
//Loading RDF properties from file.
$.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){
$("#nav").append("<p id='pOntologyContentTag" + counter +"'><input type='checkbox' id='" + rdfClasses[i].name + "' value='" + rdfClasses[i].uri + "' class='chOntologyContent' >" + rdfClasses[i].name + " - <a href='" + rdfClasses[i].uri + "' target='_blank'>view</a> ");
counter++;
}
}
})
//Creating list for query results.
$("#result").append('<ul id="itemsContainer" style="list-style-type:none"></ul>');
});
$("body").on("change", ".chOntologyContent", function() {
var res = new Array();
$(".chOntologyContent").each(function( index ){
if(this.checked){
res.push(this.value);
}
});
arrayCheckboxes=res;
});
//Setting min and max values for the time slider.
$("#slider").bind("valuesChanged", function(e, data){
//console.log("Values just changed. min: " + data.values.min + " max: " + data.values.max);
maxVal = data.values.max;
minVal = data.values.min;
executeQuery(0);
});
$( window ).load(function() {
console.log( "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();
}
})
</script>
</body>
</html>