-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
208 lines (162 loc) · 5.89 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
<!DOCTYPE html>
<html>
<head>
<title>JOSHUAMAPS</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" type="image/x-icon" href="docs/images/favicon.ico" />
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" integrity="sha512-Rksm5RenBEKSKFjgI3a41vrjkw4EVPlJ3+OiI65vTjIdo9brlAacEuKOiQ5OFh7cOI1bkDwLqdLw3Zg0cRJAAQ==" crossorigin=""/>
<script src="https://unpkg.com/[email protected]/dist/leaflet.js" integrity="sha512-/Nsx9X4HebavoBvEBuyp3I7od5tA0UzAxs+j83KgC8PU0kgB4XiK4Lfe4y4cgBtaRJQEIFCW+oC506aPT2L1zw==" crossorigin=""></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/leaflet.locatecontrol/dist/L.Control.Locate.min.css" />
<script src="https://cdn.jsdelivr.net/npm/leaflet.locatecontrol/dist/L.Control.Locate.min.js" charset="utf-8"></script>
<style>
html, body {
height: 100%;
margin: 0;
}
#map {
width: 100vw;
height:calc(100% - 50px);
}
/* Style the navbar */
#navbar {
overflow: hidden;
background-color: #000080;
height: 50px;
display: flex;
justify-content: space-between;
align-items: center;
}
/* Navbar links */
#navbar a {
color: #fff;
padding: 10px;
font-family: Lucida, sans-serif;
font-size: 1.5rem;
text-decoration: none; /* otherwise they're underlined */
text-align: center;
}
p {
font-family: Arial, Helvetica, sans-serif;
font-size: 1.5rem;
}
.leaflet-control-layers{
width:200px;}
.leaflet-control-layers-toggle{
width: 100px;
background-position:3px 50%;
padding:3px;
padding-left:36px;
text-decoration:none;
line-height:40px;
}
.leaflet-control-layers-toggle:after{
content:"Kategorien auswählen";
color:#000;
text-decoration: underline;
width:150px;}
.leaflet-touch .leaflet-control-layers-toggle {
width: 150px;
height: 44px;
padding-top: 10px;
}
.leaflet-control-layers-expanded {
color: black;
background-color: #FFF;
width: 184px;
height: 200px;
}
</style>
</head>
<body>
<div id="navbar">
<a style="flex-grow:1;" href="#home">About</a>
<a style="flex-grow:3; " href="">joshuamaps.com</a>
<a style="flex-grow:1; justify-content:flex-end" href="#news">Kategorien</a>
</div>
<div id='map' ></div>
<script>
var parks = L.layerGroup();
var food = L.layerGroup();
var eis = L.layerGroup();
var architecture = L.layerGroup();
var bakery = L.layerGroup();
var greenIcon = new L.Icon({
iconUrl: 'https://cdn.rawgit.com/pointhi/leaflet-color-markers/master/img/marker-icon-2x-green.png',
shadowUrl: 'https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.7/images/marker-shadow.png',
iconSize: [25, 41],
iconAnchor: [12, 41],
popupAnchor: [1, -34],
shadowSize: [41, 41]
});
var yellowIcon = new L.Icon({
iconUrl: 'https://cdn.rawgit.com/pointhi/leaflet-color-markers/master/img/marker-icon-2x-yellow.png',
shadowUrl: 'https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.7/images/marker-shadow.png',
iconSize: [25, 41],
iconAnchor: [12, 41],
popupAnchor: [1, -34],
shadowSize: [41, 41]
});
var redIcon = new L.Icon({
iconUrl: 'https://cdn.rawgit.com/pointhi/leaflet-color-markers/master/img/marker-icon-2x-red.png',
shadowUrl: 'https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.7/images/marker-shadow.png',
iconSize: [25, 41],
iconAnchor: [12, 41],
popupAnchor: [1, -34],
shadowSize: [41, 41]
});
var mbAttr = 'Map data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, ' + '<a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' +
'Imagery © <a href="https://www.mapbox.com/">Mapbox</a>',
mbUrl = 'https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoiajU1IiwiYSI6ImNqaDJnMml1aTBjd3gyem1qdmd5M2U3YXEifQ.iSFCsOgjP-zgyHOeLxtWEA';
var grayscale = L.tileLayer(mbUrl, {id: 'mapbox.light', attribution: mbAttr});
var outdoors = L.tileLayer(mbUrl, {id: 'mapbox.outdoors', attribution: mbAttr});
var map = L.map('map', {
center: [52.515281, 13.366413],
zoom: 12,
//nur diese Layer werden per default angezeigt
layers: [grayscale, eis, food, parks, architecture, bakery]
});
//Reihenfolge der Layer
var baseLayers = {
"stadt":grayscale,
"toben":outdoors,
};
var overlays = {
"Parks": parks,
"Essen": food,
"Eis": eis,
"Architektur": architecture,
"Bäckerei": bakery,
};
// Geolocation - https://github.com/domoritz/leaflet-locatecontrol
L.control.locate({
locateOptions: {
maxZoom: 15
}}).addTo(map);
L.marker([52.476625, 13.418233],{icon: greenIcon}).bindPopup('Tempelhofer Feld').addTo(parks)
L.marker([52.477259, 13.421318],{icon: yellowIcon}).bindPopup('Mos Eisley.').addTo(eis),
L.marker([52.483679, 13.436558]).bindPopup('Al Pasha').addTo(food),
L.marker([52.500660, 13.400799]).bindPopup('St. Agnes').addTo(architecture),
L.marker([52.491416, 13.416808],{icon: redIcon}).bindPopup('Albatross').addTo(bakery),
L.marker([52.541463, 13.419616]).bindPopup('Häppies').addTo(food),
L.control.layers(baseLayers, overlays).addTo(map);
//wenn ich baseLayers lösche, dann wird es ein radio button
/*
Groups for markers / Farben – Farbe direkt der Var zuordnen
pop up bearbeiten
brauche ich GEO JSON?
brauche ich mapbox?
sidebar
lokalisierung
imprint
Layout/ Grafik:
farbiger Balken oben für links, siehe: http://cheesecakepowerhouse.com/
about, more info: seo texte
mail social media
Scrolling auf navbar löscht diesen
flebox header
*/
</script>
</body>
</html>