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],