Merge branch 'marker'
@ -2,31 +2,31 @@ const aufgabe2 = () => {
|
|||||||
const markerIcons = {
|
const markerIcons = {
|
||||||
food: L.icon({
|
food: L.icon({
|
||||||
iconUrl: 'markers/food.png',
|
iconUrl: 'markers/food.png',
|
||||||
iconSize: [50, 50], // size of the icon
|
iconSize: [60, 60],
|
||||||
iconAnchor: [20, 50], // point of the icon which will correspond to marker's location
|
iconAnchor: [30, 60],
|
||||||
popupAnchor: [3, -50] // point from which the popup should open relative to the iconAnchor
|
popupAnchor: [0, -53]
|
||||||
}),
|
}),
|
||||||
culture: L.icon({
|
culture: L.icon({
|
||||||
iconUrl: 'markers/museum.png',
|
iconUrl: 'markers/culture.png',
|
||||||
iconSize: [50, 50], // size of the icon
|
iconSize: [60, 60],
|
||||||
iconAnchor: [20, 50], // point of the icon which will correspond to marker's location
|
iconAnchor: [30, 60],
|
||||||
popupAnchor: [3, -50] // point from which the popup should open relative to the iconAnchor
|
popupAnchor: [0, -53]
|
||||||
}),
|
}),
|
||||||
nature: L.icon({
|
nature: L.icon({
|
||||||
iconUrl: 'markers/nature.png',
|
iconUrl: 'markers/landscape.png',
|
||||||
iconSize: [40, 48], // size of the icon
|
iconSize: [60, 60],
|
||||||
iconAnchor: [20, 56], // point of the icon which will correspond to marker's location
|
iconAnchor: [30, 60],
|
||||||
popupAnchor: [3, -50] // point from which the popup should open relative to the iconAnchor
|
popupAnchor: [0, -53]
|
||||||
}),
|
}),
|
||||||
train: L.icon({
|
train: L.icon({
|
||||||
iconUrl: 'markers/train.png',
|
iconUrl: 'markers/train.png',
|
||||||
iconSize: [60, 60], // size of the icon
|
iconSize: [60, 60],
|
||||||
iconAnchor: [25, 55], // point of the icon which will correspond to marker's location
|
iconAnchor: [30, 60],
|
||||||
popupAnchor: [3, -45] // point from which the popup should open relative to the iconAnchor
|
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', {
|
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',
|
attribution: 'Map data <a href="https://openstreetmap.org">OpenStreetMap</a> contributors',
|
||||||
minZoom: 1,
|
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 |