From cc7bc973d619cf448457e7fa639c18fa9851b7f3 Mon Sep 17 00:00:00 2001 From: Masashi Katsumata Date: Thu, 22 Oct 2026 18:53:56 -0700 Subject: [PATCH] Size the info bubble by the icon's real extent --- src/LeafletMapView.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/LeafletMapView.tsx b/src/LeafletMapView.tsx index aa6453a..97819fd 100644 --- a/src/LeafletMapView.tsx +++ b/src/LeafletMapView.tsx @@ -25,6 +25,7 @@ import { type MarkerAnimationOverlayEntry, type OverlayCollector, mapViewStateInternal, + markerIconExtentPx, } from '@mapconductor/js-sdk-core'; import type { MapOptions } from 'leaflet'; import { LeafletProvider, type LeafletConfig } from './LeafletProvider'; @@ -386,12 +387,12 @@ export function LeafletMapView({ {bubbleEntries.map(entry => { const positionOffset = typedControllerRef.current!.holder.toOuterScreenOffset(entry.positionProvider()); const icon = entry.icon; - const iconPixelSize = icon ? icon.iconSize * icon.scale : 0; + const iconPixelSize = markerIconExtentPx(icon); return (