forked from mkyral/POI-Importer.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
149 lines (140 loc) · 4.22 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
<!--
vim: tabstop=2:softtabstop=2:shiftwidth=2:noexpandtab
-->
<html>
<head>
<meta charset='utf-8'>
<title>POI Importer</title>
<link rel="stylesheet" href="leaflet.css" />
<link rel="stylesheet" href="div-markers.css" />
<style type="text/css">
#mapPane { height: 100%; width: 100%; }
#leftPane
{
width: 20%;
max-height: calc(100% - 15px);
position:absolute;
z-index: 999;
overflow: auto;
}
div.settingsHeader
{
cursor: pointer;
background-color: #CCC;
border-width: 1px;
border-style: solid;
border-color: #FFF;
font-weight: bold;
font-size: 18;
}
div.countryHeader
{
cursor: pointer;
font-weight: bold;
}
div.settingsPane
{
background-color: #EEE;
border-width: 1px;
border-style: solid;
border-color: #FFF;
}
div.comment
{
border-width: 1px;
border-style: solid;
border-color: #FFF;
}
div.collapser { float: right; margin-right: 10; }
a {cursor: pointer; }
tr
{
border-width: 1px;
border-style: solid;
border-color: #FFF;
}
body
{
background-color: #EEE;
color: #555;
}
/*
TODO use this for warning users there are comments
@keyframes warning
{
0% {background-color:#CCC;}
100% {background-color:#F60;}
}
@keyframes still
{
0% {background-color: #CCC;}
100% {background-color: #CCC;}
}
#commentsHeader
{
animation-name: still;
animation-duration:2s;
animation-direction:alternate;
animation-iteration-count:infinite;
}
*/
</style>
</head>
<body>
<div id="leftPane">
<div class="settingsHeader" onclick="htmlHelper.collapseSection('settings')">
Nastavení <div class="collapser" id="settingsCollapser"></div>
</div>
<div id="settingsSection" class="settingsPane">
<input type="checkbox" onchange="changeSetting(this)" id="hideCompletePOISetting"/>
<label for="hideCompletePOISetting"> Skrýt kompletní POI</label><br/>
</div>
<div class="settingsHeader" onclick="htmlHelper.collapseSection('dataset')">
Datové sady <div class="collapser" id="datasetCollapser"></div>
</div>
<div id="datasetSection" class="settingsPane"></div>
<div class="settingsHeader" onclick="htmlHelper.collapseSection('comments')" id="commentsHeader">
Komentáře (experimentální)<div class="collapser" id="commentsCollapser"></div>
</div>
<div id="commentsSection" class="settingsPane">
<div id="commentsContent">Vyberte vlastnost pro zobrazení komentářů.</div>
<div id="newComment" style="display:none;">
<textarea id="newCommentText" name="newComment" rows="5" style="width:100%;"></textarea>
<input type="button" id="newCommentButton" value="Přidat komentář"></input>
</div>
<div id="osmLogin">
<input type="button" id="osmLoginButton" value="Před přidáním komentáře se nejprve přihlaste do OSM"></input>
</div>
</div>
</div>
<div id="mapPane">
</div>
<script src="leaflet.js"></script>
<script src="oms.min.js"></script>
<script type="text/javascript" src="datasets.js"></script>
<script type="text/javascript" src="geoHelpers.js"></script>
<script type="text/javascript" src="josmHelpers.js"></script>
<script type="text/javascript" src="htmlHelpers.js"></script>
<script type="text/javascript" src="commentsHelpers.js"></script>
<script type="text/javascript" src="loadData.js"></script>
<script type="text/javascript" src="compareData.js"></script>
<script type="text/javascript" src="L.Grid.js"></script>
<script type="text/javascript">
loadDatasets();
var mapObj = L.map('mapPane', {"zoomControl": false, "center": new L.LatLng(48.8611,17.8802), "zoom": 7});
mapObj.on("zoomend", loadData);
mapObj.on("moveend", loadData);
L.tileLayer("https://b.tile.openstreetmap.org/{z}/{x}/{y}.png", {
subdomains: "1234",
attribution: 'Mapová data © přispěvatelé <a href="https://openstreetmap.org">OpenStreetMap</a>',
maxZoom: 19
}).addTo(mapObj);
new L.Control.Zoom({ position: 'topright' }).addTo(mapObj);
loadAppState(mapObj);
htmlHelper.collapseSection("settings");
htmlHelper.collapseSection("dataset");
htmlHelper.collapseSection("comments");
checkOsmLogin();
var grid = L.grid().addTo(mapObj);
</script>
</body>