-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.html
144 lines (135 loc) · 4.2 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
<!--
vim: tabstop=2:softtabstop=2:shiftwidth=2:noexpandtab
-->
<html>
<head>
<meta charset='utf-8'>
<title>POI Importer</title>
<link rel="stylesheet" href="leaflet.css" />
<style type="text/css">
#mapPane { height: 100%; width: 100%; }
#leftPane
{
width: 20%;
max-height: calc(100% - 15px);
position:absolute;
z-index: 1;
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;
}
/*
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')">
Settings <div class="collapser" id="settingsCollapser"></div>
</div>
<div id="settingsSection" class="settingsPane">
<input type="checkbox" onchange="changeSetting(this)" id="hideCompletePOISetting"/>
<label for="hideCompletePOISetting"> Hide complete POI</label><br/>
</div>
<div class="settingsHeader" onclick="htmlHelper.collapseSection('dataset')">
Datasets <div class="collapser" id="datasetCollapser"></div>
</div>
<div id="datasetSection" class="settingsPane"></div>
<div class="settingsHeader" onclick="htmlHelper.collapseSection('comments')" id="commentsHeader">
Comments (experimental)<div class="collapser" id="commentsCollapser"></div>
</div>
<div id="commentsSection" class="settingsPane">
<div id="commentsContent">Select a feature to see comments.</div>
<div id="newComment" style="display:none;">
<textarea id="newCommentText" name="newComment" rows="5" style="width:100%;"></textarea>
<input type="button" id="newCommentButton" value="Add comment"></input>
</div>
<div id="osmLogin">
<input type="button" id="osmLoginButton" value="Login to OSM to add a comment"></input>
</div>
</div>
</div>
<div id="mapPane">
</div>
<script src="leaflet.js"></script>
<script src="Leaflet.MakiMarkers.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">
loadDatasets();
var mapObj = L.map('mapPane', {"zoomControl": false});
mapObj.fitWorld();
mapObj.setZoom(3);
mapObj.on("zoomend", loadData);
mapObj.on("moveend", loadData);
L.tileLayer("https://api.mapbox.com/styles/v1/obtitus/cir6c5h440011cnlxo0eqqxby/tiles/256/{z}/{x}/{y}?access_token=pk.eyJ1Ijoib2J0aXR1cyIsImEiOiJjaWYzbXF1M3IwMGtuc3ZsdmhhYXR4d2hpIn0.tQQLwWt3e_NhGtTdUYLzwQ", {
subdomains: "1234",
attribution: '© <a href="https://mapbox.com">Mapbox</a> © <a href="https://openstreetmap.org">OpenStreetMap</a> © <a href="https://digitalglobe.com">DigitalGlobe</a>',
maxZoom: 18
}).addTo(mapObj);
new L.Control.Zoom({ position: 'topright' }).addTo(mapObj);
loadAppState(mapObj);
htmlHelper.collapseSection("settings");
htmlHelper.collapseSection("dataset");
htmlHelper.collapseSection("comments");
checkOsmLogin();
</script>
</body>