This commit is contained in:
Anton Tranelis 2025-05-20 20:42:51 +02:00
parent 5e655fda58
commit 016c7dd385
2 changed files with 4 additions and 2 deletions

View File

@ -42,7 +42,7 @@ function App() {
name='events' name='events'
markerIcon={ markerIcon={
{image: "calendar.svg", {image: "calendar.svg",
size: 14 size: 13
} }
} }
markerShape='square' markerShape='square'

View File

@ -38,9 +38,11 @@ const MarkerIconFactory = (
icon?: MarkerIcon, icon?: MarkerIcon,
assetsURL?: string, assetsURL?: string,
) => { ) => {
console.log(icon)
console.log(assetsURL)
if (icon) if (icon)
return divIcon({ return divIcon({
html: `<div class="svg-container">${createSvg(shape, color1, color2)}<img class="overlay-svg" style="width: ${icon.size ? icon.size : '12.5'}px; filter: invert(1) brightness(2);" src="${assetsURL ?? '' + icon.image}"></div>`, html: `<div class="svg-container">${createSvg(shape, color1, color2)}<img class="overlay-svg" style="width: ${icon.size ? icon.size : '12.5'}px; filter: invert(1) brightness(2);" src="${`${assetsURL ?? ''}` + icon.image}"></div>`,
iconAnchor: [17, 40], iconAnchor: [17, 40],
popupAnchor: [0, -40], popupAnchor: [0, -40],
iconSize: new Point(40, 46), iconSize: new Point(40, 46),