From 6ddce654458b6b5e0d7dbdf00d486db22c87abe4 Mon Sep 17 00:00:00 2001 From: JIANG Date: Thu, 16 Oct 2025 18:02:42 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=A2=B0=E6=92=9E=E5=8F=82?= =?UTF-8?q?=E6=95=B0=EF=BC=8C=E5=87=8F=E5=B0=91=E6=96=87=E5=AD=97=E9=97=AA?= =?UTF-8?q?=E7=83=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/OlMap/MapComponent.tsx | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/src/app/OlMap/MapComponent.tsx b/src/app/OlMap/MapComponent.tsx index c8d6b22..8a20693 100644 --- a/src/app/OlMap/MapComponent.tsx +++ b/src/app/OlMap/MapComponent.tsx @@ -428,15 +428,14 @@ const MapComponent: React.FC = ({ children }) => { showJunctionTextLayer && currentZoom >= 15 && currentZoom <= 24, extensions: [new CollisionFilterExtension()], collisionTestProps: { - sizeScale: 2, // 增加碰撞检测的尺寸以提供更大间距 + sizeScale: 3, // 增加碰撞检测的尺寸以提供更大间距 }, + // 可读性设置 + characterSet: "auto", fontSettings: { sdf: true, - fontSize: 64, // 字体图集大小,默认 64 - buffer: 6, // 字符间距缓冲,默认 4 - radius: 12, // SDF 半径,默认 12 - cutoff: 0.25, // 控制字符粗细,默认 0.25 - smoothing: 0.1, // 边缘平滑度,默认 0.1 + fontSize: 64, + buffer: 6, }, outlineWidth: 10, outlineColor: [255, 255, 255, 255], @@ -458,15 +457,14 @@ const MapComponent: React.FC = ({ children }) => { visible: showPipeTextLayer && currentZoom >= 15 && currentZoom <= 24, extensions: [new CollisionFilterExtension()], collisionTestProps: { - sizeScale: 2, // 增加碰撞检测的尺寸以提供更大间距 + sizeScale: 3, // 增加碰撞检测的尺寸以提供更大间距 }, + // 可读性设置 + characterSet: "auto", fontSettings: { sdf: true, - fontSize: 64, // 字体图集大小,默认 64 - buffer: 6, // 字符间距缓冲,默认 4 - radius: 12, // SDF 半径,默认 12 - cutoff: 0.25, // 控制字符粗细,默认 0.25 - smoothing: 0.1, // 边缘平滑度,默认 0.1 + fontSize: 64, + buffer: 6, }, outlineWidth: 10, outlineColor: [255, 255, 255, 255],