-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
158 lines (141 loc) · 5 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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>Gerda Steiner & Jörg Lenzlinger</title>
<script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script>
<script src="lib/jquery-1.6.2.min.js" type="text/javascript"></script>
<script src="lib/mxn/source/mxn.js?(googlev3)" type="text/javascript"></script>
<script src="lib/timeline/timeline-1.2.js" type="text/javascript"></script>
<script src="lib/timemap/timemap.js" type="text/javascript"></script>
<link href="css/style.css" type="text/css" rel="stylesheet"/>
<script type="text/javascript">
var tm;
// First load the data
$(function() {
$.getJSON( "data/GerdaSteiner_Ausstellung_AUSST_DATUM_AUSST_INSTITUT_COORDINATES.json", function( data ) {
var ausstellungen = data //.slice(0,20)
ausstellungenData = ausstellungen.filter(
function(item){
return item.JAHR !== null
&& item.BISJAHR !== "NULL"
&& item.BISJAHR !== ""
&& item.AUSST_ORT !== ""
&& item.AUSST_TITEL !== ""
}).map(
function(item){
var startyear = String(item.JAHR)
var startmonth = ""
if (item.MONAT !== null){
startmonth += "-"
startmonth += ("00" + String(item.MONAT)).slice(-"00".length)
}
var endyear = String(item.BISJAHR)
var endmonth = ""
if (item.BISMONAT !== "" && item.BISMONAT !== "NULL"){
endmonth += "-"
endmonth += ("00" + String(item.BISMONAT)).slice(-"00".length)
}
var returnval = {
"start": startyear+startmonth,
"stop": endyear+endmonth,
"point": item.coordinates,
"title" : String(item.AUSST_INSTITUT) + ", " +String(item.AUSST_TITEL),
"options": {
"infoHtml": String(item.AUSST_INSTITUT) + ", " + String(item.AUSST_TITEL) + ", "+ String(item.AUSST_ORT)
}
}
return returnval
})
startRendering(ausstellungenData)
});
});
function startRendering(data) {
// make a custom map style
var styledMapType = new google.maps.StyledMapType([
{
featureType: "water",
elementType: "all",
stylers: [
{ saturation: 0 },
{ lightness: 100 }
]
},
{
featureType: "all",
elementType: "all",
stylers: [
{ saturation: -100 }
]
}
], {
name: "white"
});
tm = TimeMap.init({
mapId: "map", // Id of map div element (required)
timelineId: "timeline", // Id of timeline div element (required)
options: {
eventIconPath: "lib/images/"
},
datasets: [
{
id: "artists",
title: "Artists",
theme: "orange",
// note that the lines below are now the preferred syntax
type: "basic",
options: {
items: data//.filter(function(item){
// Filter out all the items that we couldn't retrieve
// location data for.
// console.log("start: " + item.start)
// console.log("stop: " + item.stop)
// return item.coordinates.done
//})
}
}
],
bandIntervals: [
Timeline.DateTime.MONTH,
Timeline.DateTime.YEAR
]
});
// See https://github.com/mapstraction/mxn/issues/253
tm.map.maps.googlev3.setOptions({zoomControl: true, panControl: true});
// set the map to our custom style
var gmap = tm.getNativeMap();
gmap.mapTypes.set("white", styledMapType);
gmap.setMapTypeId("white");
}
</script>
</head>
<body>
<div id="sikartWrap">
<div id="sikartHead">
<img src="sikartWrap/sikartHeadBig.jpg" width="942px" alt="SIKART"/>
</div>
<div id="sikartContent">
<div class="formStyle">
<form method="GET" action="map.html">
<p>
<label for="artist">Künstler/Künstlerin:</label>
<input id="artist" name="artist" placeholder="Gerda Steiner & Jörg Lenzlinger">
</p>
<p>
<label for="catchword">Stichwort:</label>
<input id="catchword" name="catchword" placeholder="Künstlerduo">
</p>
<p>
<button>Starten</button>
</p>
</form>
<div style="height: 35px; width: 1px;"></div>
</div>
</div>
<div id="sikartFooter">
<img src="sikartWrap/sikartFootBig.jpg" width="955px" alt=""/>
</div>
</div>
</body>
</html>