-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.js
34 lines (28 loc) · 1.08 KB
/
main.js
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
/* 1st Leaflet Map */
// Karte initialisieren
let map = L.map("map");
// auf den Stephansdom blicken
map.setView([48.208493, 16.373118], 12);
// Hintergrundkarten der basemap.at und OpenStreetMap hinzufügen
L.control.layers({
"BasemapAT Standard": L.tileLayer.provider("BasemapAT.basemap").addTo(map),
"BasemapAT High-DPI": L.tileLayer.provider("BasemapAT.highdpi"),
"BasemapAT Grau": L.tileLayer.provider("BasemapAT.grau"),
"BasemapAT Gelände": L.tileLayer.provider("BasemapAT.terrain"),
"BasemapAT Oberfläche": L.tileLayer.provider("BasemapAT.surface"),
"BasemapAT Orthofoto (beschriftet)": L.layerGroup([
L.tileLayer.provider("BasemapAT.orthofoto"),
L.tileLayer.provider("BasemapAT.overlay"),
]),
"OpenStreetMap": L.tileLayer.provider("OpenStreetMap.Mapnik"),
}).addTo(map);
// Marker für den Stephansdom hinzufügen
let marker = L.marker([48.208493, 16.373118]).addTo(map);
// Popup zum Marker hinzufügen und öffnen
marker.bindPopup(`
<h4>Stephansdom</h4>
`).openPopup();
// Maßstab
L.control.scale({
imperial: false
}).addTo(map);