diff --git a/src/map-renderer.ts b/src/map-renderer.ts index e0df793..f62afd3 100644 --- a/src/map-renderer.ts +++ b/src/map-renderer.ts @@ -134,8 +134,7 @@ function getIconSVG(iconName: string, strokeWidth: number, fill: boolean): strin if (clonedSvg instanceof SVGElement) { clonedSvg.setAttribute('stroke-width', String(strokeWidth)); if (fill) { - const fillableElements = clonedSvg.querySelectorAll('[fill]'); - fillableElements.forEach((el) => { + clonedSvg.querySelectorAll('path, circle, rect, polygon, ellipse, line, polyline').forEach((el) => { el.setAttribute('fill', 'white'); }); } @@ -206,7 +205,7 @@ export function updateMapPoints(deck: Deck, points: MapPoint[], c if (icon) { const iconSVG = getIconSVG(icon, settings.strokeWidth, settings.iconFill); if (iconSVG) { - innerContent = `${iconSVG}`; + innerContent = `${iconSVG}`; } } @@ -418,7 +417,7 @@ export async function createMapRenderer(config: MapRendererOptions): Promise${iconSVG}`; + innerContent = `${iconSVG}`; } }