@ray-js/robot-map-sdk 0.0.13 → 0.0.14-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +14 -0
- package/dist/index.rjs.js +1 -1
- package/dist-app/assets/{index-BzBtiwcY.js → index-BdM8mVW2.js} +1 -1
- package/dist-app/index.html +1 -1
- package/dist-docs/404.html +2 -2
- package/dist-docs/assets/{app.CoDGIQ53.js → app.B-cJvUCw.js} +1 -1
- package/dist-docs/assets/chunks/@localSearchIndexroot.CrYZjrrp.js +1 -0
- package/dist-docs/assets/chunks/{BitmapFont.DDRqV796.js → BitmapFont.CqQVBHFj.js} +1 -1
- package/dist-docs/assets/chunks/{BufferResource.aFEHKM_N.js → BufferResource.B2VSGaWU.js} +1 -1
- package/dist-docs/assets/chunks/{CanvasRenderer.BefGXFZ-.js → CanvasRenderer.CZO0PMWy.js} +1 -1
- package/dist-docs/assets/chunks/{RenderTargetSystem.CsgIm493.js → RenderTargetSystem.p9lXtNJj.js} +1 -1
- package/dist-docs/assets/chunks/{VPLocalSearchBox.CVEAMjKj.js → VPLocalSearchBox.D1PfgbSt.js} +1 -1
- package/dist-docs/assets/chunks/{WebGLRenderer.p4DxJ1iF.js → WebGLRenderer.0K1DT-Es.js} +1 -1
- package/dist-docs/assets/chunks/{WebGPURenderer.BhOx1ll0.js → WebGPURenderer.COUGZ4Th.js} +1 -1
- package/dist-docs/assets/chunks/{browserAll.CXRAifqY.js → browserAll.C5bQpkD7.js} +1 -1
- package/dist-docs/assets/chunks/{index.Dmmvsq5C.js → index.C-AiaySA.js} +18 -18
- package/dist-docs/assets/chunks/theme.C-O3vTBh.js +4 -0
- package/dist-docs/assets/chunks/{webworkerAll.CY0RXZhY.js → webworkerAll.EzKpjJ2M.js} +1 -1
- package/dist-docs/assets/{guide_getting-started.md.9hcfOAq4.js → guide_getting-started.md._t5bADoD.js} +2 -2
- package/dist-docs/assets/guide_getting-started.md._t5bADoD.lean.js +1 -0
- package/dist-docs/assets/{reference_config.md.DHynhVxG.js → reference_config.md.C6eF1KzO.js} +13 -9
- package/dist-docs/assets/{reference_config.md.DHynhVxG.lean.js → reference_config.md.C6eF1KzO.lean.js} +1 -1
- package/dist-docs/assets/{reference_methods.md.eH-UCMbE.js → reference_methods.md.BvtVJ2dG.js} +3 -3
- package/dist-docs/assets/{reference_methods.md.eH-UCMbE.lean.js → reference_methods.md.BvtVJ2dG.lean.js} +1 -1
- package/dist-docs/assets/{reference_runtime.md.BEy8BhSZ.js → reference_runtime.md.80-Ieel4.js} +2 -2
- package/dist-docs/assets/{reference_runtime.md.BEy8BhSZ.lean.js → reference_runtime.md.80-Ieel4.lean.js} +1 -1
- package/dist-docs/guide/advanced-usage.html +3 -3
- package/dist-docs/guide/concepts.html +3 -3
- package/dist-docs/guide/getting-started.html +5 -5
- package/dist-docs/guide/mcp.html +3 -3
- package/dist-docs/hashmap.json +1 -1
- package/dist-docs/index.html +3 -3
- package/dist-docs/plans/2026-03-04-detected-objects-visibility-design.html +3 -3
- package/dist-docs/plans/2026-03-04-show-detected-objects-implementation-plan.html +3 -3
- package/dist-docs/plans/2026-03-10-simulator-debug-design.html +3 -3
- package/dist-docs/plans/2026-03-10-simulator-events-console-design.html +3 -3
- package/dist-docs/plans/2026-03-10-simulator-events-console-implementation-plan.html +3 -3
- package/dist-docs/plans/2026-03-10-simulator-runtime-controls-design.html +3 -3
- package/dist-docs/plans/2026-03-10-simulator-runtime-controls-implementation-plan.html +3 -3
- package/dist-docs/plans/2026-03-11-simulator-logger-dump-implementation-plan.html +3 -3
- package/dist-docs/records/bugs/2026-02-28-fix-pixi-bindgroup-webgpu-snapshot-whitescreen-bugfix.html +3 -3
- package/dist-docs/records/bugs/2026-03-10-events-drawer-toolbar-scroll-bugfix.html +3 -3
- package/dist-docs/records/bugs/2026-03-10-simulator-initial-render-layout-bugfix.html +3 -3
- package/dist-docs/records/bugs/2026-03-10-simulator-wheel-scroll-leak-bugfix.html +3 -3
- package/dist-docs/records/bugs/2026-03-11-docs-server-bin-clean-bugfix.html +3 -3
- package/dist-docs/records/bugs/2026-03-11-render-result-runtime-sync-bugfix.html +3 -3
- package/dist-docs/records/plans/2026-03-02-furniture-feature-plan.html +3 -3
- package/dist-docs/records/plans/2026-03-10-simulator-events-console-plan.html +3 -3
- package/dist-docs/records/plans/2026-03-10-simulator-last-successful-combo-cache-plan.html +3 -3
- package/dist-docs/records/plans/2026-03-10-simulator-map-parsed-view-plan.html +3 -3
- package/dist-docs/records/plans/2026-03-10-simulator-map-playground-refactor-plan.html +3 -3
- package/dist-docs/records/plans/2026-03-10-simulator-playground-plan.html +3 -3
- package/dist-docs/records/plans/2026-03-10-simulator-runtime-controls-plan.html +3 -3
- package/dist-docs/records/plans/2026-03-11-docs-cli-ui-polish-plan.html +3 -3
- package/dist-docs/records/plans/2026-03-11-simulator-logger-dump-plan.html +3 -3
- package/dist-docs/records/plans/2026-03-11-simulator-src-migration-implementation.html +3 -3
- package/dist-docs/records/plans/2026-03-11-simulator-src-migration-plan.html +3 -3
- package/dist-docs/records/plans/2026-03-11-simulator-style-tokenization-plan.html +3 -3
- package/dist-docs/reference/callbacks.html +3 -3
- package/dist-docs/reference/config.html +16 -12
- package/dist-docs/reference/data.html +3 -3
- package/dist-docs/reference/methods.html +6 -6
- package/dist-docs/reference/runtime.html +5 -5
- package/dist-docs/reference/types.html +3 -3
- package/dist-docs/reference/utils.html +3 -3
- package/dist-docs/simulator/index.html +3 -3
- package/package.json +1 -1
- package/dist-docs/assets/chunks/@localSearchIndexroot.DELY0TLT.js +0 -1
- package/dist-docs/assets/chunks/theme.Cii0G4Y-.js +0 -4
- package/dist-docs/assets/guide_getting-started.md.9hcfOAq4.lean.js +0 -1
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
<link rel="preload stylesheet" href="/assets/style.hiWmcVfN.css" as="style">
|
|
10
10
|
<link rel="preload stylesheet" href="/vp-icons.css" as="style">
|
|
11
11
|
|
|
12
|
-
<script type="module" src="/assets/app.
|
|
12
|
+
<script type="module" src="/assets/app.B-cJvUCw.js"></script>
|
|
13
13
|
<link rel="preload" href="/assets/inter-roman-latin.Di8DUHzh.woff2" as="font" type="font/woff2" crossorigin="">
|
|
14
|
-
<link rel="modulepreload" href="/assets/chunks/theme.
|
|
14
|
+
<link rel="modulepreload" href="/assets/chunks/theme.C-O3vTBh.js">
|
|
15
15
|
<link rel="modulepreload" href="/assets/chunks/framework.CBLqO2Q1.js">
|
|
16
|
-
<link rel="modulepreload" href="/assets/reference_config.md.
|
|
16
|
+
<link rel="modulepreload" href="/assets/reference_config.md.C6eF1KzO.lean.js">
|
|
17
17
|
<script id="check-dark-mode">(()=>{const e=localStorage.getItem("vitepress-theme-appearance")||"auto",a=window.matchMedia("(prefers-color-scheme: dark)").matches;(!e||e==="auto"?a:e==="dark")&&document.documentElement.classList.add("dark")})();</script>
|
|
18
18
|
<script id="check-mac-os">document.documentElement.classList.toggle("mac",/Mac|iPhone|iPod|iPad/i.test(navigator.platform));</script>
|
|
19
19
|
</head>
|
|
@@ -92,7 +92,9 @@
|
|
|
92
92
|
<span class="line"></span>
|
|
93
93
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (</span></span>
|
|
94
94
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> <></span></span>
|
|
95
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> <</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">button</span
|
|
95
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> <</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">button</span></span>
|
|
96
|
+
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onClick</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{() </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=></span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> setTheme</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">((</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">t</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=></span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (t </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">===</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 'light'</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> ?</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 'dark'</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> :</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 'light'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">))}</span></span>
|
|
97
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ></span></span>
|
|
96
98
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> 切换主题</span></span>
|
|
97
99
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> </</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">button</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">></span></span>
|
|
98
100
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> <</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">RobotMap</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> config</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{config} /></span></span>
|
|
@@ -136,7 +138,9 @@
|
|
|
136
138
|
<span class="line"></span>
|
|
137
139
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (</span></span>
|
|
138
140
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> <></span></span>
|
|
139
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> <</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">button</span
|
|
141
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> <</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">button</span></span>
|
|
142
|
+
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onClick</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{() </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=></span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> setTheme</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">((</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">t</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=></span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (t </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">===</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 'light'</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> ?</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 'dark'</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> :</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 'light'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">))}</span></span>
|
|
143
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ></span></span>
|
|
140
144
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> 切换到{theme </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">===</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 'light'</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> ?</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> '暗黑'</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> :</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> '浅色'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}主题</span></span>
|
|
141
145
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> </</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">button</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">></span></span>
|
|
142
146
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> <</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">RobotMap</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> config</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{config} /></span></span>
|
|
@@ -182,7 +186,7 @@
|
|
|
182
186
|
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> repeat</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">false</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // 是否平铺(暂未实现)</span></span>
|
|
183
187
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
|
|
184
188
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
|
|
185
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><p><strong>fit 模式说明:</strong></p><ul><li><code>fill</code>:拉伸填充整个视口</li><li><code>contain</code>:完整显示图片,保持宽高比,可能有留白</li><li><code>cover</code>(默认):覆盖整个视口,保持宽高比,可能裁剪</li><li><code>none</code>:原始尺寸显示</li></ul><h3 id="global-backgroundalpha" tabindex="-1">global.backgroundAlpha <a class="header-anchor" href="#global-backgroundalpha" aria-label="Permalink to "global.backgroundAlpha""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>1</code></li></ul><p>地图容器背景透明度。</p><div class="warning custom-block"><p class="custom-block-title">注意</p><p>该配置仅对<strong>纯色背景</strong> (<code>backgroundColor</code>) 和<strong>图片背景</strong> (<code>backgroundImage</code>) 生效。</p><p>对于<strong>渐变背景</strong> (<code>backgroundGradient</code>),请直接在 <code>colorStops</code> 中使用 <code>rgba</code> 颜色值(如 <code>'rgba(255, 255, 255, 0.5)'</code>)来控制透明度。</p></div><h3 id="global-performancemode" tabindex="-1">global.performanceMode <a class="header-anchor" href="#global-performancemode" aria-label="Permalink to "global.performanceMode""></a></h3><ul><li><strong>类型</strong>: <code>boolean</code></li><li><strong>默认值</strong>: <code>false</code></li></ul><p>是否开启高性能模式。开启后,SDK 会优化渲染性能(如强制关闭抗锯齿、共享时钟等),建议在多地图展示等对性能要求较高的场景下开启。</p><h3 id="global-resolution" tabindex="-1">global.resolution <a class="header-anchor" href="#global-resolution" aria-label="Permalink to "global.resolution""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>window.devicePixelRatio</code></li></ul><p>渲染分辨率倍率。通常不需要手动设置,SDK 会自动获取设备的像素密度。在性能极度受限的场景下,可以手动将其设为 <code>1</code> 或 <code>1.5</code> 来降低 GPU 渲染压力。</p><h3 id="global-enablelogger" tabindex="-1">global.enableLogger <a class="header-anchor" href="#global-enablelogger" aria-label="Permalink to "global.enableLogger""></a></h3><ul><li><strong>类型</strong>: <code>boolean</code></li><li><strong>默认值</strong>: <code>import.meta.env.DEV</code></li></ul><p>是否启用日志输出。当设置为 <code>true</code> 时,SDK 会输出内部日志(<code>Logger.log</code>、<code>Logger.warn</code>、<code>Logger.error</code>、<code>Logger.debug</code>、<code>Logger.success</code>);当设置为 <code>false</code> 时,所有日志都不会输出。</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>默认值会跟随构建环境:开发环境通常为 <code>true</code>,生产环境通常为 <code>false</code>。 建议仅在排查问题时开启此选项。</p></div><h2 id="interaction" tabindex="-1">interaction <a class="header-anchor" href="#interaction" aria-label="Permalink to "interaction""></a></h2><p>交互配置,控制地图的缩放和手势操作。</p><h3 id="interaction-zoomrange" tabindex="-1">interaction.zoomRange <a class="header-anchor" href="#interaction-zoomrange" aria-label="Permalink to "interaction.zoomRange""></a></h3><p>缩放范围配置。</p><h4 id="interaction-zoomrange-min" tabindex="-1">interaction.zoomRange.min <a class="header-anchor" href="#interaction-zoomrange-min" aria-label="Permalink to "interaction.zoomRange.min""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>0.5</code></li></ul><p>地图初始化后,支持的最小缩放倍数</p><h4 id="interaction-zoomrange-max" tabindex="-1">interaction.zoomRange.max <a class="header-anchor" href="#interaction-zoomrange-max" aria-label="Permalink to "interaction.zoomRange.max""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>8</code></li></ul><p>地图初始化后,支持的最大缩放倍数</p><h3 id="interaction-fitminscale" tabindex="-1">interaction.fitMinScale <a class="header-anchor" href="#interaction-fitminscale" aria-label="Permalink to "interaction.fitMinScale""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>1</code></li></ul><p>自适应缩放时的最小比例。限制地图缩小的最小程度。</p><h3 id="interaction-fitmaxscale" tabindex="-1">interaction.fitMaxScale <a class="header-anchor" href="#interaction-fitmaxscale" aria-label="Permalink to "interaction.fitMaxScale""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>4</code></li></ul><p>自适应缩放时的最大比例。限制地图放大的最大程度。</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>关于自适应缩放的完整说明,包括触发时机、计算逻辑和常见问题,请参阅 <a href="/guide/advanced-usage.html#自适应缩放">自适应缩放</a>。</p></div><h3 id="interaction-enable" tabindex="-1">interaction.enable <a class="header-anchor" href="#interaction-enable" aria-label="Permalink to "interaction.enable""></a></h3><ul><li><strong>类型</strong>: <code>boolean</code></li><li><strong>默认值</strong>: <code>true</code></li></ul><p>是否开启地图交互总控。设置为 <code>false</code> 时,将完全从底层禁用地图的缩放、平移和点击等交互事件监听,极大减少交互带来的性能开销。</p><h3 id="interaction-enabledoubletapzoom" tabindex="-1">interaction.enableDoubleTapZoom <a class="header-anchor" href="#interaction-enabledoubletapzoom" aria-label="Permalink to "interaction.enableDoubleTapZoom""></a></h3><ul><li><strong>类型</strong>: <code>boolean</code></li><li><strong>默认值</strong>: <code>true</code></li></ul><p>是否启用双击缩放功能</p><h3 id="interaction-enablerobotclick" tabindex="-1">interaction.enableRobotClick <a class="header-anchor" href="#interaction-enablerobotclick" aria-label="Permalink to "interaction.enableRobotClick""></a></h3><ul><li><strong>类型</strong>: <code>boolean</code></li><li><strong>默认值</strong>: <code>false</code></li></ul><p>是否启用扫地机器人的点击交互功能。</p><h3 id="interaction-enablechargingstationclick" tabindex="-1">interaction.enableChargingStationClick <a class="header-anchor" href="#interaction-enablechargingstationclick" aria-label="Permalink to "interaction.enableChargingStationClick""></a></h3><ul><li><strong>类型</strong>: <code>boolean</code></li><li><strong>默认值</strong>: <code>false</code></li></ul><p>是否启用充电桩的点击交互功能。</p><h2 id="map" tabindex="-1">map <a class="header-anchor" href="#map" aria-label="Permalink to "map""></a></h2><p>地图配置。</p><h3 id="map-autopaddinghorizontalpercent" tabindex="-1">map.autoPaddingHorizontalPercent <a class="header-anchor" href="#map-autopaddinghorizontalpercent" aria-label="Permalink to "map.autoPaddingHorizontalPercent""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>0.05</code></li></ul><p>地图自适应时水平方向保留的最小边距比例(相对于视口宽度)。地图完成自适应后,左右边距不小于该比例值。</p><h3 id="map-autopaddingverticalpercent" tabindex="-1">map.autoPaddingVerticalPercent <a class="header-anchor" href="#map-autopaddingverticalpercent" aria-label="Permalink to "map.autoPaddingVerticalPercent""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>0.05</code></li></ul><p>地图自适应时垂直方向保留的最小边距比例(相对于视口高度)。地图完成自适应后,上下边距不小于该比例值。</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>这两个配置用于计算自适应缩放时的初始缩放比例。关于自适应缩放的完整说明,请参阅 <a href="/guide/advanced-usage.html#自适应缩放">自适应缩放</a>。</p></div><h3 id="map-obstaclecolor" tabindex="-1">map.obstacleColor <a class="header-anchor" href="#map-obstaclecolor" aria-label="Permalink to "map.obstacleColor""></a></h3><ul><li><strong>类型</strong>: <code>ColorSource</code></li><li><strong>默认值</strong>: <code>'#999999'</code></li></ul><p>障碍点显示颜色。</p><h3 id="map-freecolor" tabindex="-1">map.freeColor <a class="header-anchor" href="#map-freecolor" aria-label="Permalink to "map.freeColor""></a></h3><ul><li><strong>类型</strong>: <code>ColorSource</code></li><li><strong>默认值</strong>: <code>'#ebebeb'</code></li></ul><p>自由区域点显示颜色。(仅结构化地图可用)</p><h3 id="map-autofitoffset" tabindex="-1">map.autoFitOffset <a class="header-anchor" href="#map-autofitoffset" aria-label="Permalink to "map.autoFitOffset""></a></h3><ul><li><strong>类型</strong>: <code>{ x: number; y: number }</code></li><li><strong>默认值</strong>: <code>{ x: 0, y: 0 }</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>地图自适应时的偏移量。</p><p>用于在地图自适应居中显示时,手动指定一个偏移值(例如为了避开底部的 Footer 组件或顶部的 Header 组件),使地图在视觉上保持在显示区域的中心。</p><h3 id="map-adjacencythreshold" tabindex="-1">map.adjacencyThreshold <a class="header-anchor" href="#map-adjacencythreshold" aria-label="Permalink to "map.adjacencyThreshold""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>3</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>房间相邻判定阈值。</p><p>用于判断两个房间是否相邻的算法。两个房间的边界点距离小于等于此阈值时,认为它们相邻。</p><h3 id="map-originchangeautofitthreshold" tabindex="-1">map.originChangeAutoFitThreshold <a class="header-anchor" href="#map-originchangeautofitthreshold" aria-label="Permalink to "map.originChangeAutoFitThreshold""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>2</code></li></ul><p>地图原点变化自适应阈值。当地图 origin 的 x 或 y 变化超过此值时,将触发自适应缩放。</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>这是触发自适应缩放的条件之一。关于自适应缩放的完整说明,请参阅 <a href="/guide/advanced-usage.html#自适应缩放">自适应缩放</a>。</p></div><h3 id="map-sizechangeautofitthreshold" tabindex="-1">map.sizeChangeAutoFitThreshold <a class="header-anchor" href="#map-sizechangeautofitthreshold" aria-label="Permalink to "map.sizeChangeAutoFitThreshold""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>10</code></li></ul><p>地图尺寸变化自适应阈值。当地图宽度或高度变化超过此值时,将触发自适应缩放。</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>这是触发自适应缩放的条件之一。关于自适应缩放的完整说明,请参阅 <a href="/guide/advanced-usage.html#自适应缩放">自适应缩放</a>。</p></div><h2 id="heatmap" tabindex="-1">heatmap <a class="header-anchor" href="#heatmap" aria-label="Permalink to "heatmap""></a></h2><p>热力图配置,控制信号强度热力图的渲染效果。</p><h3 id="heatmap-cellsize" tabindex="-1">heatmap.cellSize <a class="header-anchor" href="#heatmap-cellsize" aria-label="Permalink to "heatmap.cellSize""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>2</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>热力图单元格大小。</p><h3 id="heatmap-maxdistance" tabindex="-1">heatmap.maxDistance <a class="header-anchor" href="#heatmap-maxdistance" aria-label="Permalink to "heatmap.maxDistance""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>14</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>热力图影响的最大距离。</p><h3 id="heatmap-smoothiterations" tabindex="-1">heatmap.smoothIterations <a class="header-anchor" href="#heatmap-smoothiterations" aria-label="Permalink to "heatmap.smoothIterations""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>10</code></li></ul><p>热力图平滑迭代次数。</p><h3 id="heatmap-heatmapalpha" tabindex="-1">heatmap.heatmapAlpha <a class="header-anchor" href="#heatmap-heatmapalpha" aria-label="Permalink to "heatmap.heatmapAlpha""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>0.8</code></li></ul><p>热力图透明度 (0-1)。</p><h3 id="heatmap-usegradient" tabindex="-1">heatmap.useGradient <a class="header-anchor" href="#heatmap-usegradient" aria-label="Permalink to "heatmap.useGradient""></a></h3><ul><li><strong>类型</strong>: <code>boolean</code></li><li><strong>默认值</strong>: <code>true</code></li></ul><p>是否启用颜色渐变。关闭后会使用统一色阶渲染。</p><h3 id="heatmap-colorgradients" tabindex="-1">heatmap.colorGradients <a class="header-anchor" href="#heatmap-colorgradients" aria-label="Permalink to "heatmap.colorGradients""></a></h3><ul><li><strong>类型</strong>: <code>[ColorSource, ColorSource, ColorSource, ColorSource, ColorSource, ColorSource, ColorSource, ColorSource]</code></li><li><strong>默认值</strong>: <code>['#FF3B30', '#FF7A00', '#FFA100', '#FFD700', '#99DD70', '#2EC070', '#40E0D0', '#88D0E9']</code></li></ul><p>热力图颜色渐变配置,从高强度到低强度。</p><h2 id="room" tabindex="-1">room <a class="header-anchor" href="#room" aria-label="Permalink to "room""></a></h2><p>房间配置,控制房间的颜色、名称、属性显示等。</p><h3 id="room-colors" tabindex="-1">room.colors <a class="header-anchor" href="#room-colors" aria-label="Permalink to "room.colors""></a></h3><p>房间颜色配置对象。</p><div class="tip custom-block"><p class="custom-block-title">智能配色</p><p>SDK 使用<strong>智能配色算法</strong>,自动确保相邻房间颜色不同。</p><ul><li><strong>建议至少提供 4 种颜色</strong>(基于<a href="https://zh.wikipedia.org/wiki/%E5%9B%9B%E8%89%B2%E5%AE%9A%E7%90%86" target="_blank" rel="noreferrer">四色定理</a>,4种颜色足以满足平面地图需求)</li><li>所有数组类型的颜色配置(<code>active</code>、<code>inactive</code>、<code>name</code>、<code>propertyTheme</code> 等)<strong>建议长度一致</strong></li><li>如果有复杂的相邻房间情况,可以尝试增加更多的颜色,以确保相邻房间颜色不同</li></ul><p>关于智能配色算法的完整说明、配色策略和实际案例,请参阅 <a href="/guide/advanced-usage.html#房间智能配色">房间智能配色</a>。</p></div><h3 id="room-colors-sortby" tabindex="-1">room.colors.sortBy <a class="header-anchor" href="#room-colors-sortby" aria-label="Permalink to "room.colors.sortBy""></a></h3><ul><li><strong>类型</strong>: <code>'index' | 'area'</code></li><li><strong>默认值</strong>: <code>'index'</code></li></ul><p>房间颜色排序方式。</p><ul><li><code>index</code>:按房间ID排序,保持颜色分配稳定。</li><li><code>area</code>:按房间面积排序,大房间将优先分配索引靠前的颜色。</li></ul><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>使用 <code>area</code> 可能会导致机器导航过程中颜色的突然变化(房间大小变化引起),建议谨慎使用。</p></div><h3 id="room-colors-strategy" tabindex="-1">room.colors.strategy <a class="header-anchor" href="#room-colors-strategy" aria-label="Permalink to "room.colors.strategy""></a></h3><ul><li><strong>类型</strong>: <code>'priority' | 'balanced'</code></li><li><strong>默认值</strong>: <code>'priority'</code></li></ul><p>房间颜色分配策略。</p><ul><li><code>priority</code>:靠前优先,索引靠前的颜色将被优先使用。</li><li><code>balanced</code>:均匀分配,颜色将被尽可能均匀地使用。</li></ul><h4 id="room-colors-active" tabindex="-1">room.colors.active <a class="header-anchor" href="#room-colors-active" aria-label="Permalink to "room.colors.active""></a></h4><ul><li><strong>类型</strong>: <code>string[]</code></li><li><strong>默认值</strong>: <code>['#a8c8f5', '#9de5c7', '#d4b9f7', '#ffd399']</code></li></ul><p>房间激活状态的颜色数组。</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><ul><li><strong>当 <code>enableRoomSelection: true</code> 时</strong>:代表“被选中”房间的填充色。</li><li><strong>当 <code>enableRoomSelection: false</code> 时</strong>:若未定义 <code>room.colors.normal</code>,默认使用此配置。</li></ul></div><h4 id="room-colors-inactive" tabindex="-1">room.colors.inactive <a class="header-anchor" href="#room-colors-inactive" aria-label="Permalink to "room.colors.inactive""></a></h4><ul><li><strong>类型</strong>: <code>string[]</code></li><li><strong>默认值</strong>: <code>['#d6e7fc', '#d1f4e5', '#ece0fb', '#fff0d9']</code></li></ul><p>房间非激活状态的颜色数组。</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>仅在 <code>enableRoomSelection: true</code> 且房间“未被选中”时生效。</p></div><p>颜色索引与 <code>active</code> 对应,建议长度保持一致。</p><h4 id="room-colors-normal" tabindex="-1">room.colors.normal <a class="header-anchor" href="#room-colors-normal" aria-label="Permalink to "room.colors.normal""></a></h4><ul><li><strong>类型</strong>: <code>string[]</code></li><li><strong>默认值</strong>: <code>undefined</code></li></ul><p>房间在普通展示模式下的填充颜色数组。</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>仅在 <code>enableRoomSelection: false</code> 时生效。若未定义,默认使用 <code>room.colors.active</code> 的配置。</p></div><h4 id="room-colors-name" tabindex="-1">room.colors.name <a class="header-anchor" href="#room-colors-name" aria-label="Permalink to "room.colors.name""></a></h4><ul><li><strong>类型</strong>: <code>string[]</code></li><li><strong>默认值</strong>: <code>['#2563b8', '#26966b', '#7c3fb8', '#d97706']</code></li></ul><p>房间名称标签的颜色数组。</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><ul><li><strong>当 <code>enableRoomSelection: true</code> 时</strong>:代表“被选中”房间的文字颜色。</li><li><strong>当 <code>enableRoomSelection: false</code> 时</strong>:若未定义 <code>room.colors.nameNormal</code>,默认使用此配置。</li></ul></div><p>颜色索引与 <code>active</code> 对应,建议长度保持一致。</p><h4 id="room-colors-nameinactive" tabindex="-1">room.colors.nameInactive <a class="header-anchor" href="#room-colors-nameinactive" aria-label="Permalink to "room.colors.nameInactive""></a></h4><ul><li><strong>类型</strong>: <code>string[]</code></li><li><strong>默认值</strong>: <code>undefined</code></li></ul><p>房间名称标签在非激活状态下的颜色数组。</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>仅在 <code>enableRoomSelection: true</code> 且房间“未被选中”时生效。</p></div><p>如果不配置,则默认使用 <code>room.colors.name</code>。</p><h4 id="room-colors-namenormal" tabindex="-1">room.colors.nameNormal <a class="header-anchor" href="#room-colors-namenormal" aria-label="Permalink to "room.colors.nameNormal""></a></h4><ul><li><strong>类型</strong>: <code>string[]</code></li><li><strong>默认值</strong>: <code>undefined</code></li></ul><p>房间名称标签在普通展示模式下的颜色数组。</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>仅在 <code>enableRoomSelection: false</code> 时生效。若未定义,默认使用 <code>room.colors.name</code> 的配置。</p></div><h4 id="room-colors-propertytheme" tabindex="-1">room.colors.propertyTheme <a class="header-anchor" href="#room-colors-propertytheme" aria-label="Permalink to "room.colors.propertyTheme""></a></h4><ul><li><strong>类型</strong>: <code>string[]</code></li><li><strong>默认值</strong>: <code>['#2563b8', '#26966b', '#7c3fb8', '#d97706']</code></li></ul><p>房间属性图标主题颜色数组。</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><ul><li><strong>当 <code>enableRoomSelection: true</code> 时</strong>:代表“被选中”房间的图标颜色。</li><li><strong>当 <code>enableRoomSelection: false</code> 时</strong>:若未定义 <code>room.colors.propertyThemeNormal</code>,默认使用此配置。</li></ul></div><p>颜色索引与 <code>active</code> 对应,建议长度保持一致。</p><h4 id="room-colors-propertythemeinactive" tabindex="-1">room.colors.propertyThemeInactive <a class="header-anchor" href="#room-colors-propertythemeinactive" aria-label="Permalink to "room.colors.propertyThemeInactive""></a></h4><ul><li><strong>类型</strong>: <code>string[]</code></li><li><strong>默认值</strong>: <code>undefined</code></li></ul><p>房间属性图标在非激活状态下的颜色数组。</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>仅在 <code>enableRoomSelection: true</code> 且房间“未被选中”时生效。</p></div><p>如果不配置,则默认使用 <code>room.colors.propertyTheme</code>。</p><h4 id="room-colors-propertythemenormal" tabindex="-1">room.colors.propertyThemeNormal <a class="header-anchor" href="#room-colors-propertythemenormal" aria-label="Permalink to "room.colors.propertyThemeNormal""></a></h4><ul><li><strong>类型</strong>: <code>string[]</code></li><li><strong>默认值</strong>: <code>undefined</code></li></ul><p>房间属性图标在普通展示模式下的主题颜色数组。</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>仅在 <code>enableRoomSelection: false</code> 时生效。若未定义,默认使用 <code>room.colors.propertyTheme</code> 的配置。</p></div><h4 id="room-colors-selectionindicatorbackground" tabindex="-1">room.colors.selectionIndicatorBackground <a class="header-anchor" href="#room-colors-selectionindicatorbackground" aria-label="Permalink to "room.colors.selectionIndicatorBackground""></a></h4><ul><li><strong>类型</strong>: <code>string[]</code></li><li><strong>默认值</strong>: <code>['#2563b8', '#26966b', '#7c3fb8', '#d97706']</code></li></ul><p>选择指示器背景颜色数组。</p><p>颜色索引与 <code>active</code> 对应,建议长度保持一致。</p><h4 id="room-colors-selectionindicatoricon" tabindex="-1">room.colors.selectionIndicatorIcon <a class="header-anchor" href="#room-colors-selectionindicatoricon" aria-label="Permalink to "room.colors.selectionIndicatorIcon""></a></h4><ul><li><strong>类型</strong>: <code>string[]</code></li><li><strong>默认值</strong>: <code>['#ffffff', '#ffffff', '#ffffff', '#ffffff']</code></li></ul><p>选择指示器图标颜色数组。</p><p>颜色索引与 <code>active</code> 对应,建议长度保持一致。</p><h4 id="room-colors-no-room-data" tabindex="-1">room.colors.NO_ROOM_DATA <a class="header-anchor" href="#room-colors-no-room-data" aria-label="Permalink to "room.colors.NO_ROOM_DATA""></a></h4><ul><li><strong>类型</strong>: <code>string</code></li><li><strong>默认值</strong>: <code>'#ebebeb'</code></li></ul><p>无房间数据区域的颜色 (点阵协议专用)。</p><h4 id="room-colors-room-gap" tabindex="-1">room.colors.ROOM_GAP <a class="header-anchor" href="#room-colors-room-gap" aria-label="Permalink to "room.colors.ROOM_GAP""></a></h4><ul><li><strong>类型</strong>: <code>string</code></li><li><strong>默认值</strong>: <code>'#ebebeb'</code></li></ul><p>房间间隙的颜色 (点阵协议专用)。</p><h4 id="room-colors-obstacle-room" tabindex="-1">room.colors.OBSTACLE_ROOM <a class="header-anchor" href="#room-colors-obstacle-room" aria-label="Permalink to "room.colors.OBSTACLE_ROOM""></a></h4><ul><li><strong>类型</strong>: <code>string</code></li><li><strong>默认值</strong>: <code>'#ebebeb'</code></li></ul><p>障碍物房间的颜色 (点阵协议专用)。</p><h4 id="room-colors-unknown-room" tabindex="-1">room.colors.UNKNOWN_ROOM <a class="header-anchor" href="#room-colors-unknown-room" aria-label="Permalink to "room.colors.UNKNOWN_ROOM""></a></h4><ul><li><strong>类型</strong>: <code>string</code></li><li><strong>默认值</strong>: <code>'#ebebeb'</code></li></ul><p>未知房间的颜色。对于结构化协议代表 <code>roomId >= 255</code> 的房间颜色。</p><h4 id="room-colors-version0-room" tabindex="-1">room.colors.VERSION0_ROOM <a class="header-anchor" href="#room-colors-version0-room" aria-label="Permalink to "room.colors.VERSION0_ROOM""></a></h4><ul><li><strong>类型</strong>: <code>string</code></li><li><strong>默认值</strong>: <code>''</code></li></ul><p>点阵地图协议版本0的房间颜色 (点阵协议专用)。</p><div class="tip custom-block"><p class="custom-block-title">版本兼容说明</p><p>此配置项用于控制地图协议版本0(未支持分区的协议版本)中房间的颜色。在之前的版本中,版本0的房间和无房间数据区域都使用 <code>NO_ROOM_DATA</code> 颜色。现已将版本0的房间单独拆分为 <code>VERSION0_ROOM</code>。</p><p>默认值为空字符串,此时将自动使用 <code>NO_ROOM_DATA</code> 的颜色,以保持向后兼容。如需区分显示,可配置为不同的颜色值。</p></div><h3 id="room-namelabel" tabindex="-1">room.nameLabel <a class="header-anchor" href="#room-namelabel" aria-label="Permalink to "room.nameLabel""></a></h3><p>房间名称标签配置。</p><h4 id="room-namelabel-fontsize" tabindex="-1">room.nameLabel.fontSize <a class="header-anchor" href="#room-namelabel-fontsize" aria-label="Permalink to "room.nameLabel.fontSize""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>12</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>房间名称字体大小。</p><h4 id="room-namelabel-fontfamily" tabindex="-1">room.nameLabel.fontFamily <a class="header-anchor" href="#room-namelabel-fontfamily" aria-label="Permalink to "room.nameLabel.fontFamily""></a></h4><ul><li><strong>类型</strong>: <code>string</code></li><li><strong>默认值</strong>: <code>'system-ui, -apple-system, sans-serif'</code></li></ul><p>房间名称字体名称。</p><h4 id="room-namelabel-fontweight" tabindex="-1">room.nameLabel.fontWeight <a class="header-anchor" href="#room-namelabel-fontweight" aria-label="Permalink to "room.nameLabel.fontWeight""></a></h4><ul><li><strong>类型</strong>: <code>TextStyleFontWeight</code></li><li><strong>默认值</strong>: <code>'500'</code></li></ul><p>房间名称字体粗细。</p><h3 id="room-type" tabindex="-1">room.type <a class="header-anchor" href="#room-type" aria-label="Permalink to "room.type""></a></h3><p>房间类型图标配置。</p><h4 id="room-type-assets" tabindex="-1">room.type.assets <a class="header-anchor" href="#room-type-assets" aria-label="Permalink to "room.type.assets""></a></h4><ul><li><strong>类型</strong>: <code>string[]</code></li><li><strong>默认值</strong>: <code>[内置资源, ...]</code></li></ul><p>房间类型图标资源数组。</p><p>数组索引对应 <code>RoomProperty.type</code> 值,即 <code>assets[type]</code> 显示该索引对应的图标。</p><p><strong>内置默认资源映射表:</strong></p><p>以下是内置默认图标与 <code>type</code> 值的对应关系:</p><table tabindex="0"><thead><tr><th style="text-align:left;">ID (索引)</th><th style="text-align:left;">房间类型</th></tr></thead><tbody><tr><td style="text-align:left;">0</td><td style="text-align:left;">通用/房间</td></tr><tr><td style="text-align:left;">1</td><td style="text-align:left;">客厅</td></tr><tr><td style="text-align:left;">2</td><td style="text-align:left;">餐厅</td></tr><tr><td style="text-align:left;">3</td><td style="text-align:left;">主卧</td></tr><tr><td style="text-align:left;">4</td><td style="text-align:left;">次卧/卧室</td></tr><tr><td style="text-align:left;">5</td><td style="text-align:left;">书房</td></tr><tr><td style="text-align:left;">6</td><td style="text-align:left;">厨房</td></tr><tr><td style="text-align:left;">7</td><td style="text-align:left;">卫生间</td></tr><tr><td style="text-align:left;">8</td><td style="text-align:left;">洗衣房</td></tr><tr><td style="text-align:left;">9</td><td style="text-align:left;">休息室</td></tr><tr><td style="text-align:left;">10</td><td style="text-align:left;">储物间</td></tr><tr><td style="text-align:left;">11</td><td style="text-align:left;">儿童房</td></tr><tr><td style="text-align:left;">12</td><td style="text-align:left;">阳光房</td></tr><tr><td style="text-align:left;">13</td><td style="text-align:left;">走廊</td></tr><tr><td style="text-align:left;">14</td><td style="text-align:left;">阳台</td></tr><tr><td style="text-align:left;">15</td><td style="text-align:left;">健身房</td></tr><tr><td style="text-align:left;">16</td><td style="text-align:left;">玄关</td></tr></tbody></table><p>当使用内置默认资源时,索引与房间类型的对应关系详见<a href="/guide/advanced-usage.html#房间类型图标">房间类型图标</a>。如果开发者通过此配置项自定义了数组,则映射关系完全取决于自定义数组的顺序。</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>如果某个索引对应的资源为空字符串(<code>''</code>),则该类型的房间将不会显示任何图标。例如,通过设置 <code>assets[0] = ''</code> 可以隐藏 type 为 0 的房间图标。</p></div><h4 id="room-type-iconsize" tabindex="-1">room.type.iconSize <a class="header-anchor" href="#room-type-iconsize" aria-label="Permalink to "room.type.iconSize""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>12</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>房间类型图标大小。</p><h4 id="room-type-gap" tabindex="-1">room.type.gap <a class="header-anchor" href="#room-type-gap" aria-label="Permalink to "room.type.gap""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>4</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>图标与房间名称文字之间的间距。</p><h4 id="room-type-position" tabindex="-1">room.type.position <a class="header-anchor" href="#room-type-position" aria-label="Permalink to "room.type.position""></a></h4><ul><li><strong>类型</strong>: <code>'left' | 'right'</code></li><li><strong>默认值</strong>: <code>'left'</code></li></ul><p>图标相对于房间名称文字的显示位置。</p><h4 id="room-type-container" tabindex="-1">room.type.container <a class="header-anchor" href="#room-type-container" aria-label="Permalink to "room.type.container""></a></h4><p>房间类型图标背景容器配置。</p><h5 id="room-type-container-visible" tabindex="-1">room.type.container.visible <a class="header-anchor" href="#room-type-container-visible" aria-label="Permalink to "room.type.container.visible""></a></h5><ul><li><strong>类型</strong>: <code>boolean</code></li><li><strong>默认值</strong>: <code>true</code></li></ul><p>是否显示背景容器。</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><ul><li><strong>颜色逻辑</strong>: <ul><li>当开启背景容器(<code>container.visible: true</code>)时,背景将填充为房间名称颜色(<code>room.colors.name</code>),图标将自动设置为白色(<code>tint: #ffffff</code>)。</li><li>当禁用背景容器(<code>container.visible: false</code>)时,图标将直接使用房间名称颜色(<code>room.colors.name</code>)。</li></ul></li><li><strong>最佳实践</strong>:为了实现自动换色效果,建议使用单色(通常为黑色或白色)的 SVG 资源。如果使用彩色 PNG 资源,建议将 <code>container.visible</code> 设为 <code>false</code> 以保持原色。</li></ul></div><h5 id="room-type-container-size" tabindex="-1">room.type.container.size <a class="header-anchor" href="#room-type-container-size" aria-label="Permalink to "room.type.container.size""></a></h5><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>16</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>背景容器大小。</p><h5 id="room-type-container-borderradius" tabindex="-1">room.type.container.borderRadius <a class="header-anchor" href="#room-type-container-borderradius" aria-label="Permalink to "room.type.container.borderRadius""></a></h5><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>16</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>背景容器圆角大小。</p><h3 id="room-property" tabindex="-1">room.property <a class="header-anchor" href="#room-property" aria-label="Permalink to "room.property""></a></h3><p>房间属性配置。</p><h4 id="room-property-displayorders" tabindex="-1">room.property.displayOrders <a class="header-anchor" href="#room-property-displayorders" aria-label="Permalink to "room.property.displayOrders""></a></h4><ul><li><strong>类型</strong>: <code>('cleanMode' | 'suction' | 'cistern' | 'cleanTimes' | string)[]</code></li><li><strong>默认值</strong>: <code>['cleanMode', 'suction', 'cistern', 'cleanTimes']</code></li></ul><p>房间属性显示顺序。</p><p>你也可以传入自定义的字段名,比如 <code>['cleanMode', 'suction', 'cistern', 'cleanTimes', 'customProperty1']</code>。</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>如果要隐藏某个房间属性,比如 <code>cleanTimes</code>,那么清扫次数图标将不会显示。</p></div><h4 id="room-property-customassets" tabindex="-1">room.property.customAssets <a class="header-anchor" href="#room-property-customassets" aria-label="Permalink to "room.property.customAssets""></a></h4><ul><li><strong>类型</strong>: <code>Record<string, string[]></code></li><li><strong>默认值</strong>: <code>undefined</code></li></ul><p>自定义属性图标资源配置,</p><p>你可以传入自定义的字段名和对应的图标资源数组,比如:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
|
|
189
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><p><strong>fit 模式说明:</strong></p><ul><li><code>fill</code>:拉伸填充整个视口</li><li><code>contain</code>:完整显示图片,保持宽高比,可能有留白</li><li><code>cover</code>(默认):覆盖整个视口,保持宽高比,可能裁剪</li><li><code>none</code>:原始尺寸显示</li></ul><h3 id="global-backgroundalpha" tabindex="-1">global.backgroundAlpha <a class="header-anchor" href="#global-backgroundalpha" aria-label="Permalink to "global.backgroundAlpha""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>1</code></li></ul><p>地图容器背景透明度。</p><div class="warning custom-block"><p class="custom-block-title">注意</p><p>该配置仅对<strong>纯色背景</strong> (<code>backgroundColor</code>) 和<strong>图片背景</strong> (<code>backgroundImage</code>) 生效。</p><p>对于<strong>渐变背景</strong> (<code>backgroundGradient</code>),请直接在 <code>colorStops</code> 中使用 <code>rgba</code> 颜色值(如 <code>'rgba(255, 255, 255, 0.5)'</code>)来控制透明度。</p></div><h3 id="global-performancemode" tabindex="-1">global.performanceMode <a class="header-anchor" href="#global-performancemode" aria-label="Permalink to "global.performanceMode""></a></h3><ul><li><strong>类型</strong>: <code>boolean</code></li><li><strong>默认值</strong>: <code>false</code></li></ul><p>是否开启高性能模式。开启后,SDK 会优化渲染性能(如强制关闭抗锯齿、共享时钟等),建议在多地图展示等对性能要求较高的场景下开启。</p><h3 id="global-resolution" tabindex="-1">global.resolution <a class="header-anchor" href="#global-resolution" aria-label="Permalink to "global.resolution""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>window.devicePixelRatio</code></li></ul><p>渲染分辨率倍率。通常不需要手动设置,SDK 会自动获取设备的像素密度。在性能极度受限的场景下,可以手动将其设为 <code>1</code> 或 <code>1.5</code> 来降低 GPU 渲染压力。</p><h3 id="global-enablelogger" tabindex="-1">global.enableLogger <a class="header-anchor" href="#global-enablelogger" aria-label="Permalink to "global.enableLogger""></a></h3><ul><li><strong>类型</strong>: <code>boolean</code></li><li><strong>默认值</strong>: <code>import.meta.env.DEV</code></li></ul><p>是否启用日志输出。当设置为 <code>true</code> 时,SDK 会输出内部日志(<code>Logger.log</code>、<code>Logger.warn</code>、<code>Logger.error</code>、<code>Logger.debug</code>、<code>Logger.success</code>);当设置为 <code>false</code> 时,所有日志都不会输出。</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>默认值会跟随构建环境:开发环境通常为 <code>true</code>,生产环境通常为 <code>false</code>。 建议仅在排查问题时开启此选项。</p></div><h3 id="global-rendererpreference" tabindex="-1">global.rendererPreference <a class="header-anchor" href="#global-rendererpreference" aria-label="Permalink to "global.rendererPreference""></a></h3><ul><li><strong>类型</strong>: <code>'webgpu' | 'webgl'</code></li><li><strong>默认值</strong>: <code>'webgpu'</code></li></ul><p>渲染器偏好,设置 PIXI.js 优先使用的渲染后端。</p><h2 id="interaction" tabindex="-1">interaction <a class="header-anchor" href="#interaction" aria-label="Permalink to "interaction""></a></h2><p>交互配置,控制地图的缩放和手势操作。</p><h3 id="interaction-zoomrange" tabindex="-1">interaction.zoomRange <a class="header-anchor" href="#interaction-zoomrange" aria-label="Permalink to "interaction.zoomRange""></a></h3><p>缩放范围配置。</p><h4 id="interaction-zoomrange-min" tabindex="-1">interaction.zoomRange.min <a class="header-anchor" href="#interaction-zoomrange-min" aria-label="Permalink to "interaction.zoomRange.min""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>0.5</code></li></ul><p>地图初始化后,支持的最小缩放倍数</p><h4 id="interaction-zoomrange-max" tabindex="-1">interaction.zoomRange.max <a class="header-anchor" href="#interaction-zoomrange-max" aria-label="Permalink to "interaction.zoomRange.max""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>8</code></li></ul><p>地图初始化后,支持的最大缩放倍数</p><h3 id="interaction-fitminscale" tabindex="-1">interaction.fitMinScale <a class="header-anchor" href="#interaction-fitminscale" aria-label="Permalink to "interaction.fitMinScale""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>1</code></li></ul><p>自适应缩放时的最小比例。限制地图缩小的最小程度。</p><h3 id="interaction-fitmaxscale" tabindex="-1">interaction.fitMaxScale <a class="header-anchor" href="#interaction-fitmaxscale" aria-label="Permalink to "interaction.fitMaxScale""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>4</code></li></ul><p>自适应缩放时的最大比例。限制地图放大的最大程度。</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>关于自适应缩放的完整说明,包括触发时机、计算逻辑和常见问题,请参阅 <a href="/guide/advanced-usage.html#自适应缩放">自适应缩放</a>。</p></div><h3 id="interaction-enable" tabindex="-1">interaction.enable <a class="header-anchor" href="#interaction-enable" aria-label="Permalink to "interaction.enable""></a></h3><ul><li><strong>类型</strong>: <code>boolean</code></li><li><strong>默认值</strong>: <code>true</code></li></ul><p>是否开启地图交互总控。设置为 <code>false</code> 时,将完全从底层禁用地图的缩放、平移和点击等交互事件监听,极大减少交互带来的性能开销。</p><h3 id="interaction-enabledoubletapzoom" tabindex="-1">interaction.enableDoubleTapZoom <a class="header-anchor" href="#interaction-enabledoubletapzoom" aria-label="Permalink to "interaction.enableDoubleTapZoom""></a></h3><ul><li><strong>类型</strong>: <code>boolean</code></li><li><strong>默认值</strong>: <code>true</code></li></ul><p>是否启用双击缩放功能</p><h3 id="interaction-enablerobotclick" tabindex="-1">interaction.enableRobotClick <a class="header-anchor" href="#interaction-enablerobotclick" aria-label="Permalink to "interaction.enableRobotClick""></a></h3><ul><li><strong>类型</strong>: <code>boolean</code></li><li><strong>默认值</strong>: <code>false</code></li></ul><p>是否启用扫地机器人的点击交互功能。</p><h3 id="interaction-enablechargingstationclick" tabindex="-1">interaction.enableChargingStationClick <a class="header-anchor" href="#interaction-enablechargingstationclick" aria-label="Permalink to "interaction.enableChargingStationClick""></a></h3><ul><li><strong>类型</strong>: <code>boolean</code></li><li><strong>默认值</strong>: <code>false</code></li></ul><p>是否启用充电桩的点击交互功能。</p><h2 id="map" tabindex="-1">map <a class="header-anchor" href="#map" aria-label="Permalink to "map""></a></h2><p>地图配置。</p><h3 id="map-autopaddinghorizontalpercent" tabindex="-1">map.autoPaddingHorizontalPercent <a class="header-anchor" href="#map-autopaddinghorizontalpercent" aria-label="Permalink to "map.autoPaddingHorizontalPercent""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>0.05</code></li></ul><p>地图自适应时水平方向保留的最小边距比例(相对于视口宽度)。地图完成自适应后,左右边距不小于该比例值。</p><h3 id="map-autopaddingverticalpercent" tabindex="-1">map.autoPaddingVerticalPercent <a class="header-anchor" href="#map-autopaddingverticalpercent" aria-label="Permalink to "map.autoPaddingVerticalPercent""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>0.05</code></li></ul><p>地图自适应时垂直方向保留的最小边距比例(相对于视口高度)。地图完成自适应后,上下边距不小于该比例值。</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>这两个配置用于计算自适应缩放时的初始缩放比例。关于自适应缩放的完整说明,请参阅 <a href="/guide/advanced-usage.html#自适应缩放">自适应缩放</a>。</p></div><h3 id="map-obstaclecolor" tabindex="-1">map.obstacleColor <a class="header-anchor" href="#map-obstaclecolor" aria-label="Permalink to "map.obstacleColor""></a></h3><ul><li><strong>类型</strong>: <code>ColorSource</code></li><li><strong>默认值</strong>: <code>'#999999'</code></li></ul><p>障碍点显示颜色。</p><h3 id="map-freecolor" tabindex="-1">map.freeColor <a class="header-anchor" href="#map-freecolor" aria-label="Permalink to "map.freeColor""></a></h3><ul><li><strong>类型</strong>: <code>ColorSource</code></li><li><strong>默认值</strong>: <code>'#ebebeb'</code></li></ul><p>自由区域点显示颜色。(仅结构化地图可用)</p><h3 id="map-autofitoffset" tabindex="-1">map.autoFitOffset <a class="header-anchor" href="#map-autofitoffset" aria-label="Permalink to "map.autoFitOffset""></a></h3><ul><li><strong>类型</strong>: <code>{ x: number; y: number }</code></li><li><strong>默认值</strong>: <code>{ x: 0, y: 0 }</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>地图自适应时的偏移量。</p><p>用于在地图自适应居中显示时,手动指定一个偏移值(例如为了避开底部的 Footer 组件或顶部的 Header 组件),使地图在视觉上保持在显示区域的中心。</p><h3 id="map-adjacencythreshold" tabindex="-1">map.adjacencyThreshold <a class="header-anchor" href="#map-adjacencythreshold" aria-label="Permalink to "map.adjacencyThreshold""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>3</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>房间相邻判定阈值。</p><p>用于判断两个房间是否相邻的算法。两个房间的边界点距离小于等于此阈值时,认为它们相邻。</p><h3 id="map-originchangeautofitthreshold" tabindex="-1">map.originChangeAutoFitThreshold <a class="header-anchor" href="#map-originchangeautofitthreshold" aria-label="Permalink to "map.originChangeAutoFitThreshold""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>2</code></li></ul><p>地图原点变化自适应阈值。当地图 origin 的 x 或 y 变化超过此值时,将触发自适应缩放。</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>这是触发自适应缩放的条件之一。关于自适应缩放的完整说明,请参阅 <a href="/guide/advanced-usage.html#自适应缩放">自适应缩放</a>。</p></div><h3 id="map-sizechangeautofitthreshold" tabindex="-1">map.sizeChangeAutoFitThreshold <a class="header-anchor" href="#map-sizechangeautofitthreshold" aria-label="Permalink to "map.sizeChangeAutoFitThreshold""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>10</code></li></ul><p>地图尺寸变化自适应阈值。当地图宽度或高度变化超过此值时,将触发自适应缩放。</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>这是触发自适应缩放的条件之一。关于自适应缩放的完整说明,请参阅 <a href="/guide/advanced-usage.html#自适应缩放">自适应缩放</a>。</p></div><h2 id="heatmap" tabindex="-1">heatmap <a class="header-anchor" href="#heatmap" aria-label="Permalink to "heatmap""></a></h2><p>热力图配置,控制信号强度热力图的渲染效果。</p><h3 id="heatmap-cellsize" tabindex="-1">heatmap.cellSize <a class="header-anchor" href="#heatmap-cellsize" aria-label="Permalink to "heatmap.cellSize""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>2</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>热力图单元格大小。</p><h3 id="heatmap-maxdistance" tabindex="-1">heatmap.maxDistance <a class="header-anchor" href="#heatmap-maxdistance" aria-label="Permalink to "heatmap.maxDistance""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>14</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>热力图影响的最大距离。</p><h3 id="heatmap-smoothiterations" tabindex="-1">heatmap.smoothIterations <a class="header-anchor" href="#heatmap-smoothiterations" aria-label="Permalink to "heatmap.smoothIterations""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>10</code></li></ul><p>热力图平滑迭代次数。</p><h3 id="heatmap-heatmapalpha" tabindex="-1">heatmap.heatmapAlpha <a class="header-anchor" href="#heatmap-heatmapalpha" aria-label="Permalink to "heatmap.heatmapAlpha""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>0.8</code></li></ul><p>热力图透明度 (0-1)。</p><h3 id="heatmap-usegradient" tabindex="-1">heatmap.useGradient <a class="header-anchor" href="#heatmap-usegradient" aria-label="Permalink to "heatmap.useGradient""></a></h3><ul><li><strong>类型</strong>: <code>boolean</code></li><li><strong>默认值</strong>: <code>true</code></li></ul><p>是否启用颜色渐变。关闭后会使用统一色阶渲染。</p><h3 id="heatmap-colorgradients" tabindex="-1">heatmap.colorGradients <a class="header-anchor" href="#heatmap-colorgradients" aria-label="Permalink to "heatmap.colorGradients""></a></h3><ul><li><strong>类型</strong>: <code>[ColorSource, ColorSource, ColorSource, ColorSource, ColorSource, ColorSource, ColorSource, ColorSource]</code></li><li><strong>默认值</strong>: <code>['#FF3B30', '#FF7A00', '#FFA100', '#FFD700', '#99DD70', '#2EC070', '#40E0D0', '#88D0E9']</code></li></ul><p>热力图颜色渐变配置,从高强度到低强度。</p><h2 id="room" tabindex="-1">room <a class="header-anchor" href="#room" aria-label="Permalink to "room""></a></h2><p>房间配置,控制房间的颜色、名称、属性显示等。</p><h3 id="room-colors" tabindex="-1">room.colors <a class="header-anchor" href="#room-colors" aria-label="Permalink to "room.colors""></a></h3><p>房间颜色配置对象。</p><div class="tip custom-block"><p class="custom-block-title">智能配色</p><p>SDK 使用<strong>智能配色算法</strong>,自动确保相邻房间颜色不同。</p><ul><li><strong>建议至少提供 4 种颜色</strong>(基于<a href="https://zh.wikipedia.org/wiki/%E5%9B%9B%E8%89%B2%E5%AE%9A%E7%90%86" target="_blank" rel="noreferrer">四色定理</a>,4种颜色足以满足平面地图需求)</li><li>所有数组类型的颜色配置(<code>active</code>、<code>inactive</code>、<code>name</code>、<code>propertyTheme</code> 等)<strong>建议长度一致</strong></li><li>如果有复杂的相邻房间情况,可以尝试增加更多的颜色,以确保相邻房间颜色不同</li></ul><p>关于智能配色算法的完整说明、配色策略和实际案例,请参阅 <a href="/guide/advanced-usage.html#房间智能配色">房间智能配色</a>。</p></div><h3 id="room-colors-sortby" tabindex="-1">room.colors.sortBy <a class="header-anchor" href="#room-colors-sortby" aria-label="Permalink to "room.colors.sortBy""></a></h3><ul><li><strong>类型</strong>: <code>'index' | 'area'</code></li><li><strong>默认值</strong>: <code>'index'</code></li></ul><p>房间颜色排序方式。</p><ul><li><code>index</code>:按房间ID排序,保持颜色分配稳定。</li><li><code>area</code>:按房间面积排序,大房间将优先分配索引靠前的颜色。</li></ul><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>使用 <code>area</code> 可能会导致机器导航过程中颜色的突然变化(房间大小变化引起),建议谨慎使用。</p></div><h3 id="room-colors-strategy" tabindex="-1">room.colors.strategy <a class="header-anchor" href="#room-colors-strategy" aria-label="Permalink to "room.colors.strategy""></a></h3><ul><li><strong>类型</strong>: <code>'priority' | 'balanced'</code></li><li><strong>默认值</strong>: <code>'priority'</code></li></ul><p>房间颜色分配策略。</p><ul><li><code>priority</code>:靠前优先,索引靠前的颜色将被优先使用。</li><li><code>balanced</code>:均匀分配,颜色将被尽可能均匀地使用。</li></ul><h4 id="room-colors-active" tabindex="-1">room.colors.active <a class="header-anchor" href="#room-colors-active" aria-label="Permalink to "room.colors.active""></a></h4><ul><li><strong>类型</strong>: <code>string[]</code></li><li><strong>默认值</strong>: <code>['#a8c8f5', '#9de5c7', '#d4b9f7', '#ffd399']</code></li></ul><p>房间激活状态的颜色数组。</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><ul><li><strong>当 <code>enableRoomSelection: true</code> 时</strong>:代表“被选中”房间的填充色。</li><li><strong>当 <code>enableRoomSelection: false</code> 时</strong>:若未定义 <code>room.colors.normal</code>,默认使用此配置。</li></ul></div><h4 id="room-colors-inactive" tabindex="-1">room.colors.inactive <a class="header-anchor" href="#room-colors-inactive" aria-label="Permalink to "room.colors.inactive""></a></h4><ul><li><strong>类型</strong>: <code>string[]</code></li><li><strong>默认值</strong>: <code>['#d6e7fc', '#d1f4e5', '#ece0fb', '#fff0d9']</code></li></ul><p>房间非激活状态的颜色数组。</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>仅在 <code>enableRoomSelection: true</code> 且房间“未被选中”时生效。</p></div><p>颜色索引与 <code>active</code> 对应,建议长度保持一致。</p><h4 id="room-colors-normal" tabindex="-1">room.colors.normal <a class="header-anchor" href="#room-colors-normal" aria-label="Permalink to "room.colors.normal""></a></h4><ul><li><strong>类型</strong>: <code>string[]</code></li><li><strong>默认值</strong>: <code>undefined</code></li></ul><p>房间在普通展示模式下的填充颜色数组。</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>仅在 <code>enableRoomSelection: false</code> 时生效。若未定义,默认使用 <code>room.colors.active</code> 的配置。</p></div><h4 id="room-colors-name" tabindex="-1">room.colors.name <a class="header-anchor" href="#room-colors-name" aria-label="Permalink to "room.colors.name""></a></h4><ul><li><strong>类型</strong>: <code>string[]</code></li><li><strong>默认值</strong>: <code>['#2563b8', '#26966b', '#7c3fb8', '#d97706']</code></li></ul><p>房间名称标签的颜色数组。</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><ul><li><strong>当 <code>enableRoomSelection: true</code> 时</strong>:代表“被选中”房间的文字颜色。</li><li><strong>当 <code>enableRoomSelection: false</code> 时</strong>:若未定义 <code>room.colors.nameNormal</code>,默认使用此配置。</li></ul></div><p>颜色索引与 <code>active</code> 对应,建议长度保持一致。</p><h4 id="room-colors-nameinactive" tabindex="-1">room.colors.nameInactive <a class="header-anchor" href="#room-colors-nameinactive" aria-label="Permalink to "room.colors.nameInactive""></a></h4><ul><li><strong>类型</strong>: <code>string[]</code></li><li><strong>默认值</strong>: <code>undefined</code></li></ul><p>房间名称标签在非激活状态下的颜色数组。</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>仅在 <code>enableRoomSelection: true</code> 且房间“未被选中”时生效。</p></div><p>如果不配置,则默认使用 <code>room.colors.name</code>。</p><h4 id="room-colors-namenormal" tabindex="-1">room.colors.nameNormal <a class="header-anchor" href="#room-colors-namenormal" aria-label="Permalink to "room.colors.nameNormal""></a></h4><ul><li><strong>类型</strong>: <code>string[]</code></li><li><strong>默认值</strong>: <code>undefined</code></li></ul><p>房间名称标签在普通展示模式下的颜色数组。</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>仅在 <code>enableRoomSelection: false</code> 时生效。若未定义,默认使用 <code>room.colors.name</code> 的配置。</p></div><h4 id="room-colors-propertytheme" tabindex="-1">room.colors.propertyTheme <a class="header-anchor" href="#room-colors-propertytheme" aria-label="Permalink to "room.colors.propertyTheme""></a></h4><ul><li><strong>类型</strong>: <code>string[]</code></li><li><strong>默认值</strong>: <code>['#2563b8', '#26966b', '#7c3fb8', '#d97706']</code></li></ul><p>房间属性图标主题颜色数组。</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><ul><li><strong>当 <code>enableRoomSelection: true</code> 时</strong>:代表“被选中”房间的图标颜色。</li><li><strong>当 <code>enableRoomSelection: false</code> 时</strong>:若未定义 <code>room.colors.propertyThemeNormal</code>,默认使用此配置。</li></ul></div><p>颜色索引与 <code>active</code> 对应,建议长度保持一致。</p><h4 id="room-colors-propertythemeinactive" tabindex="-1">room.colors.propertyThemeInactive <a class="header-anchor" href="#room-colors-propertythemeinactive" aria-label="Permalink to "room.colors.propertyThemeInactive""></a></h4><ul><li><strong>类型</strong>: <code>string[]</code></li><li><strong>默认值</strong>: <code>undefined</code></li></ul><p>房间属性图标在非激活状态下的颜色数组。</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>仅在 <code>enableRoomSelection: true</code> 且房间“未被选中”时生效。</p></div><p>如果不配置,则默认使用 <code>room.colors.propertyTheme</code>。</p><h4 id="room-colors-propertythemenormal" tabindex="-1">room.colors.propertyThemeNormal <a class="header-anchor" href="#room-colors-propertythemenormal" aria-label="Permalink to "room.colors.propertyThemeNormal""></a></h4><ul><li><strong>类型</strong>: <code>string[]</code></li><li><strong>默认值</strong>: <code>undefined</code></li></ul><p>房间属性图标在普通展示模式下的主题颜色数组。</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>仅在 <code>enableRoomSelection: false</code> 时生效。若未定义,默认使用 <code>room.colors.propertyTheme</code> 的配置。</p></div><h4 id="room-colors-selectionindicatorbackground" tabindex="-1">room.colors.selectionIndicatorBackground <a class="header-anchor" href="#room-colors-selectionindicatorbackground" aria-label="Permalink to "room.colors.selectionIndicatorBackground""></a></h4><ul><li><strong>类型</strong>: <code>string[]</code></li><li><strong>默认值</strong>: <code>['#2563b8', '#26966b', '#7c3fb8', '#d97706']</code></li></ul><p>选择指示器背景颜色数组。</p><p>颜色索引与 <code>active</code> 对应,建议长度保持一致。</p><h4 id="room-colors-selectionindicatoricon" tabindex="-1">room.colors.selectionIndicatorIcon <a class="header-anchor" href="#room-colors-selectionindicatoricon" aria-label="Permalink to "room.colors.selectionIndicatorIcon""></a></h4><ul><li><strong>类型</strong>: <code>string[]</code></li><li><strong>默认值</strong>: <code>['#ffffff', '#ffffff', '#ffffff', '#ffffff']</code></li></ul><p>选择指示器图标颜色数组。</p><p>颜色索引与 <code>active</code> 对应,建议长度保持一致。</p><h4 id="room-colors-no-room-data" tabindex="-1">room.colors.NO_ROOM_DATA <a class="header-anchor" href="#room-colors-no-room-data" aria-label="Permalink to "room.colors.NO_ROOM_DATA""></a></h4><ul><li><strong>类型</strong>: <code>string</code></li><li><strong>默认值</strong>: <code>'#ebebeb'</code></li></ul><p>无房间数据区域的颜色 (点阵协议专用)。</p><h4 id="room-colors-room-gap" tabindex="-1">room.colors.ROOM_GAP <a class="header-anchor" href="#room-colors-room-gap" aria-label="Permalink to "room.colors.ROOM_GAP""></a></h4><ul><li><strong>类型</strong>: <code>string</code></li><li><strong>默认值</strong>: <code>'#ebebeb'</code></li></ul><p>房间间隙的颜色 (点阵协议专用)。</p><h4 id="room-colors-obstacle-room" tabindex="-1">room.colors.OBSTACLE_ROOM <a class="header-anchor" href="#room-colors-obstacle-room" aria-label="Permalink to "room.colors.OBSTACLE_ROOM""></a></h4><ul><li><strong>类型</strong>: <code>string</code></li><li><strong>默认值</strong>: <code>'#ebebeb'</code></li></ul><p>障碍物房间的颜色 (点阵协议专用)。</p><h4 id="room-colors-unknown-room" tabindex="-1">room.colors.UNKNOWN_ROOM <a class="header-anchor" href="#room-colors-unknown-room" aria-label="Permalink to "room.colors.UNKNOWN_ROOM""></a></h4><ul><li><strong>类型</strong>: <code>string</code></li><li><strong>默认值</strong>: <code>'#ebebeb'</code></li></ul><p>未知房间的颜色。对于结构化协议代表 <code>roomId >= 255</code> 的房间颜色。</p><h4 id="room-colors-version0-room" tabindex="-1">room.colors.VERSION0_ROOM <a class="header-anchor" href="#room-colors-version0-room" aria-label="Permalink to "room.colors.VERSION0_ROOM""></a></h4><ul><li><strong>类型</strong>: <code>string</code></li><li><strong>默认值</strong>: <code>''</code></li></ul><p>点阵地图协议版本0的房间颜色 (点阵协议专用)。</p><div class="tip custom-block"><p class="custom-block-title">版本兼容说明</p><p>此配置项用于控制地图协议版本0(未支持分区的协议版本)中房间的颜色。在之前的版本中,版本0的房间和无房间数据区域都使用 <code>NO_ROOM_DATA</code> 颜色。现已将版本0的房间单独拆分为 <code>VERSION0_ROOM</code>。</p><p>默认值为空字符串,此时将自动使用 <code>NO_ROOM_DATA</code> 的颜色,以保持向后兼容。如需区分显示,可配置为不同的颜色值。</p></div><h3 id="room-namelabel" tabindex="-1">room.nameLabel <a class="header-anchor" href="#room-namelabel" aria-label="Permalink to "room.nameLabel""></a></h3><p>房间名称标签配置。</p><h4 id="room-namelabel-fontsize" tabindex="-1">room.nameLabel.fontSize <a class="header-anchor" href="#room-namelabel-fontsize" aria-label="Permalink to "room.nameLabel.fontSize""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>12</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>房间名称字体大小。</p><h4 id="room-namelabel-fontfamily" tabindex="-1">room.nameLabel.fontFamily <a class="header-anchor" href="#room-namelabel-fontfamily" aria-label="Permalink to "room.nameLabel.fontFamily""></a></h4><ul><li><strong>类型</strong>: <code>string</code></li><li><strong>默认值</strong>: <code>'system-ui, -apple-system, sans-serif'</code></li></ul><p>房间名称字体名称。</p><h4 id="room-namelabel-fontweight" tabindex="-1">room.nameLabel.fontWeight <a class="header-anchor" href="#room-namelabel-fontweight" aria-label="Permalink to "room.nameLabel.fontWeight""></a></h4><ul><li><strong>类型</strong>: <code>TextStyleFontWeight</code></li><li><strong>默认值</strong>: <code>'500'</code></li></ul><p>房间名称字体粗细。</p><h3 id="room-type" tabindex="-1">room.type <a class="header-anchor" href="#room-type" aria-label="Permalink to "room.type""></a></h3><p>房间类型图标配置。</p><h4 id="room-type-assets" tabindex="-1">room.type.assets <a class="header-anchor" href="#room-type-assets" aria-label="Permalink to "room.type.assets""></a></h4><ul><li><strong>类型</strong>: <code>string[]</code></li><li><strong>默认值</strong>: <code>[内置资源, ...]</code></li></ul><p>房间类型图标资源数组。</p><p>数组索引对应 <code>RoomProperty.type</code> 值,即 <code>assets[type]</code> 显示该索引对应的图标。</p><p><strong>内置默认资源映射表:</strong></p><p>以下是内置默认图标与 <code>type</code> 值的对应关系:</p><table tabindex="0"><thead><tr><th style="text-align:left;">ID (索引)</th><th style="text-align:left;">房间类型</th></tr></thead><tbody><tr><td style="text-align:left;">0</td><td style="text-align:left;">通用/房间</td></tr><tr><td style="text-align:left;">1</td><td style="text-align:left;">客厅</td></tr><tr><td style="text-align:left;">2</td><td style="text-align:left;">餐厅</td></tr><tr><td style="text-align:left;">3</td><td style="text-align:left;">主卧</td></tr><tr><td style="text-align:left;">4</td><td style="text-align:left;">次卧/卧室</td></tr><tr><td style="text-align:left;">5</td><td style="text-align:left;">书房</td></tr><tr><td style="text-align:left;">6</td><td style="text-align:left;">厨房</td></tr><tr><td style="text-align:left;">7</td><td style="text-align:left;">卫生间</td></tr><tr><td style="text-align:left;">8</td><td style="text-align:left;">洗衣房</td></tr><tr><td style="text-align:left;">9</td><td style="text-align:left;">休息室</td></tr><tr><td style="text-align:left;">10</td><td style="text-align:left;">储物间</td></tr><tr><td style="text-align:left;">11</td><td style="text-align:left;">儿童房</td></tr><tr><td style="text-align:left;">12</td><td style="text-align:left;">阳光房</td></tr><tr><td style="text-align:left;">13</td><td style="text-align:left;">走廊</td></tr><tr><td style="text-align:left;">14</td><td style="text-align:left;">阳台</td></tr><tr><td style="text-align:left;">15</td><td style="text-align:left;">健身房</td></tr><tr><td style="text-align:left;">16</td><td style="text-align:left;">玄关</td></tr></tbody></table><p>当使用内置默认资源时,索引与房间类型的对应关系详见<a href="/guide/advanced-usage.html#房间类型图标">房间类型图标</a>。如果开发者通过此配置项自定义了数组,则映射关系完全取决于自定义数组的顺序。</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>如果某个索引对应的资源为空字符串(<code>''</code>),则该类型的房间将不会显示任何图标。例如,通过设置 <code>assets[0] = ''</code> 可以隐藏 type 为 0 的房间图标。</p></div><h4 id="room-type-iconsize" tabindex="-1">room.type.iconSize <a class="header-anchor" href="#room-type-iconsize" aria-label="Permalink to "room.type.iconSize""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>12</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>房间类型图标大小。</p><h4 id="room-type-gap" tabindex="-1">room.type.gap <a class="header-anchor" href="#room-type-gap" aria-label="Permalink to "room.type.gap""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>4</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>图标与房间名称文字之间的间距。</p><h4 id="room-type-position" tabindex="-1">room.type.position <a class="header-anchor" href="#room-type-position" aria-label="Permalink to "room.type.position""></a></h4><ul><li><strong>类型</strong>: <code>'left' | 'right'</code></li><li><strong>默认值</strong>: <code>'left'</code></li></ul><p>图标相对于房间名称文字的显示位置。</p><h4 id="room-type-container" tabindex="-1">room.type.container <a class="header-anchor" href="#room-type-container" aria-label="Permalink to "room.type.container""></a></h4><p>房间类型图标背景容器配置。</p><h5 id="room-type-container-visible" tabindex="-1">room.type.container.visible <a class="header-anchor" href="#room-type-container-visible" aria-label="Permalink to "room.type.container.visible""></a></h5><ul><li><strong>类型</strong>: <code>boolean</code></li><li><strong>默认值</strong>: <code>true</code></li></ul><p>是否显示背景容器。</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><ul><li><strong>颜色逻辑</strong>: <ul><li>当开启背景容器(<code>container.visible: true</code>)时,背景将填充为房间名称颜色(<code>room.colors.name</code>),图标将自动设置为白色(<code>tint: #ffffff</code>)。</li><li>当禁用背景容器(<code>container.visible: false</code>)时,图标将直接使用房间名称颜色(<code>room.colors.name</code>)。</li></ul></li><li><strong>最佳实践</strong>:为了实现自动换色效果,建议使用单色(通常为黑色或白色)的 SVG 资源。如果使用彩色 PNG 资源,建议将 <code>container.visible</code> 设为 <code>false</code> 以保持原色。</li></ul></div><h5 id="room-type-container-size" tabindex="-1">room.type.container.size <a class="header-anchor" href="#room-type-container-size" aria-label="Permalink to "room.type.container.size""></a></h5><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>16</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>背景容器大小。</p><h5 id="room-type-container-borderradius" tabindex="-1">room.type.container.borderRadius <a class="header-anchor" href="#room-type-container-borderradius" aria-label="Permalink to "room.type.container.borderRadius""></a></h5><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>16</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>背景容器圆角大小。</p><h3 id="room-property" tabindex="-1">room.property <a class="header-anchor" href="#room-property" aria-label="Permalink to "room.property""></a></h3><p>房间属性配置。</p><h4 id="room-property-displayorders" tabindex="-1">room.property.displayOrders <a class="header-anchor" href="#room-property-displayorders" aria-label="Permalink to "room.property.displayOrders""></a></h4><ul><li><strong>类型</strong>: <code>('cleanMode' | 'suction' | 'cistern' | 'cleanTimes' | string)[]</code></li><li><strong>默认值</strong>: <code>['cleanMode', 'suction', 'cistern', 'cleanTimes']</code></li></ul><p>房间属性显示顺序。</p><p>你也可以传入自定义的字段名,比如 <code>['cleanMode', 'suction', 'cistern', 'cleanTimes', 'customProperty1']</code>。</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>如果要隐藏某个房间属性,比如 <code>cleanTimes</code>,那么清扫次数图标将不会显示。</p></div><h4 id="room-property-customassets" tabindex="-1">room.property.customAssets <a class="header-anchor" href="#room-property-customassets" aria-label="Permalink to "room.property.customAssets""></a></h4><ul><li><strong>类型</strong>: <code>Record<string, string[]></code></li><li><strong>默认值</strong>: <code>undefined</code></li></ul><p>自定义属性图标资源配置,</p><p>你可以传入自定义的字段名和对应的图标资源数组,比如:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
|
|
186
190
|
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> room</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: {</span></span>
|
|
187
191
|
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> property</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: {</span></span>
|
|
188
192
|
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> displayOrders</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'cleanMode'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'suction'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'customProperty1'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'cistern'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'cleanTimes'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'customProperty2'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">],</span></span>
|
|
@@ -203,11 +207,11 @@
|
|
|
203
207
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
|
|
204
208
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
|
|
205
209
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>使用图标资源时,强烈建议使用白色图标,以便 SDK 能够根据房间主题色(<code>room.colors.propertyTheme</code>)自动调整图标颜色。</p></div><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>自定义属性配置完成后,还需要由 <code>roomProperties</code> 的 <code>customData</code> 数据驱动显示。你可以参考<a href="/guide/advanced-usage.html#自定义属性">自定义属性</a>章节。</p><p>目前自定义属性仅支持数值型的字段。</p></div><h4 id="room-property-iconwidth" tabindex="-1">room.property.iconWidth <a class="header-anchor" href="#room-property-iconwidth" aria-label="Permalink to "room.property.iconWidth""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>14</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>房间属性图标宽度。</p><h4 id="room-property-iconheight" tabindex="-1">room.property.iconHeight <a class="header-anchor" href="#room-property-iconheight" aria-label="Permalink to "room.property.iconHeight""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>14</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>房间属性图标高度。</p><h4 id="room-property-foldable" tabindex="-1">room.property.foldable <a class="header-anchor" href="#room-property-foldable" aria-label="Permalink to "room.property.foldable""></a></h4><ul><li><strong>类型</strong>: <code>boolean</code></li><li><strong>默认值</strong>: <code>true</code></li></ul><p>房间属性是否可折叠。</p><h4 id="room-property-offsetx" tabindex="-1">room.property.offsetX <a class="header-anchor" href="#room-property-offsetx" aria-label="Permalink to "room.property.offsetX""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>0</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>房间属性X轴偏移。</p><h4 id="room-property-offsety" tabindex="-1">room.property.offsetY <a class="header-anchor" href="#room-property-offsety" aria-label="Permalink to "room.property.offsetY""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>6</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>房间属性Y轴偏移。</p><h4 id="room-property-icongap" tabindex="-1">room.property.iconGap <a class="header-anchor" href="#room-property-icongap" aria-label="Permalink to "room.property.iconGap""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>0</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>房间属性图标间距。</p><h4 id="room-property-container" tabindex="-1">room.property.container <a class="header-anchor" href="#room-property-container" aria-label="Permalink to "room.property.container""></a></h4><p>房间属性容器样式配置。</p><h5 id="room-property-container-backgroundcolor" tabindex="-1">room.property.container.backgroundColor <a class="header-anchor" href="#room-property-container-backgroundcolor" aria-label="Permalink to "room.property.container.backgroundColor""></a></h5><ul><li><strong>类型</strong>: <code>ColorSource</code></li><li><strong>默认值</strong>: <code>'#ffffff'</code></li></ul><p>房间属性容器背景颜色。</p><h5 id="room-property-container-paddingvertical" tabindex="-1">room.property.container.paddingVertical <a class="header-anchor" href="#room-property-container-paddingvertical" aria-label="Permalink to "room.property.container.paddingVertical""></a></h5><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>2</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>房间属性容器垂直内边距。</p><h5 id="room-property-container-paddinghorizontal" tabindex="-1">room.property.container.paddingHorizontal <a class="header-anchor" href="#room-property-container-paddinghorizontal" aria-label="Permalink to "room.property.container.paddingHorizontal""></a></h5><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>2</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>房间属性容器水平内边距。</p><h5 id="room-property-container-borderradius" tabindex="-1">room.property.container.borderRadius <a class="header-anchor" href="#room-property-container-borderradius" aria-label="Permalink to "room.property.container.borderRadius""></a></h5><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>16</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>房间属性容器边框圆角。</p><h5 id="room-property-container-tailheight" tabindex="-1">room.property.container.tailHeight <a class="header-anchor" href="#room-property-container-tailheight" aria-label="Permalink to "room.property.container.tailHeight""></a></h5><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>2</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>房间属性容器气泡三角形高度。</p><h5 id="room-property-container-tailwidth" tabindex="-1">room.property.container.tailWidth <a class="header-anchor" href="#room-property-container-tailwidth" aria-label="Permalink to "room.property.container.tailWidth""></a></h5><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>8</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>房间属性容器气泡三角形宽度。</p><h4 id="room-property-suction" tabindex="-1">room.property.suction <a class="header-anchor" href="#room-property-suction" aria-label="Permalink to "room.property.suction""></a></h4><p>吸力图标配置。</p><h5 id="room-property-suction-assets" tabindex="-1">room.property.suction.assets <a class="header-anchor" href="#room-property-suction-assets" aria-label="Permalink to "room.property.suction.assets""></a></h5><ul><li><strong>类型</strong>: <code>string[]</code></li><li><strong>默认值</strong>: <code>[内置资源, ...]</code></li></ul><p>吸力等级图标资源数组。建议传入的图标资源数量与吸力等级数量一致。</p><p>数组索引对应 <code>RoomProperty.suction</code> 值,即 <code>assets[suction]</code> 显示对应等级的图标。</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>使用图标资源时,强烈建议使用白色图标,以便 SDK 能够根据房间主题色(<code>room.colors.propertyTheme</code>)自动调整图标颜色。</p></div><h4 id="room-property-cistern" tabindex="-1">room.property.cistern <a class="header-anchor" href="#room-property-cistern" aria-label="Permalink to "room.property.cistern""></a></h4><p>水量图标配置。</p><h5 id="room-property-cistern-assets" tabindex="-1">room.property.cistern.assets <a class="header-anchor" href="#room-property-cistern-assets" aria-label="Permalink to "room.property.cistern.assets""></a></h5><ul><li><strong>类型</strong>: <code>string[]</code></li><li><strong>默认值</strong>: <code>[内置资源, ...]</code></li></ul><p>水量图标资源数组。建议传入的图标资源数量与水量等级数量一致。</p><p>数组索引对应 <code>RoomProperty.cistern</code> 值,即 <code>assets[cistern]</code> 显示对应等级的图标。</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>使用图标资源时,强烈建议使用白色图标,以便 SDK 能够根据房间主题色(<code>room.colors.propertyTheme</code>)自动调整图标颜色。</p></div><h4 id="room-property-cleanmode" tabindex="-1">room.property.cleanMode <a class="header-anchor" href="#room-property-cleanmode" aria-label="Permalink to "room.property.cleanMode""></a></h4><p>清扫模式图标配置。</p><h5 id="room-property-cleanmode-assets" tabindex="-1">room.property.cleanMode.assets <a class="header-anchor" href="#room-property-cleanmode-assets" aria-label="Permalink to "room.property.cleanMode.assets""></a></h5><ul><li><strong>类型</strong>: <code>string[]</code></li><li><strong>默认值</strong>: <code>[内置资源, ...]</code></li></ul><p>清扫模式图标资源数组。建议传入的图标资源数量与清扫模式等级数量一致。</p><p>数组索引对应 <code>RoomProperty.cleanMode</code> 值,即 <code>assets[cleanMode]</code> 显示对应等级的图标。</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>使用图标资源时,强烈建议使用白色图标,以便 SDK 能够根据房间主题色(<code>room.colors.propertyTheme</code>)自动调整图标颜色。</p></div><h4 id="room-property-cleantimes" tabindex="-1">room.property.cleanTimes <a class="header-anchor" href="#room-property-cleantimes" aria-label="Permalink to "room.property.cleanTimes""></a></h4><p>清扫次数图标配置。</p><h5 id="room-property-cleantimes-assets" tabindex="-1">room.property.cleanTimes.assets <a class="header-anchor" href="#room-property-cleantimes-assets" aria-label="Permalink to "room.property.cleanTimes.assets""></a></h5><ul><li><strong>类型</strong>: <code>string[]</code></li><li><strong>默认值</strong>: <code>[内置资源, ...]</code></li></ul><p>清扫次数图标资源数组。建议传入的图标资源数量与清扫次数等级数量一致。</p><p>数组索引对应 <code>RoomProperty.cleanTimes - 1</code> 值,即 <code>assets[cleanTimes - 1]</code> 显示对应等级的图标。</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>清扫次数的图标规则相对特殊,因为实际不存在<strong>0次</strong>清扫,所以数组索引需要<strong>减1</strong>。</p></div><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>使用图标资源时,强烈建议使用白色图标,以便 SDK 能够根据房间主题色(<code>room.colors.propertyTheme</code>)自动调整图标颜色。</p></div><h4 id="room-property-cleanorder" tabindex="-1">room.property.cleanOrder <a class="header-anchor" href="#room-property-cleanorder" aria-label="Permalink to "room.property.cleanOrder""></a></h4><p>清扫顺序配置。</p><h5 id="room-property-cleanorder-color" tabindex="-1">room.property.cleanOrder.color <a class="header-anchor" href="#room-property-cleanorder-color" aria-label="Permalink to "room.property.cleanOrder.color""></a></h5><ul><li><strong>类型</strong>: <code>ColorSource | 'auto'</code></li><li><strong>默认值</strong>: <code>'#ffffff'</code></li></ul><p>清扫顺序文字颜色。</p><p><strong>可选值:</strong></p><ul><li><strong>颜色值</strong>(如 <code>'#ffffff'</code>、<code>'rgb(255, 255, 255)'</code> 等):所有房间的清扫顺序文字使用固定的颜色</li><li><strong><code>'auto'</code></strong>:文字颜色自动跟随 <code>room.colors.active</code> 的主题色,实现每个房间的清扫顺序文字与房间填充色保持一致</li></ul><h5 id="room-property-cleanorder-fontfamily" tabindex="-1">room.property.cleanOrder.fontFamily <a class="header-anchor" href="#room-property-cleanorder-fontfamily" aria-label="Permalink to "room.property.cleanOrder.fontFamily""></a></h5><ul><li><strong>类型</strong>: <code>string</code></li><li><strong>默认值</strong>: <code>'system-ui, -apple-system, sans-serif'</code></li></ul><p>清扫顺序字体名称。</p><h5 id="room-property-cleanorder-fontweight" tabindex="-1">room.property.cleanOrder.fontWeight <a class="header-anchor" href="#room-property-cleanorder-fontweight" aria-label="Permalink to "room.property.cleanOrder.fontWeight""></a></h5><ul><li><strong>类型</strong>: <code>TextStyleFontWeight</code></li><li><strong>默认值</strong>: <code>'400'</code></li></ul><p>清扫顺序字体粗细。</p><h5 id="room-property-cleanorder-fontsize" tabindex="-1">room.property.cleanOrder.fontSize <a class="header-anchor" href="#room-property-cleanorder-fontsize" aria-label="Permalink to "room.property.cleanOrder.fontSize""></a></h5><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>10</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>清扫顺序字体大小。</p><h5 id="room-property-cleanorder-gapright" tabindex="-1">room.property.cleanOrder.gapRight <a class="header-anchor" href="#room-property-cleanorder-gapright" aria-label="Permalink to "room.property.cleanOrder.gapRight""></a></h5><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>2</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>清扫顺序右侧间距。</p><h3 id="room-selectionindicator" tabindex="-1">room.selectionIndicator <a class="header-anchor" href="#room-selectionindicator" aria-label="Permalink to "room.selectionIndicator""></a></h3><p>房间选择指示器配置。</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p><code>enableRoomSelection</code> 为 <code>true</code> 时</p><ul><li>如果 <code>roomSelectionMode</code> 为 <code>checkmark</code> ,选中的房间会显示选择指示器。</li><li>如果 <code>roomSelectionMode</code> 为 <code>order</code> ,选中的房间会显示房间顺序。</li></ul></div><h4 id="room-selectionindicator-iconsrc" tabindex="-1">room.selectionIndicator.iconSrc <a class="header-anchor" href="#room-selectionindicator-iconsrc" aria-label="Permalink to "room.selectionIndicator.iconSrc""></a></h4><ul><li><strong>类型</strong>: <code>string</code></li><li><strong>默认值</strong>: <code>内置资源</code></li></ul><p>选择指示器图标资源路径。</p><h4 id="room-selectionindicator-iconwidth" tabindex="-1">room.selectionIndicator.iconWidth <a class="header-anchor" href="#room-selectionindicator-iconwidth" aria-label="Permalink to "room.selectionIndicator.iconWidth""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>14</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>选择指示器图标宽度。</p><h4 id="room-selectionindicator-iconheight" tabindex="-1">room.selectionIndicator.iconHeight <a class="header-anchor" href="#room-selectionindicator-iconheight" aria-label="Permalink to "room.selectionIndicator.iconHeight""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>14</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>选择指示器图标高度。</p><h4 id="room-selectionindicator-containerwidth" tabindex="-1">room.selectionIndicator.containerWidth <a class="header-anchor" href="#room-selectionindicator-containerwidth" aria-label="Permalink to "room.selectionIndicator.containerWidth""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>16</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>选择指示器容器宽度。</p><h4 id="room-selectionindicator-containerheight" tabindex="-1">room.selectionIndicator.containerHeight <a class="header-anchor" href="#room-selectionindicator-containerheight" aria-label="Permalink to "room.selectionIndicator.containerHeight""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>16</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>选择指示器容器高度。</p><h4 id="room-selectionindicator-strokewidth" tabindex="-1">room.selectionIndicator.strokeWidth <a class="header-anchor" href="#room-selectionindicator-strokewidth" aria-label="Permalink to "room.selectionIndicator.strokeWidth""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>2</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>选择指示器描边宽度。</p><h4 id="room-selectionindicator-strokecolor" tabindex="-1">room.selectionIndicator.strokeColor <a class="header-anchor" href="#room-selectionindicator-strokecolor" aria-label="Permalink to "room.selectionIndicator.strokeColor""></a></h4><ul><li><strong>类型</strong>: <code>ColorSource | 'auto'</code></li><li><strong>默认值</strong>: <code>'#ffffff'</code></li></ul><p>选择指示器描边颜色,同时控制边框和尾部箭头的颜色。</p><p><strong>可选值:</strong></p><ul><li><strong>颜色值</strong>(如 <code>'#ffffff'</code>、<code>'rgb(255, 255, 255)'</code> 等):所有选择指示器使用固定的描边颜色</li><li><strong><code>'auto'</code></strong>:描边颜色自动跟随 <code>room.colors.selectionIndicatorBackground</code> 的主题色,实现每个房间的选择指示器边框与背景色保持一致</li></ul><h4 id="room-selectionindicator-borderradius" tabindex="-1">room.selectionIndicator.borderRadius <a class="header-anchor" href="#room-selectionindicator-borderradius" aria-label="Permalink to "room.selectionIndicator.borderRadius""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>16</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>选择指示器边框圆角。</p><h4 id="room-selectionindicator-offsetx" tabindex="-1">room.selectionIndicator.offsetX <a class="header-anchor" href="#room-selectionindicator-offsetx" aria-label="Permalink to "room.selectionIndicator.offsetX""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>0</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>选择指示器X轴偏移。</p><h4 id="room-selectionindicator-offsety" tabindex="-1">room.selectionIndicator.offsetY <a class="header-anchor" href="#room-selectionindicator-offsety" aria-label="Permalink to "room.selectionIndicator.offsetY""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>4</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>选择指示器Y轴偏移。</p><h4 id="room-selectionindicator-tailheight" tabindex="-1">room.selectionIndicator.tailHeight <a class="header-anchor" href="#room-selectionindicator-tailheight" aria-label="Permalink to "room.selectionIndicator.tailHeight""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>2</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>选择指示器气泡三角形高度。</p><h4 id="room-selectionindicator-tailwidth" tabindex="-1">room.selectionIndicator.tailWidth <a class="header-anchor" href="#room-selectionindicator-tailwidth" aria-label="Permalink to "room.selectionIndicator.tailWidth""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>6</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>选择指示器气泡三角形宽度。</p><h3 id="room-floortype" tabindex="-1">room.floorType <a class="header-anchor" href="#room-floortype" aria-label="Permalink to "room.floorType""></a></h3><p>地板材质配置。</p><h4 id="room-floortype-assets" tabindex="-1">room.floorType.assets <a class="header-anchor" href="#room-floortype-assets" aria-label="Permalink to "room.floorType.assets""></a></h4><ul><li><strong>类型</strong>: <code>string[]</code></li><li><strong>默认值</strong>: <code>['', '内置瓷砖资源', '内置木地板(横向)资源', '内置木地板(纵向)资源']</code></li></ul><p>地板材质图标资源数组。建议传入的图标资源数量与地板材质等级数量一致。</p><p>数组索引对应 <code>RoomProperty.floorType</code> 值,即 <code>assets[floorType]</code> 显示对应等级的图标。</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><ul><li>强烈建议使用材质的最小重复单元的图片资源以提升性能。</li><li>通常 <code>floorType</code> 值为<strong>0</strong>时,表示无地板材质。这种情况下 <code>assets[0]</code> 可以设置为空字符串。</li></ul></div><h4 id="room-floortype-opacity" tabindex="-1">room.floorType.opacity <a class="header-anchor" href="#room-floortype-opacity" aria-label="Permalink to "room.floorType.opacity""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>0.1</code></li></ul><p>地板材质透明度。</p><h4 id="room-floortype-scale" tabindex="-1">room.floorType.scale <a class="header-anchor" href="#room-floortype-scale" aria-label="Permalink to "room.floorType.scale""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>0.2</code></li></ul><p>地板材质缩放系数。</p><h3 id="room-enableelasticscale" tabindex="-1">room.enableElasticScale <a class="header-anchor" href="#room-enableelasticscale" aria-label="Permalink to "room.enableElasticScale""></a></h3><ul><li><strong>类型</strong>: <code>boolean</code></li><li><strong>默认值</strong>: <code>false</code></li></ul><p>是否启用 RoomInfo 弹性缩放。</p><h3 id="room-elasticminscale" tabindex="-1">room.elasticMinScale <a class="header-anchor" href="#room-elasticminscale" aria-label="Permalink to "room.elasticMinScale""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>0.6</code></li></ul><p>RoomInfo 最小弹性缩放倍数。</p><p>当地图缩小到一定程度时,RoomInfo 会缩小到此倍数。</p><h3 id="room-elasticmaxscale" tabindex="-1">room.elasticMaxScale <a class="header-anchor" href="#room-elasticmaxscale" aria-label="Permalink to "room.elasticMaxScale""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>1.5</code></li></ul><p>RoomInfo 最大弹性缩放倍数。</p><p>当地图放大到一定程度时,RoomInfo 会放大到此倍数。</p><h2 id="path" tabindex="-1">path <a class="header-anchor" href="#path" aria-label="Permalink to "path""></a></h2><p>路径配置。</p><h3 id="path-linewidthfixed" tabindex="-1">path.lineWidthFixed <a class="header-anchor" href="#path-linewidthfixed" aria-label="Permalink to "path.lineWidthFixed""></a></h3><ul><li><strong>类型</strong>: <code>boolean</code></li><li><strong>默认值</strong>: <code>false</code></li></ul><p>路径线条宽度是否固定(不跟随地图缩放变化)</p><h3 id="path-incrementalthreshold" tabindex="-1">path.incrementalThreshold <a class="header-anchor" href="#path-incrementalthreshold" aria-label="Permalink to "path.incrementalThreshold""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>5</code></li></ul><p>路径增量绘制检测阈值。</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>地图组件默认会开启路径增量绘制以提升性能。</p><p>当传入的路径相比上一次绘制的路径点数量变化不超过 <code>incrementalThreshold</code> 时,使用增量绘制 (仅绘制新增的部分),否则使用全量绘制 (重新绘制整条路径)。</p><p>设置为<strong>0</strong>时将关闭路径增量绘制。</p></div><h3 id="path-commonpath" tabindex="-1">path.commonPath <a class="header-anchor" href="#path-commonpath" aria-label="Permalink to "path.commonPath""></a></h3><p>清扫路径配置。</p><h4 id="path-commonpath-visible" tabindex="-1">path.commonPath.visible <a class="header-anchor" href="#path-commonpath-visible" aria-label="Permalink to "path.commonPath.visible""></a></h4><ul><li><strong>类型</strong>: <code>boolean</code></li><li><strong>默认值</strong>: <code>true</code></li></ul><p>清扫路径是否可见</p><h4 id="path-commonpath-color" tabindex="-1">path.commonPath.color <a class="header-anchor" href="#path-commonpath-color" aria-label="Permalink to "path.commonPath.color""></a></h4><ul><li><strong>类型</strong>: <code>ColorSource</code></li><li><strong>默认值</strong>: <code>'#ffffff'</code></li></ul><p>清扫路径颜色</p><h4 id="path-commonpath-width" tabindex="-1">path.commonPath.width <a class="header-anchor" href="#path-commonpath-width" aria-label="Permalink to "path.commonPath.width""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>0.5</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>清扫路径宽度</p><h3 id="path-transitionpath" tabindex="-1">path.transitionPath <a class="header-anchor" href="#path-transitionpath" aria-label="Permalink to "path.transitionPath""></a></h3><p>转场路径配置。</p><h4 id="path-transitionpath-visible" tabindex="-1">path.transitionPath.visible <a class="header-anchor" href="#path-transitionpath-visible" aria-label="Permalink to "path.transitionPath.visible""></a></h4><ul><li><strong>类型</strong>: <code>boolean</code></li><li><strong>默认值</strong>: <code>false</code></li></ul><p>转场路径是否可见</p><h4 id="path-transitionpath-color" tabindex="-1">path.transitionPath.color <a class="header-anchor" href="#path-transitionpath-color" aria-label="Permalink to "path.transitionPath.color""></a></h4><ul><li><strong>类型</strong>: <code>ColorSource</code></li><li><strong>默认值</strong>: <code>'#ffffff'</code></li></ul><p>转场路径颜色</p><h4 id="path-transitionpath-width" tabindex="-1">path.transitionPath.width <a class="header-anchor" href="#path-transitionpath-width" aria-label="Permalink to "path.transitionPath.width""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>0.5</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>转场路径宽度</p><h3 id="path-chargepath" tabindex="-1">path.chargePath <a class="header-anchor" href="#path-chargepath" aria-label="Permalink to "path.chargePath""></a></h3><p>回充路径配置。</p><h4 id="path-chargepath-visible" tabindex="-1">path.chargePath.visible <a class="header-anchor" href="#path-chargepath-visible" aria-label="Permalink to "path.chargePath.visible""></a></h4><ul><li><strong>类型</strong>: <code>boolean</code></li><li><strong>默认值</strong>: <code>false</code></li></ul><p>回充路径是否可见</p><h4 id="path-chargepath-color" tabindex="-1">path.chargePath.color <a class="header-anchor" href="#path-chargepath-color" aria-label="Permalink to "path.chargePath.color""></a></h4><ul><li><strong>类型</strong>: <code>ColorSource</code></li><li><strong>默认值</strong>: <code>'#ffffff'</code></li></ul><p>回充路径颜色</p><h4 id="path-chargepath-width" tabindex="-1">path.chargePath.width <a class="header-anchor" href="#path-chargepath-width" aria-label="Permalink to "path.chargePath.width""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>0.5</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>回充路径宽度</p><h3 id="path-moppath" tabindex="-1">path.mopPath <a class="header-anchor" href="#path-moppath" aria-label="Permalink to "path.mopPath""></a></h3><p>拖地路径配置。</p><h4 id="path-moppath-linevisible" tabindex="-1">path.mopPath.lineVisible <a class="header-anchor" href="#path-moppath-linevisible" aria-label="Permalink to "path.mopPath.lineVisible""></a></h4><ul><li><strong>类型</strong>: <code>boolean</code></li><li><strong>默认值</strong>: <code>true</code></li></ul><p>拖地核心线是否可见。</p><h4 id="path-moppath-linecolor" tabindex="-1">path.mopPath.lineColor <a class="header-anchor" href="#path-moppath-linecolor" aria-label="Permalink to "path.mopPath.lineColor""></a></h4><ul><li><strong>类型</strong>: <code>ColorSource</code></li><li><strong>默认值</strong>: <code>'#ffffff'</code></li></ul><p>拖地核心线颜色。</p><h4 id="path-moppath-linewidth" tabindex="-1">path.mopPath.lineWidth <a class="header-anchor" href="#path-moppath-linewidth" aria-label="Permalink to "path.mopPath.lineWidth""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>0.5</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>拖地核心线宽度。</p><h4 id="path-moppath-trackvisible" tabindex="-1">path.mopPath.trackVisible <a class="header-anchor" href="#path-moppath-trackvisible" aria-label="Permalink to "path.mopPath.trackVisible""></a></h4><ul><li><strong>类型</strong>: <code>boolean</code></li><li><strong>默认值</strong>: <code>true</code></li></ul><p>拖地轨迹(宽度涂抹区域)是否可见。</p><h4 id="path-moppath-trackcolor" tabindex="-1">path.mopPath.trackColor <a class="header-anchor" href="#path-moppath-trackcolor" aria-label="Permalink to "path.mopPath.trackColor""></a></h4><ul><li><strong>类型</strong>: <code>ColorSource</code></li><li><strong>默认值</strong>: <code>'#ffffff'</code></li></ul><p>拖地轨迹颜色。</p><h4 id="path-moppath-trackalpha" tabindex="-1">path.mopPath.trackAlpha <a class="header-anchor" href="#path-moppath-trackalpha" aria-label="Permalink to "path.mopPath.trackAlpha""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>0.4</code></li></ul><p>拖地轨迹透明度。</p><h4 id="path-moppath-trackwidth" tabindex="-1">path.mopPath.trackWidth <a class="header-anchor" href="#path-moppath-trackwidth" aria-label="Permalink to "path.mopPath.trackWidth""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>4</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>拖地轨迹宽度。</p><h2 id="carpet" tabindex="-1">carpet <a class="header-anchor" href="#carpet" aria-label="Permalink to "carpet""></a></h2><p>地毯配置,控制地毯区域的显示效果。</p><h3 id="carpet-src" tabindex="-1">carpet.src <a class="header-anchor" href="#carpet-src" aria-label="Permalink to "carpet.src""></a></h3><ul><li><strong>类型</strong>: <code>string</code></li><li><strong>默认值</strong>: <code>内置资源</code></li></ul><p>地毯资源路径</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>强烈建议传入最小重复单元的图片资源以提升性能。</p></div><h3 id="carpet-opacity" tabindex="-1">carpet.opacity <a class="header-anchor" href="#carpet-opacity" aria-label="Permalink to "carpet.opacity""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>0.5</code></li></ul><p>地毯透明度</p><h3 id="carpet-scale" tabindex="-1">carpet.scale <a class="header-anchor" href="#carpet-scale" aria-label="Permalink to "carpet.scale""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>0.2</code></li></ul><p>地毯缩放系数</p><h3 id="carpet-material" tabindex="-1">carpet.material <a class="header-anchor" href="#carpet-material" aria-label="Permalink to "carpet.material""></a></h3><ul><li><strong>类型</strong>: <code>{ type: number; src: string; opacity: number; scale: number }[]</code></li><li><strong>默认值</strong>: <code>undefined</code></li></ul><p>地毯材质配置,用于按不同 <code>type</code> 指定不同的材质资源与渲染参数。</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>当配置 <code>material</code> 时,优先级高于 <code>carpet.src</code>。</p></div><h3 id="carpet-enableedit" tabindex="-1">carpet.enableEdit <a class="header-anchor" href="#carpet-enableedit" aria-label="Permalink to "carpet.enableEdit""></a></h3><ul><li><strong>类型</strong>: <code>boolean</code></li><li><strong>默认值</strong>: <code>undefined</code>(未传时按 <code>false</code> 处理)</li></ul><p>是否启用地毯编辑能力。非必要不建议开启,以避免额外性能开销。</p><h2 id="furniture" tabindex="-1">furniture <a class="header-anchor" href="#furniture" aria-label="Permalink to "furniture""></a></h2><p>家具配置,控制地图上家具元素的显示和编辑行为。家具是基于图片的地图元素,支持拖拽、缩放和点击旋转操作。</p><h3 id="furniture-assets" tabindex="-1">furniture.assets <a class="header-anchor" href="#furniture-assets" aria-label="Permalink to "furniture.assets""></a></h3><ul><li><strong>类型</strong>: <code>FurnitureAsset[]</code></li><li><strong>默认值</strong>: <code>[{ type: 1, src: 内置双人床资源, width: 1.8, height: 2.0 }]</code></li></ul><p>家具素材列表。每个素材定义了一种家具类型的图片资源和默认尺寸。</p><div class="language-typescript vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">typescript</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">type</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> FurnitureAsset</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
|
|
206
|
-
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> type</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> number</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">
|
|
207
|
-
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> src</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> string</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">
|
|
208
|
-
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> width</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> number</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">
|
|
210
|
+
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> type</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> number</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // 家具类型编号,匹配 FurnitureParam.furnitureType</span></span>
|
|
211
|
+
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> src</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> string</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // 图片 URL</span></span>
|
|
212
|
+
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> width</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> number</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // 默认宽度(米)</span></span>
|
|
209
213
|
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> height</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> number</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // 默认高度(米)</span></span>
|
|
210
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><div class="tip custom-block"><p class="custom-block-title">TIP</p><p><code>width</code> 和 <code>height</code> 的单位是米,用于 <code>getFurniturePointsByViewportCenter()</code> 生成初始矩形时确定家具的实际尺寸。SDK 内部会根据地图的 <code>resolution</code> 自动将米转换为像素坐标。</p><p>例如双人床默认 <code>width: 1.8</code>(1.8 米)、<code>height: 2.0</code>(2.0 米)。</p></div><h3 id="furniture-opacity" tabindex="-1">furniture.opacity <a class="header-anchor" href="#furniture-opacity" aria-label="Permalink to "furniture.opacity""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>1</code></li></ul><p>家具图片的全局透明度 (0-1)。</p><h3 id="furniture-iconwrapperfillcolor" tabindex="-1">furniture.iconWrapperFillColor <a class="header-anchor" href="#furniture-iconwrapperfillcolor" aria-label="Permalink to "furniture.iconWrapperFillColor""></a></h3><ul><li><strong>类型</strong>: <code>ColorSource</code></li><li><strong>默认值</strong>: <code>'#26a69a'</code></li></ul><p>编辑按钮(删除、旋转、缩放、移动)图标容器的填充颜色。</p><h3 id="furniture-outlineoffset" tabindex="-1">furniture.outlineOffset <a class="header-anchor" href="#furniture-outlineoffset" aria-label="Permalink to "furniture.outlineOffset""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>16</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>编辑轮廓相对于家具边界的偏移距离。</p><h3 id="furniture-outlinestrokecolor" tabindex="-1">furniture.outlineStrokeColor <a class="header-anchor" href="#furniture-outlinestrokecolor" aria-label="Permalink to "furniture.outlineStrokeColor""></a></h3><ul><li><strong>类型</strong>: <code>ColorSource</code></li><li><strong>默认值</strong>: <code>'#26a69a'</code></li></ul><p>编辑轮廓描边颜色。</p><h3 id="furniture-outlinestrokewidth" tabindex="-1">furniture.outlineStrokeWidth <a class="header-anchor" href="#furniture-outlinestrokewidth" aria-label="Permalink to "furniture.outlineStrokeWidth""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>1.5</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>编辑轮廓描边宽度。</p><h3 id="furniture-outlinefillcolor" tabindex="-1">furniture.outlineFillColor <a class="header-anchor" href="#furniture-outlinefillcolor" aria-label="Permalink to "furniture.outlineFillColor""></a></h3><ul><li><strong>类型</strong>: <code>ColorSource</code></li><li><strong>默认值</strong>: <code>'rgba(38, 166, 154, 0.05)'</code></li></ul><p>编辑轮廓填充颜色。</p><h3 id="furniture-outlinedashed" tabindex="-1">furniture.outlineDashed <a class="header-anchor" href="#furniture-outlinedashed" aria-label="Permalink to "furniture.outlineDashed""></a></h3><ul><li><strong>类型</strong>: <code>boolean</code></li><li><strong>默认值</strong>: <code>true</code></li></ul><p>编辑轮廓是否为虚线。</p><h3 id="furniture-outlinedasharray" tabindex="-1">furniture.outlineDashArray <a class="header-anchor" href="#furniture-outlinedasharray" aria-label="Permalink to "furniture.outlineDashArray""></a></h3><ul><li><strong>类型</strong>: <code>[number, number]</code></li><li><strong>默认值</strong>: <code>[4, 3]</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>编辑轮廓虚线样式 [实线长度, 间隙长度]。</p><h3 id="furniture-showsizetext" tabindex="-1">furniture.showSizeText <a class="header-anchor" href="#furniture-showsizetext" aria-label="Permalink to "furniture.showSizeText""></a></h3><ul><li><strong>类型</strong>: <code>boolean</code></li><li><strong>默认值</strong>: <code>true</code></li></ul><p>是否在编辑状态下显示家具的尺寸文本。</p><h3 id="furniture-textcolor" tabindex="-1">furniture.textColor <a class="header-anchor" href="#furniture-textcolor" aria-label="Permalink to "furniture.textColor""></a></h3><ul><li><strong>类型</strong>: <code>ColorSource</code></li><li><strong>默认值</strong>: <code>'#26a69a'</code></li></ul><p>尺寸文本颜色。</p><h3 id="furniture-textposition" tabindex="-1">furniture.textPosition <a class="header-anchor" href="#furniture-textposition" aria-label="Permalink to "furniture.textPosition""></a></h3><ul><li><strong>类型</strong>: <code>'top' | 'right' | 'bottom' | 'left'</code></li><li><strong>默认值</strong>: <code>'bottom'</code></li></ul><p>尺寸文本显示位置。</p><h3 id="furniture-textoffset" tabindex="-1">furniture.textOffset <a class="header-anchor" href="#furniture-textoffset" aria-label="Permalink to "furniture.textOffset""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>8</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>尺寸文本距离轮廓的偏移。</p><h3 id="furniture-minscaleratio" tabindex="-1">furniture.minScaleRatio <a class="header-anchor" href="#furniture-minscaleratio" aria-label="Permalink to "furniture.minScaleRatio""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>0.5</code></li></ul><p>缩放按钮允许的最小缩放倍数(相对于初始尺寸)。设为 <code>0</code> 表示不限制最小缩放。</p><h3 id="furniture-maxscaleratio" tabindex="-1">furniture.maxScaleRatio <a class="header-anchor" href="#furniture-maxscaleratio" aria-label="Permalink to "furniture.maxScaleRatio""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>2</code></li></ul><p>缩放按钮允许的最大缩放倍数(相对于初始尺寸)。设为 <code>Infinity</code> 表示不限制最大缩放。</p><h3 id="furniture-rotatedirection" tabindex="-1">furniture.rotateDirection <a class="header-anchor" href="#furniture-rotatedirection" aria-label="Permalink to "furniture.rotateDirection""></a></h3><ul><li><strong>类型</strong>: <code>'cw' | 'ccw'</code></li><li><strong>默认值</strong>: <code>'cw'</code></li></ul><p>点击旋转按钮时的旋转方向。</p><ul><li><code>'cw'</code>:顺时针旋转 90 度</li><li><code>'ccw'</code>:逆时针旋转 90 度</li></ul><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>旋转后,编辑按钮(删除、旋转、缩放、移动)会保持在各自的视觉位置不变,用户可以连续点击旋转按钮。</p></div><h2 id="robot" tabindex="-1">robot <a class="header-anchor" href="#robot" aria-label="Permalink to "robot""></a></h2><p>机器人配置,控制机器人图标、动画和预警圈的显示。</p><h3 id="robot-icon" tabindex="-1">robot.icon <a class="header-anchor" href="#robot-icon" aria-label="Permalink to "robot.icon""></a></h3><p>机器人图标配置。</p><h4 id="robot-icon-sizefixed" tabindex="-1">robot.icon.sizeFixed <a class="header-anchor" href="#robot-icon-sizefixed" aria-label="Permalink to "robot.icon.sizeFixed""></a></h4><ul><li><strong>类型</strong>: <code>boolean</code></li><li><strong>默认值</strong>: <code>false</code></li></ul><p>机器人图标尺寸是否固定(不跟随地图缩放变化)。</p><h4 id="robot-icon-width" tabindex="-1">robot.icon.width <a class="header-anchor" href="#robot-icon-width" aria-label="Permalink to "robot.icon.width""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>8</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>机器人图标宽度。</p><h4 id="robot-icon-height" tabindex="-1">robot.icon.height <a class="header-anchor" href="#robot-icon-height" aria-label="Permalink to "robot.icon.height""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>8</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>机器人图标高度。</p><h4 id="robot-icon-src" tabindex="-1">robot.icon.src <a class="header-anchor" href="#robot-icon-src" aria-label="Permalink to "robot.icon.src""></a></h4><ul><li><strong>类型</strong>: <code>string</code></li><li><strong>默认值</strong>: <code>内置资源</code></li></ul><p>机器人图标资源路径。</p><h3 id="robot-speed" tabindex="-1">robot.speed <a class="header-anchor" href="#robot-speed" aria-label="Permalink to "robot.speed""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>0</code></li><li><strong>单位</strong>: <code>米/秒</code></li></ul><p>机器人移动速度,用于路径动画。</p><p>路径数据变化时,机器人和增量路径会按照 <code>speed</code> 配置的速度进行动画。</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p><code>speed</code> 设置为<strong>0</strong>可以关闭路径动画,机器人会直接绘制到目标位置。</p></div><h3 id="robot-rotationcorrection" tabindex="-1">robot.rotationCorrection <a class="header-anchor" href="#robot-rotationcorrection" aria-label="Permalink to "robot.rotationCorrection""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>0</code></li><li><strong>单位</strong>: <code>度</code></li></ul><p>机器人图标角度校正,用于校正图标默认朝向。</p><p>0度表示图标朝右,角度值按顺时针方向递增。</p><h3 id="robot-sleepanimation" tabindex="-1">robot.sleepAnimation <a class="header-anchor" href="#robot-sleepanimation" aria-label="Permalink to "robot.sleepAnimation""></a></h3><p>机器人睡眠动画配置。</p><h4 id="robot-sleepanimation-jsonsrc" tabindex="-1">robot.sleepAnimation.jsonSrc <a class="header-anchor" href="#robot-sleepanimation-jsonsrc" aria-label="Permalink to "robot.sleepAnimation.jsonSrc""></a></h4><ul><li><strong>类型</strong>: <code>string</code></li><li><strong>默认值</strong>: <code>内置资源</code></li></ul><p>睡眠动画JSON资源路径,使用<a href="https://www.texturepacker.com/" target="_blank" rel="noreferrer"><strong>TexturePacker</strong></a>生成的JSON文件</p><h4 id="robot-sleepanimation-imagesrc" tabindex="-1">robot.sleepAnimation.imageSrc <a class="header-anchor" href="#robot-sleepanimation-imagesrc" aria-label="Permalink to "robot.sleepAnimation.imageSrc""></a></h4><ul><li><strong>类型</strong>: <code>string</code></li><li><strong>默认值</strong>: <code>内置资源</code></li></ul><p>睡眠动画图片资源路径,使用<a href="https://www.texturepacker.com/" target="_blank" rel="noreferrer"><strong>TexturePacker</strong></a>生成的图片资源。</p><h4 id="robot-sleepanimation-imagesrc-1" tabindex="-1">robot.sleepAnimation.imageSrc <a class="header-anchor" href="#robot-sleepanimation-imagesrc-1" aria-label="Permalink to "robot.sleepAnimation.imageSrc""></a></h4><ul><li><strong>类型</strong>: <code>string</code></li><li><strong>默认值</strong>: <code>内置资源</code></li></ul><p>睡眠动画图片资源路径,使用<a href="https://www.texturepacker.com/" target="_blank" rel="noreferrer"><strong>TexturePacker</strong></a>生成的图片资源。</p><h4 id="robot-sleepanimation-frameprefix" tabindex="-1">robot.sleepAnimation.framePrefix <a class="header-anchor" href="#robot-sleepanimation-frameprefix" aria-label="Permalink to "robot.sleepAnimation.framePrefix""></a></h4><ul><li><strong>类型</strong>: <code>string</code></li><li><strong>默认值</strong>: <code>'sleep_'</code></li></ul><p>动画帧名称前缀。</p><h4 id="robot-sleepanimation-width" tabindex="-1">robot.sleepAnimation.width <a class="header-anchor" href="#robot-sleepanimation-width" aria-label="Permalink to "robot.sleepAnimation.width""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>16</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>睡眠动画宽度。</p><h4 id="robot-sleepanimation-height" tabindex="-1">robot.sleepAnimation.height <a class="header-anchor" href="#robot-sleepanimation-height" aria-label="Permalink to "robot.sleepAnimation.height""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>16</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>睡眠动画高度。</p><h4 id="robot-sleepanimation-sizefixed" tabindex="-1">robot.sleepAnimation.sizeFixed <a class="header-anchor" href="#robot-sleepanimation-sizefixed" aria-label="Permalink to "robot.sleepAnimation.sizeFixed""></a></h4><ul><li><strong>类型</strong>: <code>boolean</code></li><li><strong>默认值</strong>: <code>false</code></li></ul><p>睡眠动画尺寸是否固定。</p><h4 id="robot-sleepanimation-framecount" tabindex="-1">robot.sleepAnimation.frameCount <a class="header-anchor" href="#robot-sleepanimation-framecount" aria-label="Permalink to "robot.sleepAnimation.frameCount""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>96</code></li></ul><p>动画总帧数。</p><h4 id="robot-sleepanimation-offsetx" tabindex="-1">robot.sleepAnimation.offsetX <a class="header-anchor" href="#robot-sleepanimation-offsetx" aria-label="Permalink to "robot.sleepAnimation.offsetX""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>8</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>睡眠动画X轴偏移。</p><h4 id="robot-sleepanimation-offsety" tabindex="-1">robot.sleepAnimation.offsetY <a class="header-anchor" href="#robot-sleepanimation-offsety" aria-label="Permalink to "robot.sleepAnimation.offsetY""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>-8</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>睡眠动画Y轴偏移。</p><h3 id="robot-ring" tabindex="-1">robot.ring <a class="header-anchor" href="#robot-ring" aria-label="Permalink to "robot.ring""></a></h3><p>机器人预警圈配置。</p><h4 id="robot-ring-size" tabindex="-1">robot.ring.size <a class="header-anchor" href="#robot-ring-size" aria-label="Permalink to "robot.ring.size""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>1</code></li><li><strong>单位</strong>: <code>米</code></li></ul><p>预警圈大小。</p><h4 id="robot-ring-color" tabindex="-1">robot.ring.color <a class="header-anchor" href="#robot-ring-color" aria-label="Permalink to "robot.ring.color""></a></h4><ul><li><strong>类型</strong>: <code>ColorSource</code></li><li><strong>默认值</strong>: <code>'rgba(255, 68, 68, 0.2)'</code></li></ul><p>预警圈填充颜色。</p><h4 id="robot-ring-strokewidth" tabindex="-1">robot.ring.strokeWidth <a class="header-anchor" href="#robot-ring-strokewidth" aria-label="Permalink to "robot.ring.strokeWidth""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>1</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>预警圈描边宽度。</p><h4 id="robot-ring-strokecolor" tabindex="-1">robot.ring.strokeColor <a class="header-anchor" href="#robot-ring-strokecolor" aria-label="Permalink to "robot.ring.strokeColor""></a></h4><ul><li><strong>类型</strong>: <code>ColorSource</code></li><li><strong>默认值</strong>: <code>'#ffffff'</code></li></ul><p>预警圈描边颜色。</p><h4 id="robot-ring-strokedashed" tabindex="-1">robot.ring.strokeDashed <a class="header-anchor" href="#robot-ring-strokedashed" aria-label="Permalink to "robot.ring.strokeDashed""></a></h4><ul><li><strong>类型</strong>: <code>boolean</code></li><li><strong>默认值</strong>: <code>true</code></li></ul><p>预警圈描边是否为虚线。</p><h4 id="robot-ring-strokedasharray" tabindex="-1">robot.ring.strokeDashArray <a class="header-anchor" href="#robot-ring-strokedasharray" aria-label="Permalink to "robot.ring.strokeDashArray""></a></h4><ul><li><strong>类型</strong>: <code>[number, number]</code></li><li><strong>默认值</strong>: <code>[4, 4]</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>预警圈虚线样式 [实线长度, 间隙长度]。</p><h3 id="robot-pulsecircle" tabindex="-1">robot.pulseCircle <a class="header-anchor" href="#robot-pulsecircle" aria-label="Permalink to "robot.pulseCircle""></a></h3><p>机器人脉冲圈配置,控制呼吸动画效果。</p><h4 id="robot-pulsecircle-size" tabindex="-1">robot.pulseCircle.size <a class="header-anchor" href="#robot-pulsecircle-size" aria-label="Permalink to "robot.pulseCircle.size""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>12</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>脉冲圈的大小(直径)。</p><h4 id="robot-pulsecircle-color" tabindex="-1">robot.pulseCircle.color <a class="header-anchor" href="#robot-pulsecircle-color" aria-label="Permalink to "robot.pulseCircle.color""></a></h4><ul><li><strong>类型</strong>: <code>ColorSource</code></li><li><strong>默认值</strong>: <code>'#4cd964'</code></li></ul><p>脉冲圈填充颜色。</p><h4 id="robot-pulsecircle-strokewidth" tabindex="-1">robot.pulseCircle.strokeWidth <a class="header-anchor" href="#robot-pulsecircle-strokewidth" aria-label="Permalink to "robot.pulseCircle.strokeWidth""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>0</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>脉冲圈描边宽度。</p><h4 id="robot-pulsecircle-strokecolor" tabindex="-1">robot.pulseCircle.strokeColor <a class="header-anchor" href="#robot-pulsecircle-strokecolor" aria-label="Permalink to "robot.pulseCircle.strokeColor""></a></h4><ul><li><strong>类型</strong>: <code>ColorSource</code></li><li><strong>默认值</strong>: <code>'#ffffff'</code></li></ul><p>脉冲圈描边颜色。</p><h4 id="robot-pulsecircle-duration" tabindex="-1">robot.pulseCircle.duration <a class="header-anchor" href="#robot-pulsecircle-duration" aria-label="Permalink to "robot.pulseCircle.duration""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>1000</code></li><li><strong>单位</strong>: <code>毫秒</code></li></ul><p>脉冲圈呼吸动画的持续时间(一个完整的呼吸周期)。</p><h4 id="robot-pulsecircle-sizefixed" tabindex="-1">robot.pulseCircle.sizeFixed <a class="header-anchor" href="#robot-pulsecircle-sizefixed" aria-label="Permalink to "robot.pulseCircle.sizeFixed""></a></h4><ul><li><strong>类型</strong>: <code>boolean</code></li><li><strong>默认值</strong>: <code>false</code></li></ul><p>脉冲圈尺寸是否固定(不跟随地图缩放变化)。</p><h4 id="robot-pulsecircle-minscale" tabindex="-1">robot.pulseCircle.minScale <a class="header-anchor" href="#robot-pulsecircle-minscale" aria-label="Permalink to "robot.pulseCircle.minScale""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>0.5</code></li></ul><p>呼吸动画的最小缩放比例。</p><h4 id="robot-pulsecircle-maxscale" tabindex="-1">robot.pulseCircle.maxScale <a class="header-anchor" href="#robot-pulsecircle-maxscale" aria-label="Permalink to "robot.pulseCircle.maxScale""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>1</code></li></ul><p>呼吸动画的最大缩放比例。</p><h4 id="robot-pulsecircle-minalpha" tabindex="-1">robot.pulseCircle.minAlpha <a class="header-anchor" href="#robot-pulsecircle-minalpha" aria-label="Permalink to "robot.pulseCircle.minAlpha""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>0.5</code></li></ul><p>呼吸动画的最小透明度(0-1 之间)。</p><h4 id="robot-pulsecircle-maxalpha" tabindex="-1">robot.pulseCircle.maxAlpha <a class="header-anchor" href="#robot-pulsecircle-maxalpha" aria-label="Permalink to "robot.pulseCircle.maxAlpha""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>1</code></li></ul><p>呼吸动画的最大透明度(0-1 之间)。</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>通过调整 <code>minScale/maxScale</code> 和 <code>minAlpha/maxAlpha</code> 可以自定义呼吸效果的幅度和透明度变化。 例如,更大的缩放范围(如 0.4 到 1.2)会产生更明显的呼吸效果。</p></div><h2 id="chargingstation" tabindex="-1">chargingStation <a class="header-anchor" href="#chargingstation" aria-label="Permalink to "chargingStation""></a></h2><p>充电桩配置,控制充电桩图标和预警圈的显示。</p><h3 id="chargingstation-icon" tabindex="-1">chargingStation.icon <a class="header-anchor" href="#chargingstation-icon" aria-label="Permalink to "chargingStation.icon""></a></h3><p>充电桩图标配置。</p><h4 id="chargingstation-icon-sizefixed" tabindex="-1">chargingStation.icon.sizeFixed <a class="header-anchor" href="#chargingstation-icon-sizefixed" aria-label="Permalink to "chargingStation.icon.sizeFixed""></a></h4><ul><li><strong>类型</strong>: <code>boolean</code></li><li><strong>默认值</strong>: <code>false</code></li></ul><p>充电桩图标尺寸是否固定。</p><h4 id="chargingstation-icon-width" tabindex="-1">chargingStation.icon.width <a class="header-anchor" href="#chargingstation-icon-width" aria-label="Permalink to "chargingStation.icon.width""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>8</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>充电桩图标宽度。</p><h4 id="chargingstation-icon-height" tabindex="-1">chargingStation.icon.height <a class="header-anchor" href="#chargingstation-icon-height" aria-label="Permalink to "chargingStation.icon.height""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>8</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>充电桩图标高度。</p><h4 id="chargingstation-icon-src" tabindex="-1">chargingStation.icon.src <a class="header-anchor" href="#chargingstation-icon-src" aria-label="Permalink to "chargingStation.icon.src""></a></h4><ul><li><strong>类型</strong>: <code>string</code></li><li><strong>默认值</strong>: <code>内置资源</code></li></ul><p>充电桩图标资源路径。</p><h3 id="chargingstation-rotationcorrection" tabindex="-1">chargingStation.rotationCorrection <a class="header-anchor" href="#chargingstation-rotationcorrection" aria-label="Permalink to "chargingStation.rotationCorrection""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>0</code></li><li><strong>单位</strong>: <code>度</code></li></ul><p>充电桩图标角度校正,用于校正图标默认朝向。</p><p>0度表示图标朝右,角度值按顺时针方向递增。</p><h3 id="chargingstation-ring" tabindex="-1">chargingStation.ring <a class="header-anchor" href="#chargingstation-ring" aria-label="Permalink to "chargingStation.ring""></a></h3><p>充电桩预警圈配置。</p><h4 id="chargingstation-ring-size" tabindex="-1">chargingStation.ring.size <a class="header-anchor" href="#chargingstation-ring-size" aria-label="Permalink to "chargingStation.ring.size""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>1</code></li><li><strong>单位</strong>: <code>米</code></li></ul><p>预警圈大小。</p><h4 id="chargingstation-ring-color" tabindex="-1">chargingStation.ring.color <a class="header-anchor" href="#chargingstation-ring-color" aria-label="Permalink to "chargingStation.ring.color""></a></h4><ul><li><strong>类型</strong>: <code>ColorSource</code></li><li><strong>默认值</strong>: <code>'rgba(255, 68, 68, 0.2)'</code></li></ul><p>预警圈填充颜色。</p><h4 id="chargingstation-ring-strokewidth" tabindex="-1">chargingStation.ring.strokeWidth <a class="header-anchor" href="#chargingstation-ring-strokewidth" aria-label="Permalink to "chargingStation.ring.strokeWidth""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>1</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>预警圈描边宽度。</p><h4 id="chargingstation-ring-strokecolor" tabindex="-1">chargingStation.ring.strokeColor <a class="header-anchor" href="#chargingstation-ring-strokecolor" aria-label="Permalink to "chargingStation.ring.strokeColor""></a></h4><ul><li><strong>类型</strong>: <code>ColorSource</code></li><li><strong>默认值</strong>: <code>'#ffffff'</code></li></ul><p>预警圈描边颜色。</p><h4 id="chargingstation-ring-strokedashed" tabindex="-1">chargingStation.ring.strokeDashed <a class="header-anchor" href="#chargingstation-ring-strokedashed" aria-label="Permalink to "chargingStation.ring.strokeDashed""></a></h4><ul><li><strong>类型</strong>: <code>boolean</code></li><li><strong>默认值</strong>: <code>true</code></li></ul><p>预警圈描边是否为虚线。</p><h4 id="chargingstation-ring-strokedasharray" tabindex="-1">chargingStation.ring.strokeDashArray <a class="header-anchor" href="#chargingstation-ring-strokedasharray" aria-label="Permalink to "chargingStation.ring.strokeDashArray""></a></h4><ul><li><strong>类型</strong>: <code>[number, number]</code></li><li><strong>默认值</strong>: <code>[4, 4]</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>预警圈虚线样式 [实线长度, 间隙长度]。</p><h2 id="controls" tabindex="-1">controls <a class="header-anchor" href="#controls" aria-label="Permalink to "controls""></a></h2><p>控制元素配置,包括各种编辑工具的样式和行为设置。</p><h3 id="controls-iconwrapperwidth" tabindex="-1">controls.iconWrapperWidth <a class="header-anchor" href="#controls-iconwrapperwidth" aria-label="Permalink to "controls.iconWrapperWidth""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>24</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>操作按钮图标容器宽度</p><h3 id="controls-iconwrapperheight" tabindex="-1">controls.iconWrapperHeight <a class="header-anchor" href="#controls-iconwrapperheight" aria-label="Permalink to "controls.iconWrapperHeight""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>24</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>操作按钮图标容器高度</p><h3 id="controls-iconwrapperborderradius" tabindex="-1">controls.iconWrapperBorderRadius <a class="header-anchor" href="#controls-iconwrapperborderradius" aria-label="Permalink to "controls.iconWrapperBorderRadius""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>16</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>操作按钮图标容器边框圆角</p><h3 id="controls-iconwidth" tabindex="-1">controls.iconWidth <a class="header-anchor" href="#controls-iconwidth" aria-label="Permalink to "controls.iconWidth""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>12</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>操作按钮图标宽度</p><h3 id="controls-iconheight" tabindex="-1">controls.iconHeight <a class="header-anchor" href="#controls-iconheight" aria-label="Permalink to "controls.iconHeight""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>12</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>操作按钮图标高度</p><h3 id="controls-deleteiconsrc" tabindex="-1">controls.deleteIconSrc <a class="header-anchor" href="#controls-deleteiconsrc" aria-label="Permalink to "controls.deleteIconSrc""></a></h3><ul><li><strong>类型</strong>: <code>string</code></li><li><strong>默认值</strong>: <code>内置资源</code></li></ul><p>删除按钮图标资源路径</p><h3 id="controls-rotateiconsrc" tabindex="-1">controls.rotateIconSrc <a class="header-anchor" href="#controls-rotateiconsrc" aria-label="Permalink to "controls.rotateIconSrc""></a></h3><ul><li><strong>类型</strong>: <code>string</code></li><li><strong>默认值</strong>: <code>内置资源</code></li></ul><p>旋转按钮图标资源路径</p><h3 id="controls-scaleiconsrc" tabindex="-1">controls.scaleIconSrc <a class="header-anchor" href="#controls-scaleiconsrc" aria-label="Permalink to "controls.scaleIconSrc""></a></h3><ul><li><strong>类型</strong>: <code>string</code></li><li><strong>默认值</strong>: <code>内置资源</code></li></ul><p>缩放按钮图标资源路径</p><h3 id="controls-moveiconsrc" tabindex="-1">controls.moveIconSrc <a class="header-anchor" href="#controls-moveiconsrc" aria-label="Permalink to "controls.moveIconSrc""></a></h3><ul><li><strong>类型</strong>: <code>string</code></li><li><strong>默认值</strong>: <code>内置资源</code></li></ul><p>移动按钮图标资源路径</p><h3 id="controls-horizontalscaleiconsrc" tabindex="-1">controls.horizontalScaleIconSrc <a class="header-anchor" href="#controls-horizontalscaleiconsrc" aria-label="Permalink to "controls.horizontalScaleIconSrc""></a></h3><ul><li><strong>类型</strong>: <code>string</code></li><li><strong>默认值</strong>: <code>内置资源</code></li></ul><p>横向缩放按钮图标资源路径。</p><h3 id="controls-verticalscaleiconsrc" tabindex="-1">controls.verticalScaleIconSrc <a class="header-anchor" href="#controls-verticalscaleiconsrc" aria-label="Permalink to "controls.verticalScaleIconSrc""></a></h3><ul><li><strong>类型</strong>: <code>string</code></li><li><strong>默认值</strong>: <code>内置资源</code></li></ul><p>纵向缩放按钮图标资源路径。</p><h3 id="controls-movebuttonoffset" tabindex="-1">controls.moveButtonOffset <a class="header-anchor" href="#controls-movebuttonoffset" aria-label="Permalink to "controls.moveButtonOffset""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>30</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>移动按钮偏移距离</p><h3 id="controls-textfontsize" tabindex="-1">controls.textFontSize <a class="header-anchor" href="#controls-textfontsize" aria-label="Permalink to "controls.textFontSize""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>12</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>尺寸标签文本字体大小</p><h3 id="controls-textfontfamily" tabindex="-1">controls.textFontFamily <a class="header-anchor" href="#controls-textfontfamily" aria-label="Permalink to "controls.textFontFamily""></a></h3><ul><li><strong>类型</strong>: <code>string</code></li><li><strong>默认值</strong>: <code>'system-ui, -apple-system, sans-serif'</code></li></ul><p>尺寸标签文本字体名称</p><h3 id="controls-textfontweight" tabindex="-1">controls.textFontWeight <a class="header-anchor" href="#controls-textfontweight" aria-label="Permalink to "controls.textFontWeight""></a></h3><ul><li><strong>类型</strong>: <code>TextStyleFontWeight</code></li><li><strong>默认值</strong>: <code>'400'</code></li></ul><p>尺寸标签文本字体粗细</p><h3 id="controls-renderorder" tabindex="-1">controls.renderOrder <a class="header-anchor" href="#controls-renderorder" aria-label="Permalink to "controls.renderOrder""></a></h3><ul><li><strong>类型</strong>: <code>ControlRenderItem[]</code></li><li><strong>默认值</strong>: <code>['forbiddenSweepZone', 'forbiddenMopZone', 'cleanZone', 'virtualWall', 'spot', 'wayPoint', 'divider']</code></li></ul><p>控制层内元素渲染顺序配置,数组从下到上生效(后面的元素显示在更上层)。</p><p><strong>可选值:</strong></p><ul><li><code>'forbiddenSweepZone'</code></li><li><code>'forbiddenMopZone'</code></li><li><code>'cleanZone'</code></li><li><code>'virtualWall'</code></li><li><code>'spot'</code></li><li><code>'wayPoint'</code></li><li><code>'divider'</code></li></ul><p>配置说明:</p><ul><li>你可以通过调整数组顺序来控制不同控制元素的覆盖关系。</li><li>如果配置中缺少某些元素,SDK 会自动按默认顺序补齐。</li><li>如果配置中存在重复元素,SDK 仅保留首次出现的位置。</li><li>如果配置中包含未知值,SDK 会忽略该项并输出日志告警。</li></ul><p>示例:让禁扫区域显示在禁拖区域上方</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> app</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> new</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> MapApplication</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span></span>
|
|
214
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><div class="tip custom-block"><p class="custom-block-title">TIP</p><p><code>width</code> 和 <code>height</code> 的单位是米,用于 <code>getFurniturePointsByViewportCenter()</code> 生成初始矩形时确定家具的实际尺寸。SDK 内部会根据地图的 <code>resolution</code> 自动将米转换为像素坐标。</p><p>例如双人床默认 <code>width: 1.8</code>(1.8 米)、<code>height: 2.0</code>(2.0 米)。</p></div><h3 id="furniture-opacity" tabindex="-1">furniture.opacity <a class="header-anchor" href="#furniture-opacity" aria-label="Permalink to "furniture.opacity""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>1</code></li></ul><p>家具图片的全局透明度 (0-1)。</p><h3 id="furniture-iconwrapperfillcolor" tabindex="-1">furniture.iconWrapperFillColor <a class="header-anchor" href="#furniture-iconwrapperfillcolor" aria-label="Permalink to "furniture.iconWrapperFillColor""></a></h3><ul><li><strong>类型</strong>: <code>ColorSource</code></li><li><strong>默认值</strong>: <code>'#26a69a'</code></li></ul><p>编辑按钮(删除、旋转、缩放、移动)图标容器的填充颜色。</p><h3 id="furniture-outlineoffset" tabindex="-1">furniture.outlineOffset <a class="header-anchor" href="#furniture-outlineoffset" aria-label="Permalink to "furniture.outlineOffset""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>16</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>编辑轮廓相对于家具边界的偏移距离。</p><h3 id="furniture-outlinestrokecolor" tabindex="-1">furniture.outlineStrokeColor <a class="header-anchor" href="#furniture-outlinestrokecolor" aria-label="Permalink to "furniture.outlineStrokeColor""></a></h3><ul><li><strong>类型</strong>: <code>ColorSource</code></li><li><strong>默认值</strong>: <code>'#26a69a'</code></li></ul><p>编辑轮廓描边颜色。</p><h3 id="furniture-outlinestrokewidth" tabindex="-1">furniture.outlineStrokeWidth <a class="header-anchor" href="#furniture-outlinestrokewidth" aria-label="Permalink to "furniture.outlineStrokeWidth""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>1.5</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>编辑轮廓描边宽度。</p><h3 id="furniture-outlinefillcolor" tabindex="-1">furniture.outlineFillColor <a class="header-anchor" href="#furniture-outlinefillcolor" aria-label="Permalink to "furniture.outlineFillColor""></a></h3><ul><li><strong>类型</strong>: <code>ColorSource</code></li><li><strong>默认值</strong>: <code>'rgba(38, 166, 154, 0.05)'</code></li></ul><p>编辑轮廓填充颜色。</p><h3 id="furniture-outlinedashed" tabindex="-1">furniture.outlineDashed <a class="header-anchor" href="#furniture-outlinedashed" aria-label="Permalink to "furniture.outlineDashed""></a></h3><ul><li><strong>类型</strong>: <code>boolean</code></li><li><strong>默认值</strong>: <code>true</code></li></ul><p>编辑轮廓是否为虚线。</p><h3 id="furniture-outlinedasharray" tabindex="-1">furniture.outlineDashArray <a class="header-anchor" href="#furniture-outlinedasharray" aria-label="Permalink to "furniture.outlineDashArray""></a></h3><ul><li><strong>类型</strong>: <code>[number, number]</code></li><li><strong>默认值</strong>: <code>[4, 3]</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>编辑轮廓虚线样式 [实线长度, 间隙长度]。</p><h3 id="furniture-showsizetext" tabindex="-1">furniture.showSizeText <a class="header-anchor" href="#furniture-showsizetext" aria-label="Permalink to "furniture.showSizeText""></a></h3><ul><li><strong>类型</strong>: <code>boolean</code></li><li><strong>默认值</strong>: <code>true</code></li></ul><p>是否在编辑状态下显示家具的尺寸文本。</p><h3 id="furniture-textcolor" tabindex="-1">furniture.textColor <a class="header-anchor" href="#furniture-textcolor" aria-label="Permalink to "furniture.textColor""></a></h3><ul><li><strong>类型</strong>: <code>ColorSource</code></li><li><strong>默认值</strong>: <code>'#26a69a'</code></li></ul><p>尺寸文本颜色。</p><h3 id="furniture-textposition" tabindex="-1">furniture.textPosition <a class="header-anchor" href="#furniture-textposition" aria-label="Permalink to "furniture.textPosition""></a></h3><ul><li><strong>类型</strong>: <code>'top' | 'right' | 'bottom' | 'left'</code></li><li><strong>默认值</strong>: <code>'bottom'</code></li></ul><p>尺寸文本显示位置。</p><h3 id="furniture-textoffset" tabindex="-1">furniture.textOffset <a class="header-anchor" href="#furniture-textoffset" aria-label="Permalink to "furniture.textOffset""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>8</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>尺寸文本距离轮廓的偏移。</p><h3 id="furniture-minscaleratio" tabindex="-1">furniture.minScaleRatio <a class="header-anchor" href="#furniture-minscaleratio" aria-label="Permalink to "furniture.minScaleRatio""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>0.5</code></li></ul><p>缩放按钮允许的最小缩放倍数(相对于初始尺寸)。设为 <code>0</code> 表示不限制最小缩放。</p><h3 id="furniture-maxscaleratio" tabindex="-1">furniture.maxScaleRatio <a class="header-anchor" href="#furniture-maxscaleratio" aria-label="Permalink to "furniture.maxScaleRatio""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>2</code></li></ul><p>缩放按钮允许的最大缩放倍数(相对于初始尺寸)。设为 <code>Infinity</code> 表示不限制最大缩放。</p><h3 id="furniture-rotatedirection" tabindex="-1">furniture.rotateDirection <a class="header-anchor" href="#furniture-rotatedirection" aria-label="Permalink to "furniture.rotateDirection""></a></h3><ul><li><strong>类型</strong>: <code>'cw' | 'ccw'</code></li><li><strong>默认值</strong>: <code>'cw'</code></li></ul><p>点击旋转按钮时的旋转方向。</p><ul><li><code>'cw'</code>:顺时针旋转 90 度</li><li><code>'ccw'</code>:逆时针旋转 90 度</li></ul><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>旋转后,编辑按钮(删除、旋转、缩放、移动)会保持在各自的视觉位置不变,用户可以连续点击旋转按钮。</p></div><h3 id="furniture-lockaspectratio" tabindex="-1">furniture.lockAspectRatio <a class="header-anchor" href="#furniture-lockaspectratio" aria-label="Permalink to "furniture.lockAspectRatio""></a></h3><ul><li><strong>类型</strong>: <code>boolean</code></li><li><strong>默认值</strong>: <code>false</code></li></ul><p>缩放时是否锁定宽高比。启用后,拖拽缩放手柄时宽度和高度将等比例缩放,保持家具原始的宽高比例不变。</p><h2 id="robot" tabindex="-1">robot <a class="header-anchor" href="#robot" aria-label="Permalink to "robot""></a></h2><p>机器人配置,控制机器人图标、动画和预警圈的显示。</p><h3 id="robot-icon" tabindex="-1">robot.icon <a class="header-anchor" href="#robot-icon" aria-label="Permalink to "robot.icon""></a></h3><p>机器人图标配置。</p><h4 id="robot-icon-sizefixed" tabindex="-1">robot.icon.sizeFixed <a class="header-anchor" href="#robot-icon-sizefixed" aria-label="Permalink to "robot.icon.sizeFixed""></a></h4><ul><li><strong>类型</strong>: <code>boolean</code></li><li><strong>默认值</strong>: <code>false</code></li></ul><p>机器人图标尺寸是否固定(不跟随地图缩放变化)。</p><h4 id="robot-icon-width" tabindex="-1">robot.icon.width <a class="header-anchor" href="#robot-icon-width" aria-label="Permalink to "robot.icon.width""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>8</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>机器人图标宽度。</p><h4 id="robot-icon-height" tabindex="-1">robot.icon.height <a class="header-anchor" href="#robot-icon-height" aria-label="Permalink to "robot.icon.height""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>8</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>机器人图标高度。</p><h4 id="robot-icon-src" tabindex="-1">robot.icon.src <a class="header-anchor" href="#robot-icon-src" aria-label="Permalink to "robot.icon.src""></a></h4><ul><li><strong>类型</strong>: <code>string</code></li><li><strong>默认值</strong>: <code>内置资源</code></li></ul><p>机器人图标资源路径。</p><h3 id="robot-speed" tabindex="-1">robot.speed <a class="header-anchor" href="#robot-speed" aria-label="Permalink to "robot.speed""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>0</code></li><li><strong>单位</strong>: <code>米/秒</code></li></ul><p>机器人移动速度,用于路径动画。</p><p>路径数据变化时,机器人和增量路径会按照 <code>speed</code> 配置的速度进行动画。</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p><code>speed</code> 设置为<strong>0</strong>可以关闭路径动画,机器人会直接绘制到目标位置。</p></div><h3 id="robot-rotationcorrection" tabindex="-1">robot.rotationCorrection <a class="header-anchor" href="#robot-rotationcorrection" aria-label="Permalink to "robot.rotationCorrection""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>0</code></li><li><strong>单位</strong>: <code>度</code></li></ul><p>机器人图标角度校正,用于校正图标默认朝向。</p><p>0度表示图标朝右,角度值按顺时针方向递增。</p><h3 id="robot-sleepanimation" tabindex="-1">robot.sleepAnimation <a class="header-anchor" href="#robot-sleepanimation" aria-label="Permalink to "robot.sleepAnimation""></a></h3><p>机器人睡眠动画配置。</p><h4 id="robot-sleepanimation-jsonsrc" tabindex="-1">robot.sleepAnimation.jsonSrc <a class="header-anchor" href="#robot-sleepanimation-jsonsrc" aria-label="Permalink to "robot.sleepAnimation.jsonSrc""></a></h4><ul><li><strong>类型</strong>: <code>string</code></li><li><strong>默认值</strong>: <code>内置资源</code></li></ul><p>睡眠动画JSON资源路径,使用<a href="https://www.texturepacker.com/" target="_blank" rel="noreferrer"><strong>TexturePacker</strong></a>生成的JSON文件</p><h4 id="robot-sleepanimation-imagesrc" tabindex="-1">robot.sleepAnimation.imageSrc <a class="header-anchor" href="#robot-sleepanimation-imagesrc" aria-label="Permalink to "robot.sleepAnimation.imageSrc""></a></h4><ul><li><strong>类型</strong>: <code>string</code></li><li><strong>默认值</strong>: <code>内置资源</code></li></ul><p>睡眠动画图片资源路径,使用<a href="https://www.texturepacker.com/" target="_blank" rel="noreferrer"><strong>TexturePacker</strong></a>生成的图片资源。</p><h4 id="robot-sleepanimation-imagesrc-1" tabindex="-1">robot.sleepAnimation.imageSrc <a class="header-anchor" href="#robot-sleepanimation-imagesrc-1" aria-label="Permalink to "robot.sleepAnimation.imageSrc""></a></h4><ul><li><strong>类型</strong>: <code>string</code></li><li><strong>默认值</strong>: <code>内置资源</code></li></ul><p>睡眠动画图片资源路径,使用<a href="https://www.texturepacker.com/" target="_blank" rel="noreferrer"><strong>TexturePacker</strong></a>生成的图片资源。</p><h4 id="robot-sleepanimation-frameprefix" tabindex="-1">robot.sleepAnimation.framePrefix <a class="header-anchor" href="#robot-sleepanimation-frameprefix" aria-label="Permalink to "robot.sleepAnimation.framePrefix""></a></h4><ul><li><strong>类型</strong>: <code>string</code></li><li><strong>默认值</strong>: <code>'sleep_'</code></li></ul><p>动画帧名称前缀。</p><h4 id="robot-sleepanimation-width" tabindex="-1">robot.sleepAnimation.width <a class="header-anchor" href="#robot-sleepanimation-width" aria-label="Permalink to "robot.sleepAnimation.width""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>16</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>睡眠动画宽度。</p><h4 id="robot-sleepanimation-height" tabindex="-1">robot.sleepAnimation.height <a class="header-anchor" href="#robot-sleepanimation-height" aria-label="Permalink to "robot.sleepAnimation.height""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>16</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>睡眠动画高度。</p><h4 id="robot-sleepanimation-sizefixed" tabindex="-1">robot.sleepAnimation.sizeFixed <a class="header-anchor" href="#robot-sleepanimation-sizefixed" aria-label="Permalink to "robot.sleepAnimation.sizeFixed""></a></h4><ul><li><strong>类型</strong>: <code>boolean</code></li><li><strong>默认值</strong>: <code>false</code></li></ul><p>睡眠动画尺寸是否固定。</p><h4 id="robot-sleepanimation-framecount" tabindex="-1">robot.sleepAnimation.frameCount <a class="header-anchor" href="#robot-sleepanimation-framecount" aria-label="Permalink to "robot.sleepAnimation.frameCount""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>96</code></li></ul><p>动画总帧数。</p><h4 id="robot-sleepanimation-offsetx" tabindex="-1">robot.sleepAnimation.offsetX <a class="header-anchor" href="#robot-sleepanimation-offsetx" aria-label="Permalink to "robot.sleepAnimation.offsetX""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>8</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>睡眠动画X轴偏移。</p><h4 id="robot-sleepanimation-offsety" tabindex="-1">robot.sleepAnimation.offsetY <a class="header-anchor" href="#robot-sleepanimation-offsety" aria-label="Permalink to "robot.sleepAnimation.offsetY""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>-8</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>睡眠动画Y轴偏移。</p><h3 id="robot-ring" tabindex="-1">robot.ring <a class="header-anchor" href="#robot-ring" aria-label="Permalink to "robot.ring""></a></h3><p>机器人预警圈配置。</p><h4 id="robot-ring-size" tabindex="-1">robot.ring.size <a class="header-anchor" href="#robot-ring-size" aria-label="Permalink to "robot.ring.size""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>1</code></li><li><strong>单位</strong>: <code>米</code></li></ul><p>预警圈大小。</p><h4 id="robot-ring-color" tabindex="-1">robot.ring.color <a class="header-anchor" href="#robot-ring-color" aria-label="Permalink to "robot.ring.color""></a></h4><ul><li><strong>类型</strong>: <code>ColorSource</code></li><li><strong>默认值</strong>: <code>'rgba(255, 68, 68, 0.2)'</code></li></ul><p>预警圈填充颜色。</p><h4 id="robot-ring-strokewidth" tabindex="-1">robot.ring.strokeWidth <a class="header-anchor" href="#robot-ring-strokewidth" aria-label="Permalink to "robot.ring.strokeWidth""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>1</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>预警圈描边宽度。</p><h4 id="robot-ring-strokecolor" tabindex="-1">robot.ring.strokeColor <a class="header-anchor" href="#robot-ring-strokecolor" aria-label="Permalink to "robot.ring.strokeColor""></a></h4><ul><li><strong>类型</strong>: <code>ColorSource</code></li><li><strong>默认值</strong>: <code>'#ffffff'</code></li></ul><p>预警圈描边颜色。</p><h4 id="robot-ring-strokedashed" tabindex="-1">robot.ring.strokeDashed <a class="header-anchor" href="#robot-ring-strokedashed" aria-label="Permalink to "robot.ring.strokeDashed""></a></h4><ul><li><strong>类型</strong>: <code>boolean</code></li><li><strong>默认值</strong>: <code>true</code></li></ul><p>预警圈描边是否为虚线。</p><h4 id="robot-ring-strokedasharray" tabindex="-1">robot.ring.strokeDashArray <a class="header-anchor" href="#robot-ring-strokedasharray" aria-label="Permalink to "robot.ring.strokeDashArray""></a></h4><ul><li><strong>类型</strong>: <code>[number, number]</code></li><li><strong>默认值</strong>: <code>[4, 4]</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>预警圈虚线样式 [实线长度, 间隙长度]。</p><h3 id="robot-pulsecircle" tabindex="-1">robot.pulseCircle <a class="header-anchor" href="#robot-pulsecircle" aria-label="Permalink to "robot.pulseCircle""></a></h3><p>机器人脉冲圈配置,控制呼吸动画效果。</p><h4 id="robot-pulsecircle-size" tabindex="-1">robot.pulseCircle.size <a class="header-anchor" href="#robot-pulsecircle-size" aria-label="Permalink to "robot.pulseCircle.size""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>12</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>脉冲圈的大小(直径)。</p><h4 id="robot-pulsecircle-color" tabindex="-1">robot.pulseCircle.color <a class="header-anchor" href="#robot-pulsecircle-color" aria-label="Permalink to "robot.pulseCircle.color""></a></h4><ul><li><strong>类型</strong>: <code>ColorSource</code></li><li><strong>默认值</strong>: <code>'#4cd964'</code></li></ul><p>脉冲圈填充颜色。</p><h4 id="robot-pulsecircle-strokewidth" tabindex="-1">robot.pulseCircle.strokeWidth <a class="header-anchor" href="#robot-pulsecircle-strokewidth" aria-label="Permalink to "robot.pulseCircle.strokeWidth""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>0</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>脉冲圈描边宽度。</p><h4 id="robot-pulsecircle-strokecolor" tabindex="-1">robot.pulseCircle.strokeColor <a class="header-anchor" href="#robot-pulsecircle-strokecolor" aria-label="Permalink to "robot.pulseCircle.strokeColor""></a></h4><ul><li><strong>类型</strong>: <code>ColorSource</code></li><li><strong>默认值</strong>: <code>'#ffffff'</code></li></ul><p>脉冲圈描边颜色。</p><h4 id="robot-pulsecircle-duration" tabindex="-1">robot.pulseCircle.duration <a class="header-anchor" href="#robot-pulsecircle-duration" aria-label="Permalink to "robot.pulseCircle.duration""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>1000</code></li><li><strong>单位</strong>: <code>毫秒</code></li></ul><p>脉冲圈呼吸动画的持续时间(一个完整的呼吸周期)。</p><h4 id="robot-pulsecircle-sizefixed" tabindex="-1">robot.pulseCircle.sizeFixed <a class="header-anchor" href="#robot-pulsecircle-sizefixed" aria-label="Permalink to "robot.pulseCircle.sizeFixed""></a></h4><ul><li><strong>类型</strong>: <code>boolean</code></li><li><strong>默认值</strong>: <code>false</code></li></ul><p>脉冲圈尺寸是否固定(不跟随地图缩放变化)。</p><h4 id="robot-pulsecircle-minscale" tabindex="-1">robot.pulseCircle.minScale <a class="header-anchor" href="#robot-pulsecircle-minscale" aria-label="Permalink to "robot.pulseCircle.minScale""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>0.5</code></li></ul><p>呼吸动画的最小缩放比例。</p><h4 id="robot-pulsecircle-maxscale" tabindex="-1">robot.pulseCircle.maxScale <a class="header-anchor" href="#robot-pulsecircle-maxscale" aria-label="Permalink to "robot.pulseCircle.maxScale""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>1</code></li></ul><p>呼吸动画的最大缩放比例。</p><h4 id="robot-pulsecircle-minalpha" tabindex="-1">robot.pulseCircle.minAlpha <a class="header-anchor" href="#robot-pulsecircle-minalpha" aria-label="Permalink to "robot.pulseCircle.minAlpha""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>0.5</code></li></ul><p>呼吸动画的最小透明度(0-1 之间)。</p><h4 id="robot-pulsecircle-maxalpha" tabindex="-1">robot.pulseCircle.maxAlpha <a class="header-anchor" href="#robot-pulsecircle-maxalpha" aria-label="Permalink to "robot.pulseCircle.maxAlpha""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>1</code></li></ul><p>呼吸动画的最大透明度(0-1 之间)。</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>通过调整 <code>minScale/maxScale</code> 和 <code>minAlpha/maxAlpha</code> 可以自定义呼吸效果的幅度和透明度变化。 例如,更大的缩放范围(如 0.4 到 1.2)会产生更明显的呼吸效果。</p></div><h2 id="chargingstation" tabindex="-1">chargingStation <a class="header-anchor" href="#chargingstation" aria-label="Permalink to "chargingStation""></a></h2><p>充电桩配置,控制充电桩图标和预警圈的显示。</p><h3 id="chargingstation-icon" tabindex="-1">chargingStation.icon <a class="header-anchor" href="#chargingstation-icon" aria-label="Permalink to "chargingStation.icon""></a></h3><p>充电桩图标配置。</p><h4 id="chargingstation-icon-sizefixed" tabindex="-1">chargingStation.icon.sizeFixed <a class="header-anchor" href="#chargingstation-icon-sizefixed" aria-label="Permalink to "chargingStation.icon.sizeFixed""></a></h4><ul><li><strong>类型</strong>: <code>boolean</code></li><li><strong>默认值</strong>: <code>false</code></li></ul><p>充电桩图标尺寸是否固定。</p><h4 id="chargingstation-icon-width" tabindex="-1">chargingStation.icon.width <a class="header-anchor" href="#chargingstation-icon-width" aria-label="Permalink to "chargingStation.icon.width""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>8</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>充电桩图标宽度。</p><h4 id="chargingstation-icon-height" tabindex="-1">chargingStation.icon.height <a class="header-anchor" href="#chargingstation-icon-height" aria-label="Permalink to "chargingStation.icon.height""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>8</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>充电桩图标高度。</p><h4 id="chargingstation-icon-src" tabindex="-1">chargingStation.icon.src <a class="header-anchor" href="#chargingstation-icon-src" aria-label="Permalink to "chargingStation.icon.src""></a></h4><ul><li><strong>类型</strong>: <code>string</code></li><li><strong>默认值</strong>: <code>内置资源</code></li></ul><p>充电桩图标资源路径。</p><h3 id="chargingstation-rotationcorrection" tabindex="-1">chargingStation.rotationCorrection <a class="header-anchor" href="#chargingstation-rotationcorrection" aria-label="Permalink to "chargingStation.rotationCorrection""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>0</code></li><li><strong>单位</strong>: <code>度</code></li></ul><p>充电桩图标角度校正,用于校正图标默认朝向。</p><p>0度表示图标朝右,角度值按顺时针方向递增。</p><h3 id="chargingstation-ring" tabindex="-1">chargingStation.ring <a class="header-anchor" href="#chargingstation-ring" aria-label="Permalink to "chargingStation.ring""></a></h3><p>充电桩预警圈配置。</p><h4 id="chargingstation-ring-size" tabindex="-1">chargingStation.ring.size <a class="header-anchor" href="#chargingstation-ring-size" aria-label="Permalink to "chargingStation.ring.size""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>1</code></li><li><strong>单位</strong>: <code>米</code></li></ul><p>预警圈大小。</p><h4 id="chargingstation-ring-color" tabindex="-1">chargingStation.ring.color <a class="header-anchor" href="#chargingstation-ring-color" aria-label="Permalink to "chargingStation.ring.color""></a></h4><ul><li><strong>类型</strong>: <code>ColorSource</code></li><li><strong>默认值</strong>: <code>'rgba(255, 68, 68, 0.2)'</code></li></ul><p>预警圈填充颜色。</p><h4 id="chargingstation-ring-strokewidth" tabindex="-1">chargingStation.ring.strokeWidth <a class="header-anchor" href="#chargingstation-ring-strokewidth" aria-label="Permalink to "chargingStation.ring.strokeWidth""></a></h4><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>1</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>预警圈描边宽度。</p><h4 id="chargingstation-ring-strokecolor" tabindex="-1">chargingStation.ring.strokeColor <a class="header-anchor" href="#chargingstation-ring-strokecolor" aria-label="Permalink to "chargingStation.ring.strokeColor""></a></h4><ul><li><strong>类型</strong>: <code>ColorSource</code></li><li><strong>默认值</strong>: <code>'#ffffff'</code></li></ul><p>预警圈描边颜色。</p><h4 id="chargingstation-ring-strokedashed" tabindex="-1">chargingStation.ring.strokeDashed <a class="header-anchor" href="#chargingstation-ring-strokedashed" aria-label="Permalink to "chargingStation.ring.strokeDashed""></a></h4><ul><li><strong>类型</strong>: <code>boolean</code></li><li><strong>默认值</strong>: <code>true</code></li></ul><p>预警圈描边是否为虚线。</p><h4 id="chargingstation-ring-strokedasharray" tabindex="-1">chargingStation.ring.strokeDashArray <a class="header-anchor" href="#chargingstation-ring-strokedasharray" aria-label="Permalink to "chargingStation.ring.strokeDashArray""></a></h4><ul><li><strong>类型</strong>: <code>[number, number]</code></li><li><strong>默认值</strong>: <code>[4, 4]</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>预警圈虚线样式 [实线长度, 间隙长度]。</p><h2 id="controls" tabindex="-1">controls <a class="header-anchor" href="#controls" aria-label="Permalink to "controls""></a></h2><p>控制元素配置,包括各种编辑工具的样式和行为设置。</p><h3 id="controls-iconwrapperwidth" tabindex="-1">controls.iconWrapperWidth <a class="header-anchor" href="#controls-iconwrapperwidth" aria-label="Permalink to "controls.iconWrapperWidth""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>24</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>操作按钮图标容器宽度</p><h3 id="controls-iconwrapperheight" tabindex="-1">controls.iconWrapperHeight <a class="header-anchor" href="#controls-iconwrapperheight" aria-label="Permalink to "controls.iconWrapperHeight""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>24</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>操作按钮图标容器高度</p><h3 id="controls-iconwrapperborderradius" tabindex="-1">controls.iconWrapperBorderRadius <a class="header-anchor" href="#controls-iconwrapperborderradius" aria-label="Permalink to "controls.iconWrapperBorderRadius""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>16</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>操作按钮图标容器边框圆角</p><h3 id="controls-iconwidth" tabindex="-1">controls.iconWidth <a class="header-anchor" href="#controls-iconwidth" aria-label="Permalink to "controls.iconWidth""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>12</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>操作按钮图标宽度</p><h3 id="controls-iconheight" tabindex="-1">controls.iconHeight <a class="header-anchor" href="#controls-iconheight" aria-label="Permalink to "controls.iconHeight""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>12</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>操作按钮图标高度</p><h3 id="controls-deleteiconsrc" tabindex="-1">controls.deleteIconSrc <a class="header-anchor" href="#controls-deleteiconsrc" aria-label="Permalink to "controls.deleteIconSrc""></a></h3><ul><li><strong>类型</strong>: <code>string</code></li><li><strong>默认值</strong>: <code>内置资源</code></li></ul><p>删除按钮图标资源路径</p><h3 id="controls-rotateiconsrc" tabindex="-1">controls.rotateIconSrc <a class="header-anchor" href="#controls-rotateiconsrc" aria-label="Permalink to "controls.rotateIconSrc""></a></h3><ul><li><strong>类型</strong>: <code>string</code></li><li><strong>默认值</strong>: <code>内置资源</code></li></ul><p>旋转按钮图标资源路径</p><h3 id="controls-scaleiconsrc" tabindex="-1">controls.scaleIconSrc <a class="header-anchor" href="#controls-scaleiconsrc" aria-label="Permalink to "controls.scaleIconSrc""></a></h3><ul><li><strong>类型</strong>: <code>string</code></li><li><strong>默认值</strong>: <code>内置资源</code></li></ul><p>缩放按钮图标资源路径</p><h3 id="controls-moveiconsrc" tabindex="-1">controls.moveIconSrc <a class="header-anchor" href="#controls-moveiconsrc" aria-label="Permalink to "controls.moveIconSrc""></a></h3><ul><li><strong>类型</strong>: <code>string</code></li><li><strong>默认值</strong>: <code>内置资源</code></li></ul><p>移动按钮图标资源路径</p><h3 id="controls-horizontalscaleiconsrc" tabindex="-1">controls.horizontalScaleIconSrc <a class="header-anchor" href="#controls-horizontalscaleiconsrc" aria-label="Permalink to "controls.horizontalScaleIconSrc""></a></h3><ul><li><strong>类型</strong>: <code>string</code></li><li><strong>默认值</strong>: <code>内置资源</code></li></ul><p>横向缩放按钮图标资源路径。</p><h3 id="controls-verticalscaleiconsrc" tabindex="-1">controls.verticalScaleIconSrc <a class="header-anchor" href="#controls-verticalscaleiconsrc" aria-label="Permalink to "controls.verticalScaleIconSrc""></a></h3><ul><li><strong>类型</strong>: <code>string</code></li><li><strong>默认值</strong>: <code>内置资源</code></li></ul><p>纵向缩放按钮图标资源路径。</p><h3 id="controls-movebuttonoffset" tabindex="-1">controls.moveButtonOffset <a class="header-anchor" href="#controls-movebuttonoffset" aria-label="Permalink to "controls.moveButtonOffset""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>30</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>移动按钮偏移距离</p><h3 id="controls-textfontsize" tabindex="-1">controls.textFontSize <a class="header-anchor" href="#controls-textfontsize" aria-label="Permalink to "controls.textFontSize""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>12</code></li><li><strong>单位</strong>: <code>px</code></li></ul><p>尺寸标签文本字体大小</p><h3 id="controls-textfontfamily" tabindex="-1">controls.textFontFamily <a class="header-anchor" href="#controls-textfontfamily" aria-label="Permalink to "controls.textFontFamily""></a></h3><ul><li><strong>类型</strong>: <code>string</code></li><li><strong>默认值</strong>: <code>'system-ui, -apple-system, sans-serif'</code></li></ul><p>尺寸标签文本字体名称</p><h3 id="controls-textfontweight" tabindex="-1">controls.textFontWeight <a class="header-anchor" href="#controls-textfontweight" aria-label="Permalink to "controls.textFontWeight""></a></h3><ul><li><strong>类型</strong>: <code>TextStyleFontWeight</code></li><li><strong>默认值</strong>: <code>'400'</code></li></ul><p>尺寸标签文本字体粗细</p><h3 id="controls-renderorder" tabindex="-1">controls.renderOrder <a class="header-anchor" href="#controls-renderorder" aria-label="Permalink to "controls.renderOrder""></a></h3><ul><li><strong>类型</strong>: <code>ControlRenderItem[]</code></li><li><strong>默认值</strong>: <code>['forbiddenSweepZone', 'forbiddenMopZone', 'cleanZone', 'virtualWall', 'spot', 'wayPoint', 'divider']</code></li></ul><p>控制层内元素渲染顺序配置,数组从下到上生效(后面的元素显示在更上层)。</p><p><strong>可选值:</strong></p><ul><li><code>'forbiddenSweepZone'</code></li><li><code>'forbiddenMopZone'</code></li><li><code>'cleanZone'</code></li><li><code>'virtualWall'</code></li><li><code>'spot'</code></li><li><code>'wayPoint'</code></li><li><code>'divider'</code></li></ul><p>配置说明:</p><ul><li>你可以通过调整数组顺序来控制不同控制元素的覆盖关系。</li><li>如果配置中缺少某些元素,SDK 会自动按默认顺序补齐。</li><li>如果配置中存在重复元素,SDK 仅保留首次出现的位置。</li><li>如果配置中包含未知值,SDK 会忽略该项并输出日志告警。</li></ul><p>示例:让禁扫区域显示在禁拖区域上方</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> app</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> new</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> MapApplication</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span></span>
|
|
211
215
|
<span class="line"></span>
|
|
212
216
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">app.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">initialize</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
|
|
213
217
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> config: {</span></span>
|
|
@@ -229,8 +233,8 @@
|
|
|
229
233
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> anchor: { x: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0.5</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, y: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">1.0</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }, </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// 所有检测物体都使用底部中心作为锚点</span></span>
|
|
230
234
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
|
|
231
235
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
|
|
232
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">})</span></span></code></pre></div><h2 id="snapshot" tabindex="-1">snapshot <a class="header-anchor" href="#snapshot" aria-label="Permalink to "snapshot""></a></h2><p>截图配置。</p><h3 id="snapshot-format" tabindex="-1">snapshot.format <a class="header-anchor" href="#snapshot-format" aria-label="Permalink to "snapshot.format""></a></h3><ul><li><strong>类型</strong>: <code>'png' | 'jpg' | 'webp'</code></li><li><strong>默认值</strong>: <code>'png'</code></li></ul><p>截图输出格式。</p><h3 id="snapshot-quality" tabindex="-1">snapshot.quality <a class="header-anchor" href="#snapshot-quality" aria-label="Permalink to "snapshot.quality""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>1</code></li></ul><p>截图质量 (0-1)。</p><h3 id="snapshot-antialias" tabindex="-1">snapshot.antialias <a class="header-anchor" href="#snapshot-antialias" aria-label="Permalink to "snapshot.antialias""></a></h3><ul><li><strong>类型</strong>: <code>boolean</code></li><li><strong>默认值</strong>: <code>true</code></li></ul><p>截图是否开启抗锯齿。</p><h3 id="snapshot-resolution" tabindex="-1">snapshot.resolution <a class="header-anchor" href="#snapshot-resolution" aria-label="Permalink to "snapshot.resolution""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>4</code></li></ul><p>截图分辨率倍数。</p></div></div></main><footer class="VPDocFooter" data-v-39a288b8 data-v-e257564d><!--[--><!--]--><div class="edit-info" data-v-e257564d><!----><div class="last-updated" data-v-e257564d><p class="VPLastUpdated" data-v-e257564d data-v-e98dd255>最后更新于: <time datetime="2026-03-
|
|
233
|
-
<script>window.__VP_HASH_MAP__=JSON.parse("{\"guide_advanced-usage.md\":\"COVLyRkA\",\"guide_concepts.md\":\"CJ87tk-r\",\"guide_getting-started.md\":\"
|
|
236
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">})</span></span></code></pre></div><h2 id="snapshot" tabindex="-1">snapshot <a class="header-anchor" href="#snapshot" aria-label="Permalink to "snapshot""></a></h2><p>截图配置。</p><h3 id="snapshot-format" tabindex="-1">snapshot.format <a class="header-anchor" href="#snapshot-format" aria-label="Permalink to "snapshot.format""></a></h3><ul><li><strong>类型</strong>: <code>'png' | 'jpg' | 'webp'</code></li><li><strong>默认值</strong>: <code>'png'</code></li></ul><p>截图输出格式。</p><h3 id="snapshot-quality" tabindex="-1">snapshot.quality <a class="header-anchor" href="#snapshot-quality" aria-label="Permalink to "snapshot.quality""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>1</code></li></ul><p>截图质量 (0-1)。</p><h3 id="snapshot-antialias" tabindex="-1">snapshot.antialias <a class="header-anchor" href="#snapshot-antialias" aria-label="Permalink to "snapshot.antialias""></a></h3><ul><li><strong>类型</strong>: <code>boolean</code></li><li><strong>默认值</strong>: <code>true</code></li></ul><p>截图是否开启抗锯齿。</p><h3 id="snapshot-resolution" tabindex="-1">snapshot.resolution <a class="header-anchor" href="#snapshot-resolution" aria-label="Permalink to "snapshot.resolution""></a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>4</code></li></ul><p>截图分辨率倍数。</p></div></div></main><footer class="VPDocFooter" data-v-39a288b8 data-v-e257564d><!--[--><!--]--><div class="edit-info" data-v-e257564d><!----><div class="last-updated" data-v-e257564d><p class="VPLastUpdated" data-v-e257564d data-v-e98dd255>最后更新于: <time datetime="2026-03-16T06:11:40.000Z" data-v-e98dd255></time></p></div></div><nav class="prev-next" aria-labelledby="doc-footer-aria-label" data-v-e257564d><span class="visually-hidden" id="doc-footer-aria-label" data-v-e257564d>Pager</span><div class="pager" data-v-e257564d><a class="VPLink link pager-link prev" href="/reference/data.html" data-v-e257564d><!--[--><span class="desc" data-v-e257564d>Previous page</span><span class="title" data-v-e257564d>数据</span><!--]--></a></div><div class="pager" data-v-e257564d><a class="VPLink link pager-link next" href="/reference/runtime.html" data-v-e257564d><!--[--><span class="desc" data-v-e257564d>Next page</span><span class="title" data-v-e257564d>运行时</span><!--]--></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><!----><!--[--><!--]--></div></div>
|
|
237
|
+
<script>window.__VP_HASH_MAP__=JSON.parse("{\"guide_advanced-usage.md\":\"COVLyRkA\",\"guide_concepts.md\":\"CJ87tk-r\",\"guide_getting-started.md\":\"_t5bADoD\",\"guide_mcp.md\":\"CabCiX8Z\",\"index.md\":\"wTsFvv0N\",\"plans_2026-03-04-detected-objects-visibility-design.md\":\"Dqboot5W\",\"plans_2026-03-04-show-detected-objects-implementation-plan.md\":\"CDWwQtWj\",\"plans_2026-03-10-simulator-debug-design.md\":\"BZibn7uw\",\"plans_2026-03-10-simulator-events-console-design.md\":\"BVmEzCbR\",\"plans_2026-03-10-simulator-events-console-implementation-plan.md\":\"S2f1zs9-\",\"plans_2026-03-10-simulator-runtime-controls-design.md\":\"mqeNaYgg\",\"plans_2026-03-10-simulator-runtime-controls-implementation-plan.md\":\"BXG1UWFt\",\"plans_2026-03-11-simulator-logger-dump-implementation-plan.md\":\"Ck5BGdoX\",\"records_bugs_2026-02-28-fix-pixi-bindgroup-webgpu-snapshot-whitescreen-bugfix.md\":\"BbQpA41Y\",\"records_bugs_2026-03-10-events-drawer-toolbar-scroll-bugfix.md\":\"DbHxPv4D\",\"records_bugs_2026-03-10-simulator-initial-render-layout-bugfix.md\":\"w7--2hvH\",\"records_bugs_2026-03-10-simulator-wheel-scroll-leak-bugfix.md\":\"B6gIem2P\",\"records_bugs_2026-03-11-docs-server-bin-clean-bugfix.md\":\"GGWCjkok\",\"records_bugs_2026-03-11-render-result-runtime-sync-bugfix.md\":\"DRNUuaFT\",\"records_plans_2026-03-02-furniture-feature-plan.md\":\"CqSsyNDo\",\"records_plans_2026-03-10-simulator-events-console-plan.md\":\"CfHLEHcc\",\"records_plans_2026-03-10-simulator-last-successful-combo-cache-plan.md\":\"Z2RoK239\",\"records_plans_2026-03-10-simulator-map-parsed-view-plan.md\":\"S9jPz75o\",\"records_plans_2026-03-10-simulator-map-playground-refactor-plan.md\":\"BuILlmcV\",\"records_plans_2026-03-10-simulator-playground-plan.md\":\"CQAR-T7p\",\"records_plans_2026-03-10-simulator-runtime-controls-plan.md\":\"DSVD-qCa\",\"records_plans_2026-03-11-docs-cli-ui-polish-plan.md\":\"B8oZt_5R\",\"records_plans_2026-03-11-simulator-logger-dump-plan.md\":\"CkjDCM2N\",\"records_plans_2026-03-11-simulator-src-migration-implementation.md\":\"FnB5Cx6R\",\"records_plans_2026-03-11-simulator-src-migration-plan.md\":\"BBfaeRrq\",\"records_plans_2026-03-11-simulator-style-tokenization-plan.md\":\"D4BgkNlO\",\"reference_callbacks.md\":\"BIwuGR3s\",\"reference_config.md\":\"C6eF1KzO\",\"reference_data.md\":\"B_XpUFrn\",\"reference_methods.md\":\"BvtVJ2dG\",\"reference_runtime.md\":\"80-Ieel4\",\"reference_types.md\":\"hikiO8Cq\",\"reference_utils.md\":\"Dy6XKVWh\",\"simulator_index.md\":\"CF95Y_c9\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"Tuya Robot Map\",\"description\":\"涂鸦扫地机地图组件\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"siteTitle\":\"Tuya Robot Map\",\"outline\":{\"level\":[2,6],\"label\":\"页面导航\"},\"nav\":[{\"text\":\"首页\",\"link\":\"/\"},{\"text\":\"指南\",\"link\":\"/guide/concepts\",\"activeMatch\":\"^/guide/\"},{\"text\":\"参考\",\"link\":\"/reference/data\",\"activeMatch\":\"^/reference/\"},{\"text\":\"模拟调试\",\"link\":\"/simulator/\",\"activeMatch\":\"^/simulator/\"}],\"sidebar\":{\"/guide/\":[{\"text\":\"指南\",\"items\":[{\"text\":\"基本概念\",\"link\":\"/guide/concepts\"},{\"text\":\"快速开始\",\"link\":\"/guide/getting-started\"},{\"text\":\"进阶使用\",\"link\":\"/guide/advanced-usage\"}]}],\"/reference/\":[{\"text\":\"组件Props\",\"items\":[{\"text\":\"数据\",\"link\":\"/reference/data\"},{\"text\":\"配置\",\"link\":\"/reference/config\"},{\"text\":\"运行时\",\"link\":\"/reference/runtime\"},{\"text\":\"地图事件回调\",\"link\":\"/reference/callbacks\"}]},{\"text\":\"方法\",\"items\":[{\"text\":\"地图方法\",\"link\":\"/reference/methods\"},{\"text\":\"工具方法\",\"link\":\"/reference/utils\"}]},{\"text\":\"类型定义\",\"items\":[{\"text\":\"类型定义\",\"link\":\"/reference/types\"}]}],\"/simulator/\":[{\"text\":\"模拟调试\",\"items\":[{\"text\":\"实时模拟调试\",\"link\":\"/simulator/\"}]}]},\"search\":{\"provider\":\"local\"},\"lastUpdated\":{\"text\":\"最后更新于\",\"formatOptions\":{\"dateStyle\":\"short\",\"timeStyle\":\"short\"}}},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
|
|
234
238
|
|
|
235
239
|
</body>
|
|
236
240
|
</html>
|