Merge branch 'marker'
@ -2,31 +2,31 @@ const aufgabe2 = () => {
|
||||
const markerIcons = {
|
||||
food: L.icon({
|
||||
iconUrl: 'markers/food.png',
|
||||
iconSize: [50, 50], // size of the icon
|
||||
iconAnchor: [20, 50], // point of the icon which will correspond to marker's location
|
||||
popupAnchor: [3, -50] // point from which the popup should open relative to the iconAnchor
|
||||
iconSize: [60, 60],
|
||||
iconAnchor: [30, 60],
|
||||
popupAnchor: [0, -53]
|
||||
}),
|
||||
culture: L.icon({
|
||||
iconUrl: 'markers/museum.png',
|
||||
iconSize: [50, 50], // size of the icon
|
||||
iconAnchor: [20, 50], // point of the icon which will correspond to marker's location
|
||||
popupAnchor: [3, -50] // point from which the popup should open relative to the iconAnchor
|
||||
iconUrl: 'markers/culture.png',
|
||||
iconSize: [60, 60],
|
||||
iconAnchor: [30, 60],
|
||||
popupAnchor: [0, -53]
|
||||
}),
|
||||
nature: L.icon({
|
||||
iconUrl: 'markers/nature.png',
|
||||
iconSize: [40, 48], // size of the icon
|
||||
iconAnchor: [20, 56], // point of the icon which will correspond to marker's location
|
||||
popupAnchor: [3, -50] // point from which the popup should open relative to the iconAnchor
|
||||
iconUrl: 'markers/landscape.png',
|
||||
iconSize: [60, 60],
|
||||
iconAnchor: [30, 60],
|
||||
popupAnchor: [0, -53]
|
||||
}),
|
||||
train: L.icon({
|
||||
iconUrl: 'markers/train.png',
|
||||
iconSize: [60, 60], // size of the icon
|
||||
iconAnchor: [25, 55], // point of the icon which will correspond to marker's location
|
||||
popupAnchor: [3, -45] // point from which the popup should open relative to the iconAnchor
|
||||
iconSize: [60, 60],
|
||||
iconAnchor: [30, 60],
|
||||
popupAnchor: [0, -53]
|
||||
})
|
||||
}
|
||||
|
||||
map = L.map('poiMap').setView([48.779694, 9.177015], 14);
|
||||
let map = L.map('poiMap').setView([48.779694, 9.177015], 14);
|
||||
map.addLayer(new L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
attribution: 'Map data <a href="https://openstreetmap.org">OpenStreetMap</a> contributors',
|
||||
minZoom: 1,
|
||||
|
BIN
projects/project-2/markers/culture.png
Normal file
After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 28 KiB |
BIN
projects/project-2/markers/landscape.png
Normal file
After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 19 KiB |