|
35 | 35 | attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors' |
36 | 36 | }).addTo(map); |
37 | 37 |
|
38 | | -const greenIcon = L.icon({ |
39 | | - iconUrl: '/marker/green.png', |
40 | | - iconSize: [25, 41], |
41 | | - iconAnchor: [12, 41], |
42 | | - popupAnchor: [1, -34] |
43 | | -}); |
44 | | -
|
45 | | -const grayIcon = L.icon({ |
46 | | - iconUrl: '/marker/gray.png', |
47 | | - iconSize: [25, 41], |
48 | | - iconAnchor: [12, 41], |
49 | | - popupAnchor: [1, -34] |
50 | | -}); |
| 38 | +const iconSize = [35, 57] |
| 39 | +const iconAnchor = [16.6, 57.4] |
| 40 | +const popupAnchor = [1, -30] |
51 | 41 |
|
52 | | -const blueIcon = L.icon({ |
53 | | - iconUrl: '/marker/blue.png', |
54 | | - iconSize: [25, 41], |
55 | | - iconAnchor: [12, 41], |
56 | | - popupAnchor: [1, -34] |
57 | | -}); |
| 42 | +const greenIcon = L.icon({ iconUrl: '/marker/green.png', iconSize, iconAnchor, popupAnchor }); |
| 43 | +const grayIcon = L.icon({ iconUrl: '/marker/gray.png', iconSize, iconAnchor, popupAnchor }); |
| 44 | +const blueIcon = L.icon({ iconUrl: '/marker/blue.png', iconSize, iconAnchor, popupAnchor }); |
58 | 45 |
|
59 | 46 | const currentDate = new Date(); |
60 | 47 | const projects = $projects |
|
66 | 53 | return L.divIcon({ |
67 | 54 | className: 'custom-marker', |
68 | 55 | html: `<div style="position: relative;"> |
69 | | - <img src="$${baseIcon.options.iconUrl}" style="width: 25px; height: 41px;"> |
70 | | - <img src="$${overlayUrl}" style="position: absolute; top: 5px; left: 5px; width: 15px; height: 15px; border-radius: 50%; background: white;"> |
| 56 | + <img src="${baseIcon.options.iconUrl}" style="width: 35px; height: 57px;"> |
| 57 | + <img src="${overlayUrl}" style="position: absolute; top: 4px; left: 4px; width: 27px; height: 27px; border-radius: 50%; background: white;"> |
71 | 58 | </div>`, |
72 | | - iconSize: [25, 41], |
73 | | - iconAnchor: [12, 41], |
74 | | - popupAnchor: [1, -34] |
| 59 | + iconSize, |
| 60 | + iconAnchor, |
| 61 | + popupAnchor |
75 | 62 | }); |
76 | 63 | } |
77 | 64 |
|
|
0 commit comments