Merge branch 'marker'

This commit is contained in:
Marcel Schwarz 2020-11-21 19:33:51 +01:00
commit 34969a900f
7 changed files with 15 additions and 15 deletions

View File

@ -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,

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 19 KiB