From ac98c64c6322388918e2508fdb7caefc2425af0f Mon Sep 17 00:00:00 2001 From: waterWang Date: Sun, 9 Aug 2026 18:58:00 +0800 Subject: [PATCH] fix(geo): respect tooltip.show=false in geo region tooltip config --- src/component/helper/MapDraw.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/component/helper/MapDraw.ts b/src/component/helper/MapDraw.ts index a3909ceb2b..b07e01430d 100644 --- a/src/component/helper/MapDraw.ts +++ b/src/component/helper/MapDraw.ts @@ -808,12 +808,18 @@ function resetTooltipForRegion( regionModel: RegionModel ): void { if (!data) { + const itemTooltipOption = regionModel.get('tooltip'); + // Skip tooltip config if the tooltip is explicitly disabled + // for this region (geo.tooltip.show = false) + if (itemTooltipOption && !isString(itemTooltipOption) && itemTooltipOption.show === false) { + return; + } graphic.setTooltipConfig({ el: el, componentModel: mapOrGeoModel, itemName: regionName, // @ts-ignore FIXME:TS fix the "compatible with each other"? - itemTooltipOption: regionModel.get('tooltip') + itemTooltipOption: itemTooltipOption }); } }