@ray-js/robot-map-sdk 0.0.15-beta.9 → 0.0.16-beta.1

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.
Files changed (70) hide show
  1. package/bin/mcp-server.js +29 -29
  2. package/dist/constant/methods.js +1 -1
  3. package/dist/index.d.ts +57 -4
  4. package/dist/index.rjs.js +1 -1
  5. package/dist-app/assets/index--x4zgRq9.js +1 -0
  6. package/dist-app/index.html +1 -2
  7. package/dist-docs/404.html +2 -2
  8. package/dist-docs/agents/domain.html +3 -3
  9. package/dist-docs/agents/issue-tracker.html +3 -3
  10. package/dist-docs/agents/triage-labels.html +5 -5
  11. package/dist-docs/assets/agents_triage-labels.md.Cmw0b5xB.js +1 -0
  12. package/dist-docs/assets/{agents_triage-labels.md.BqHb16T-.lean.js → agents_triage-labels.md.Cmw0b5xB.lean.js} +1 -1
  13. package/dist-docs/assets/{app.Bq9VgHDr.js → app.NIVI4Air.js} +1 -1
  14. package/dist-docs/assets/chunks/@localSearchIndexroot.CF6qpqRY.js +1 -0
  15. package/dist-docs/assets/chunks/{BitmapFont.gpsydROl.js → BitmapFont.B813wC36.js} +1 -1
  16. package/dist-docs/assets/chunks/{BufferResource.T6Cz6g-w.js → BufferResource.Dp_hmOm8.js} +1 -1
  17. package/dist-docs/assets/chunks/{CanvasRenderer.IdOUfdnP.js → CanvasRenderer.XH0JoDos.js} +1 -1
  18. package/dist-docs/assets/chunks/{RenderTargetSystem.D3fIMotr.js → RenderTargetSystem.CpVOSGiV.js} +1 -1
  19. package/dist-docs/assets/chunks/{VPLocalSearchBox.DFGCpIRc.js → VPLocalSearchBox.ObYTFACu.js} +1 -1
  20. package/dist-docs/assets/chunks/{WebGLRenderer.Co7oet6q.js → WebGLRenderer.CDU-D4m8.js} +1 -1
  21. package/dist-docs/assets/chunks/{WebGPURenderer.wb8rIKnB.js → WebGPURenderer.BlH4IW2i.js} +1 -1
  22. package/dist-docs/assets/chunks/{browserAll.Dff4Vb8P.js → browserAll.CHWWuYWB.js} +1 -1
  23. package/dist-docs/assets/chunks/index.BYdnGBxg.js +744 -0
  24. package/dist-docs/assets/chunks/theme.B6W0Ut3f.js +4 -0
  25. package/dist-docs/assets/chunks/{webworkerAll.oMn27HhV.js → webworkerAll.B_FFwhws.js} +1 -1
  26. package/dist-docs/assets/{guide_advanced-usage.md.DNWCmYfB.js → guide_advanced-usage.md.B1LO3kNP.js} +34 -3
  27. package/dist-docs/assets/{guide_advanced-usage.md.DNWCmYfB.lean.js → guide_advanced-usage.md.B1LO3kNP.lean.js} +1 -1
  28. package/dist-docs/assets/{guide_getting-started.md.B_JyRwPU.js → guide_getting-started.md.Cl25b--q.js} +2 -2
  29. package/dist-docs/assets/guide_getting-started.md.Cl25b--q.lean.js +1 -0
  30. package/dist-docs/assets/reference_callbacks.md.4Y7lqLLW.js +33 -0
  31. package/dist-docs/assets/reference_callbacks.md.4Y7lqLLW.lean.js +1 -0
  32. package/dist-docs/assets/{reference_config.md.DJr6BhNY.js → reference_config.md.B45KsJB6.js} +3 -3
  33. package/dist-docs/assets/{reference_config.md.DJr6BhNY.lean.js → reference_config.md.B45KsJB6.lean.js} +1 -1
  34. package/dist-docs/assets/{reference_data.md.BjBUZrZo.js → reference_data.md.C3E1VcWx.js} +16 -1
  35. package/dist-docs/assets/{reference_data.md.BjBUZrZo.lean.js → reference_data.md.C3E1VcWx.lean.js} +1 -1
  36. package/dist-docs/assets/{reference_types.md.BDKGwrGI.js → reference_types.md.Btpi6Kd9.js} +37 -3
  37. package/dist-docs/assets/reference_types.md.Btpi6Kd9.lean.js +1 -0
  38. package/dist-docs/guide/advanced-usage.html +37 -6
  39. package/dist-docs/guide/concepts.html +3 -3
  40. package/dist-docs/guide/getting-started.html +5 -5
  41. package/dist-docs/guide/mcp.html +3 -3
  42. package/dist-docs/hashmap.json +1 -1
  43. package/dist-docs/index.html +3 -3
  44. package/dist-docs/plans/2026-03-04-detected-objects-visibility-design.html +3 -3
  45. package/dist-docs/plans/2026-03-04-show-detected-objects-implementation-plan.html +3 -3
  46. package/dist-docs/plans/2026-03-10-simulator-debug-design.html +3 -3
  47. package/dist-docs/plans/2026-03-10-simulator-events-console-design.html +3 -3
  48. package/dist-docs/plans/2026-03-10-simulator-events-console-implementation-plan.html +3 -3
  49. package/dist-docs/plans/2026-03-10-simulator-runtime-controls-design.html +3 -3
  50. package/dist-docs/plans/2026-03-10-simulator-runtime-controls-implementation-plan.html +3 -3
  51. package/dist-docs/plans/2026-03-10-testing-rollout-next-steps-plan.html +3 -3
  52. package/dist-docs/plans/2026-03-11-simulator-logger-dump-implementation-plan.html +3 -3
  53. package/dist-docs/reference/callbacks.html +5 -5
  54. package/dist-docs/reference/config.html +6 -6
  55. package/dist-docs/reference/data.html +20 -5
  56. package/dist-docs/reference/methods.html +3 -3
  57. package/dist-docs/reference/runtime.html +3 -3
  58. package/dist-docs/reference/types.html +40 -6
  59. package/dist-docs/reference/utils.html +3 -3
  60. package/dist-docs/simulator/index.html +3 -3
  61. package/package.json +2 -1
  62. package/dist-app/assets/index-ctYqCQ1f.js +0 -1
  63. package/dist-docs/assets/agents_triage-labels.md.BqHb16T-.js +0 -1
  64. package/dist-docs/assets/chunks/@localSearchIndexroot.DIdh9pnG.js +0 -1
  65. package/dist-docs/assets/chunks/index.CKdv9PR-.js +0 -744
  66. package/dist-docs/assets/chunks/theme.BiVQsQs4.js +0 -4
  67. package/dist-docs/assets/guide_getting-started.md.B_JyRwPU.lean.js +0 -1
  68. package/dist-docs/assets/reference_callbacks.md.FoJwSjMy.js +0 -33
  69. package/dist-docs/assets/reference_callbacks.md.FoJwSjMy.lean.js +0 -1
  70. package/dist-docs/assets/reference_types.md.BDKGwrGI.lean.js +0 -1
@@ -1,4 +1,4 @@
1
- import{_ as e,c as i,o as a,aq as t}from"./chunks/framework.CBLqO2Q1.js";const g=JSON.parse('{"title":"配置","description":"","frontmatter":{},"headers":[],"relativePath":"reference/config.md","filePath":"reference/config.md","lastUpdated":1780021074000}'),s={name:"reference/config.md"};function l(n,o,r,c,d,h){return a(),i("div",null,[...o[0]||(o[0]=[t(`<h1 id="配置" tabindex="-1">配置 <a class="header-anchor" href="#配置" aria-label="Permalink to &quot;配置&quot;">​</a></h1><p>了解 RobotMap 的配置选项,用于定制地图的视觉样式、素材资源、交互行为等。</p><div class="tip custom-block"><p class="custom-block-title">响应式配置</p><p>配置是<strong>响应式</strong>的,当你修改传入的 <code>config</code> prop 时,地图会自动更新视觉效果,无需重新初始化。这使得主题切换、颜色调整等功能的实现变得简单直接。</p></div><div class="tip custom-block"><p class="custom-block-title">TIP</p><ul><li>本文档部分配置项的单位与<strong>米</strong>相关,该配置的值会根据地图数据里的分辨率转换为像素单位。</li></ul></div><h2 id="使用示例" tabindex="-1">使用示例 <a class="header-anchor" href="#使用示例" aria-label="Permalink to &quot;使用示例&quot;">​</a></h2><h3 id="基础配置" tabindex="-1">基础配置 <a class="header-anchor" href="#基础配置" aria-label="Permalink to &quot;基础配置&quot;">​</a></h3><p>配置通过 <code>config</code> 传递,所有配置项都是可选的,你可以只覆盖需要修改的部分。</p><div class="language-tsx vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">tsx</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;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> React </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;react&#39;</span></span>
1
+ import{_ as e,c as i,o as a,aq as t}from"./chunks/framework.CBLqO2Q1.js";const g=JSON.parse('{"title":"配置","description":"","frontmatter":{},"headers":[],"relativePath":"reference/config.md","filePath":"reference/config.md","lastUpdated":1780467652000}'),s={name:"reference/config.md"};function l(n,o,r,c,d,h){return a(),i("div",null,[...o[0]||(o[0]=[t(`<h1 id="配置" tabindex="-1">配置 <a class="header-anchor" href="#配置" aria-label="Permalink to &quot;配置&quot;">​</a></h1><p>了解 RobotMap 的配置选项,用于定制地图的视觉样式、素材资源、交互行为等。</p><div class="tip custom-block"><p class="custom-block-title">响应式配置</p><p>配置是<strong>响应式</strong>的,当你修改传入的 <code>config</code> prop 时,地图会自动更新视觉效果,无需重新初始化。这使得主题切换、颜色调整等功能的实现变得简单直接。</p></div><div class="tip custom-block"><p class="custom-block-title">TIP</p><ul><li>本文档部分配置项的单位与<strong>米</strong>相关,该配置的值会根据地图数据里的分辨率转换为像素单位。</li></ul></div><h2 id="使用示例" tabindex="-1">使用示例 <a class="header-anchor" href="#使用示例" aria-label="Permalink to &quot;使用示例&quot;">​</a></h2><h3 id="基础配置" tabindex="-1">基础配置 <a class="header-anchor" href="#基础配置" aria-label="Permalink to &quot;基础配置&quot;">​</a></h3><p>配置通过 <code>config</code> 传递,所有配置项都是可选的,你可以只覆盖需要修改的部分。</p><div class="language-tsx vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">tsx</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;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> React </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;react&#39;</span></span>
2
2
  <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { RobotMap } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;@ray-js/robot-map&#39;</span></span>
3
3
  <span class="line"></span>
4
4
  <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> MapPage</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">() {</span></span>
@@ -166,7 +166,7 @@ import{_ as e,c as i,o as a,aq as t}from"./chunks/framework.CBLqO2Q1.js";const g
166
166
  <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>
167
167
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
168
168
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
169
- <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 &quot;global.backgroundAlpha&quot;">​</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>&#39;rgba(255, 255, 255, 0.5)&#39;</code>)来控制透明度。</p></div><h3 id="global-performancemode" tabindex="-1">global.performanceMode <a class="header-anchor" href="#global-performancemode" aria-label="Permalink to &quot;global.performanceMode&quot;">​</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 &quot;global.resolution&quot;">​</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 &quot;global.enableLogger&quot;">​</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><p>对于新接入,优先使用 <code>logger.enabled</code>。<code>global.enableLogger</code> 仅作为控制控制台日志的兼容兜底,不再负责 App 日志转发。</p></div><h3 id="global-rendererpreference" tabindex="-1">global.rendererPreference <a class="header-anchor" href="#global-rendererpreference" aria-label="Permalink to &quot;global.rendererPreference&quot;">​</a></h3><ul><li><strong>类型</strong>: <code>&#39;webgpu&#39; | &#39;webgl&#39;</code></li><li><strong>默认值</strong>: <code>&#39;webgl&#39;</code></li></ul><p>渲染器偏好,设置 PIXI.js 优先使用的渲染后端。</p><p>默认值使用 <code>webgl</code>,优先选择更稳定、兼容性更高的渲染路径。如果你需要验证 <code>webgpu</code> 的表现,可以显式传入 <code>global.rendererPreference: &#39;webgpu&#39;</code>。SDK 在 初始化阶段遇到 <code>webgpu</code> 启动失败时,会自动回退到 <code>webgl</code>,并输出对应告警。</p><h2 id="logger" tabindex="-1">logger <a class="header-anchor" href="#logger" aria-label="Permalink to &quot;logger&quot;">​</a></h2><p><code>logger</code> 配置用于控制 SDK 的控制台日志和可选的宿主日志转发。这一组配置不会强依赖任何业务日志库;只有当宿主层实现了 <code>onLogger</code> 回调时,日志才会被转发到 App 层。</p><h3 id="logger-enabled" tabindex="-1">logger.enabled <a class="header-anchor" href="#logger-enabled" aria-label="Permalink to &quot;logger.enabled&quot;">​</a></h3><p><code>logger.enabled</code> 控制 SDK 在 webview 控制台中的日志输出。</p><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>false</code> 时,控制台日志关闭。这个字段优先级高于 <code>global.enableLogger</code>。</p><h3 id="logger-hostsinkenabled" tabindex="-1">logger.hostSinkEnabled <a class="header-anchor" href="#logger-hostsinkenabled" aria-label="Permalink to &quot;logger.hostSinkEnabled&quot;">​</a></h3><p><code>logger.hostSinkEnabled</code> 控制是否尝试把结构化日志转发给宿主层。</p><ul><li><strong>类型</strong>: <code>boolean</code></li><li><strong>默认值</strong>: <code>false</code></li></ul><p>当设置为 <code>true</code> 时,SDK 会在满足 <code>hostLevels</code> 过滤条件后,把日志 payload 转发给宿主层的 <code>onLogger</code> 回调。如果宿主层没有实现 <code>onLogger</code>,SDK 会静默跳过,不会报错。</p><h3 id="logger-hostlevels" tabindex="-1">logger.hostLevels <a class="header-anchor" href="#logger-hostlevels" aria-label="Permalink to &quot;logger.hostLevels&quot;">​</a></h3><p><code>logger.hostLevels</code> 控制哪些日志级别会被转发到宿主层。</p><ul><li><strong>类型</strong>: <code>Array&lt;&#39;warn&#39; | &#39;error&#39; | &#39;info&#39; | &#39;debug&#39;&gt;</code></li><li><strong>默认值</strong>: <code>[&#39;warn&#39;, &#39;error&#39;]</code></li></ul><p>默认只转发 <code>warn</code> 和 <code>error</code>。如果你需要在诊断阶段同时采集 <code>info</code> 或 <code>debug</code>,可以显式把这些级别加入数组中。</p><p>渲染链路的额外诊断日志,例如 renderer 初始化信息、地图清空告警,以及 WebGL context 丢失或恢复事件,会使用 <code>debug</code>、<code>warn</code> 或 <code>error</code> 级别输出。 如果你要排查“地图突然消失但没有恢复”这类问题,建议在临时诊断窗口里把 <code>debug</code> 加入 <code>hostLevels</code>。</p><h3 id="logger-tag" tabindex="-1">logger.tag <a class="header-anchor" href="#logger-tag" aria-label="Permalink to &quot;logger.tag&quot;">​</a></h3><p><code>logger.tag</code> 用于标识日志来源,方便宿主层在 App 日志里检索和过滤。</p><ul><li><strong>类型</strong>: <code>string</code></li><li><strong>默认值</strong>: <code>&#39;ray-robot-map-sdk&#39;</code></li></ul><p>业务侧可以直接使用这个字段作为日志前缀,也可以组合自己的 App tag 一起输出。</p><h2 id="interaction" tabindex="-1">interaction <a class="header-anchor" href="#interaction" aria-label="Permalink to &quot;interaction&quot;">​</a></h2><p>交互配置,控制地图的缩放和手势操作。</p><h3 id="interaction-zoomrange" tabindex="-1">interaction.zoomRange <a class="header-anchor" href="#interaction-zoomrange" aria-label="Permalink to &quot;interaction.zoomRange&quot;">​</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 &quot;interaction.zoomRange.min&quot;">​</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 &quot;interaction.zoomRange.max&quot;">​</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 &quot;interaction.fitMinScale&quot;">​</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 &quot;interaction.fitMaxScale&quot;">​</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 &quot;interaction.enable&quot;">​</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 &quot;interaction.enableDoubleTapZoom&quot;">​</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 &quot;interaction.enableRobotClick&quot;">​</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 &quot;interaction.enableChargingStationClick&quot;">​</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 &quot;map&quot;">​</a></h2><p>地图配置。</p><h3 id="map-autopaddinghorizontalpercent" tabindex="-1">map.autoPaddingHorizontalPercent <a class="header-anchor" href="#map-autopaddinghorizontalpercent" aria-label="Permalink to &quot;map.autoPaddingHorizontalPercent&quot;">​</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 &quot;map.autoPaddingVerticalPercent&quot;">​</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 &quot;map.obstacleColor&quot;">​</a></h3><ul><li><strong>类型</strong>: <code>ColorSource</code></li><li><strong>默认值</strong>: <code>&#39;#999999&#39;</code></li></ul><p>障碍点显示颜色。</p><h3 id="map-freecolor" tabindex="-1">map.freeColor <a class="header-anchor" href="#map-freecolor" aria-label="Permalink to &quot;map.freeColor&quot;">​</a></h3><ul><li><strong>类型</strong>: <code>ColorSource</code></li><li><strong>默认值</strong>: <code>&#39;#ebebeb&#39;</code></li></ul><p>自由区域点显示颜色。(仅结构化地图可用)</p><h3 id="map-autofitoffset" tabindex="-1">map.autoFitOffset <a class="header-anchor" href="#map-autofitoffset" aria-label="Permalink to &quot;map.autoFitOffset&quot;">​</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 &quot;map.adjacencyThreshold&quot;">​</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 &quot;map.originChangeAutoFitThreshold&quot;">​</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 &quot;map.sizeChangeAutoFitThreshold&quot;">​</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 &quot;heatmap&quot;">​</a></h2><p>热力图配置,控制信号强度热力图的渲染效果。</p><h3 id="heatmap-cellsize" tabindex="-1">heatmap.cellSize <a class="header-anchor" href="#heatmap-cellsize" aria-label="Permalink to &quot;heatmap.cellSize&quot;">​</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 &quot;heatmap.maxDistance&quot;">​</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 &quot;heatmap.smoothIterations&quot;">​</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 &quot;heatmap.heatmapAlpha&quot;">​</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 &quot;heatmap.useGradient&quot;">​</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 &quot;heatmap.colorGradients&quot;">​</a></h3><ul><li><strong>类型</strong>: <code>[ColorSource, ColorSource, ColorSource, ColorSource, ColorSource, ColorSource, ColorSource, ColorSource]</code></li><li><strong>默认值</strong>: <code>[&#39;#FF3B30&#39;, &#39;#FF7A00&#39;, &#39;#FFA100&#39;, &#39;#FFD700&#39;, &#39;#99DD70&#39;, &#39;#2EC070&#39;, &#39;#40E0D0&#39;, &#39;#88D0E9&#39;]</code></li></ul><p>热力图颜色渐变配置,从高强度到低强度。</p><h2 id="room" tabindex="-1">room <a class="header-anchor" href="#room" aria-label="Permalink to &quot;room&quot;">​</a></h2><p>房间配置,控制房间的颜色、名称、属性显示等。</p><h3 id="room-colors" tabindex="-1">room.colors <a class="header-anchor" href="#room-colors" aria-label="Permalink to &quot;room.colors&quot;">​</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 &quot;room.colors.sortBy&quot;">​</a></h3><ul><li><strong>类型</strong>: <code>&#39;index&#39; | &#39;area&#39;</code></li><li><strong>默认值</strong>: <code>&#39;index&#39;</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 &quot;room.colors.strategy&quot;">​</a></h3><ul><li><strong>类型</strong>: <code>&#39;priority&#39; | &#39;balanced&#39;</code></li><li><strong>默认值</strong>: <code>&#39;priority&#39;</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 &quot;room.colors.active&quot;">​</a></h4><ul><li><strong>类型</strong>: <code>string[]</code></li><li><strong>默认值</strong>: <code>[&#39;#a8c8f5&#39;, &#39;#9de5c7&#39;, &#39;#d4b9f7&#39;, &#39;#ffd399&#39;]</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 &quot;room.colors.inactive&quot;">​</a></h4><ul><li><strong>类型</strong>: <code>string[]</code></li><li><strong>默认值</strong>: <code>[&#39;#d6e7fc&#39;, &#39;#d1f4e5&#39;, &#39;#ece0fb&#39;, &#39;#fff0d9&#39;]</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 &quot;room.colors.normal&quot;">​</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 &quot;room.colors.name&quot;">​</a></h4><ul><li><strong>类型</strong>: <code>string[]</code></li><li><strong>默认值</strong>: <code>[&#39;#2563b8&#39;, &#39;#26966b&#39;, &#39;#7c3fb8&#39;, &#39;#d97706&#39;]</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 &quot;room.colors.nameInactive&quot;">​</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 &quot;room.colors.nameNormal&quot;">​</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 &quot;room.colors.propertyTheme&quot;">​</a></h4><ul><li><strong>类型</strong>: <code>string[]</code></li><li><strong>默认值</strong>: <code>[&#39;#2563b8&#39;, &#39;#26966b&#39;, &#39;#7c3fb8&#39;, &#39;#d97706&#39;]</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 &quot;room.colors.propertyThemeInactive&quot;">​</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 &quot;room.colors.propertyThemeNormal&quot;">​</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 &quot;room.colors.selectionIndicatorBackground&quot;">​</a></h4><ul><li><strong>类型</strong>: <code>string[]</code></li><li><strong>默认值</strong>: <code>[&#39;#2563b8&#39;, &#39;#26966b&#39;, &#39;#7c3fb8&#39;, &#39;#d97706&#39;]</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 &quot;room.colors.selectionIndicatorIcon&quot;">​</a></h4><ul><li><strong>类型</strong>: <code>string[]</code></li><li><strong>默认值</strong>: <code>[&#39;#ffffff&#39;, &#39;#ffffff&#39;, &#39;#ffffff&#39;, &#39;#ffffff&#39;]</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 &quot;room.colors.NO_ROOM_DATA&quot;">​</a></h4><ul><li><strong>类型</strong>: <code>string</code></li><li><strong>默认值</strong>: <code>&#39;#ebebeb&#39;</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 &quot;room.colors.ROOM_GAP&quot;">​</a></h4><ul><li><strong>类型</strong>: <code>string</code></li><li><strong>默认值</strong>: <code>&#39;#ebebeb&#39;</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 &quot;room.colors.OBSTACLE_ROOM&quot;">​</a></h4><ul><li><strong>类型</strong>: <code>string</code></li><li><strong>默认值</strong>: <code>&#39;#ebebeb&#39;</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 &quot;room.colors.UNKNOWN_ROOM&quot;">​</a></h4><ul><li><strong>类型</strong>: <code>string</code></li><li><strong>默认值</strong>: <code>&#39;#ebebeb&#39;</code></li></ul><p>未知房间的颜色。对于结构化协议代表 <code>roomId &gt;= 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 &quot;room.colors.VERSION0_ROOM&quot;">​</a></h4><ul><li><strong>类型</strong>: <code>string</code></li><li><strong>默认值</strong>: <code>&#39;&#39;</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 &quot;room.nameLabel&quot;">​</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 &quot;room.nameLabel.fontSize&quot;">​</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 &quot;room.nameLabel.fontFamily&quot;">​</a></h4><ul><li><strong>类型</strong>: <code>string</code></li><li><strong>默认值</strong>: <code>&#39;system-ui, -apple-system, sans-serif&#39;</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 &quot;room.nameLabel.fontWeight&quot;">​</a></h4><ul><li><strong>类型</strong>: <code>TextStyleFontWeight</code></li><li><strong>默认值</strong>: <code>&#39;500&#39;</code></li></ul><p>房间名称字体粗细。</p><h3 id="room-type" tabindex="-1">room.type <a class="header-anchor" href="#room-type" aria-label="Permalink to &quot;room.type&quot;">​</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 &quot;room.type.assets&quot;">​</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>&#39;&#39;</code>),则该类型的房间将不会显示任何图标。例如,通过设置 <code>assets[0] = &#39;&#39;</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 &quot;room.type.iconSize&quot;">​</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 &quot;room.type.gap&quot;">​</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 &quot;room.type.position&quot;">​</a></h4><ul><li><strong>类型</strong>: <code>&#39;left&#39; | &#39;right&#39;</code></li><li><strong>默认值</strong>: <code>&#39;left&#39;</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 &quot;room.type.container&quot;">​</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 &quot;room.type.container.visible&quot;">​</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 &quot;room.type.container.size&quot;">​</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 &quot;room.type.container.borderRadius&quot;">​</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 &quot;room.property&quot;">​</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 &quot;room.property.displayOrders&quot;">​</a></h4><ul><li><strong>类型</strong>: <code>(&#39;cleanMode&#39; | &#39;suction&#39; | &#39;cistern&#39; | &#39;cleanTimes&#39; | string)[]</code></li><li><strong>默认值</strong>: <code>[&#39;cleanMode&#39;, &#39;suction&#39;, &#39;cistern&#39;, &#39;cleanTimes&#39;]</code></li></ul><p>房间属性显示顺序。</p><p>你也可以传入自定义的字段名,比如 <code>[&#39;cleanMode&#39;, &#39;suction&#39;, &#39;cistern&#39;, &#39;cleanTimes&#39;, &#39;customProperty1&#39;]</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 &quot;room.property.customAssets&quot;">​</a></h4><ul><li><strong>类型</strong>: <code>Record&lt;string, string[]&gt;</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>
169
+ <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 &quot;global.backgroundAlpha&quot;">​</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>&#39;rgba(255, 255, 255, 0.5)&#39;</code>)来控制透明度。</p></div><h3 id="global-performancemode" tabindex="-1">global.performanceMode <a class="header-anchor" href="#global-performancemode" aria-label="Permalink to &quot;global.performanceMode&quot;">​</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 &quot;global.resolution&quot;">​</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 &quot;global.enableLogger&quot;">​</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><p>对于新接入,优先使用 <code>logger.enabled</code>。<code>global.enableLogger</code> 仅作为控制控制台日志的兼容兜底,不再负责 App 日志转发。</p></div><h3 id="global-rendererpreference" tabindex="-1">global.rendererPreference <a class="header-anchor" href="#global-rendererpreference" aria-label="Permalink to &quot;global.rendererPreference&quot;">​</a></h3><ul><li><strong>类型</strong>: <code>&#39;webgpu&#39; | &#39;webgl&#39;</code></li><li><strong>默认值</strong>: <code>&#39;webgl&#39;</code></li></ul><p>渲染器偏好,设置 PIXI.js 优先使用的渲染后端。</p><p>默认值使用 <code>webgl</code>,优先选择更稳定、兼容性更高的渲染路径。如果你需要验证 <code>webgpu</code> 的表现,可以显式传入 <code>global.rendererPreference: &#39;webgpu&#39;</code>。SDK 在 初始化阶段遇到 <code>webgpu</code> 启动失败时,会自动回退到 <code>webgl</code>,并输出对应告警。</p><h2 id="logger" tabindex="-1">logger <a class="header-anchor" href="#logger" aria-label="Permalink to &quot;logger&quot;">​</a></h2><p><code>logger</code> 配置用于控制 SDK 的控制台日志和 App 原生日志写入。控制台日志输出在 webview 内生效;App 日志由组件库在宿主环境中完成落地。</p><h3 id="logger-enabled" tabindex="-1">logger.enabled <a class="header-anchor" href="#logger-enabled" aria-label="Permalink to &quot;logger.enabled&quot;">​</a></h3><p><code>logger.enabled</code> 控制 SDK 在 webview 控制台中的日志输出。</p><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>false</code> 时,控制台日志关闭。这个字段优先级高于 <code>global.enableLogger</code>。</p><h3 id="logger-applogenabled" tabindex="-1">logger.appLogEnabled <a class="header-anchor" href="#logger-applogenabled" aria-label="Permalink to &quot;logger.appLogEnabled&quot;">​</a></h3><p><code>logger.appLogEnabled</code> 控制是否把 SDK 结构化日志写入宿主 App 日志。</p><ul><li><strong>类型</strong>: <code>boolean</code></li><li><strong>默认值</strong>: <code>true</code></li></ul><p>当设置为 <code>true</code> 时,组件库会在宿主环境内把命中的日志写入 App 日志;当设置为 <code>false</code> 时,仅保留 webview 控制台日志。</p><h3 id="logger-apploglevels" tabindex="-1">logger.appLogLevels <a class="header-anchor" href="#logger-apploglevels" aria-label="Permalink to &quot;logger.appLogLevels&quot;">​</a></h3><p><code>logger.appLogLevels</code> 控制哪些日志级别会写入宿主 App 日志。</p><ul><li><strong>类型</strong>: <code>Array&lt;&#39;warn&#39; | &#39;error&#39; | &#39;info&#39; | &#39;debug&#39;&gt;</code></li><li><strong>默认值</strong>: <code>[&#39;debug&#39;, &#39;warn&#39;, &#39;error&#39;]</code></li></ul><p>默认会写入 <code>debug</code>、<code>warn</code> 和 <code>error</code>。如果你需要临时扩大采集范围,可以显式加入 <code>info</code>。</p><h3 id="logger-tag" tabindex="-1">logger.tag <a class="header-anchor" href="#logger-tag" aria-label="Permalink to &quot;logger.tag&quot;">​</a></h3><p><code>logger.tag</code> 用于标识日志来源,方便在 App 日志里检索和过滤。</p><ul><li><strong>类型</strong>: <code>string</code></li><li><strong>默认值</strong>: <code>&#39;ray-robot-map-sdk&#39;</code></li></ul><p>组件库会把这个字段作为 SDK 日志来源标识写入 App 日志消息体中。</p><h2 id="interaction" tabindex="-1">interaction <a class="header-anchor" href="#interaction" aria-label="Permalink to &quot;interaction&quot;">​</a></h2><p>交互配置,控制地图的缩放和手势操作。</p><h3 id="interaction-zoomrange" tabindex="-1">interaction.zoomRange <a class="header-anchor" href="#interaction-zoomrange" aria-label="Permalink to &quot;interaction.zoomRange&quot;">​</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 &quot;interaction.zoomRange.min&quot;">​</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 &quot;interaction.zoomRange.max&quot;">​</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 &quot;interaction.fitMinScale&quot;">​</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 &quot;interaction.fitMaxScale&quot;">​</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 &quot;interaction.enable&quot;">​</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 &quot;interaction.enableDoubleTapZoom&quot;">​</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 &quot;interaction.enableRobotClick&quot;">​</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 &quot;interaction.enableChargingStationClick&quot;">​</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 &quot;map&quot;">​</a></h2><p>地图配置。</p><h3 id="map-autopaddinghorizontalpercent" tabindex="-1">map.autoPaddingHorizontalPercent <a class="header-anchor" href="#map-autopaddinghorizontalpercent" aria-label="Permalink to &quot;map.autoPaddingHorizontalPercent&quot;">​</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 &quot;map.autoPaddingVerticalPercent&quot;">​</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 &quot;map.obstacleColor&quot;">​</a></h3><ul><li><strong>类型</strong>: <code>ColorSource</code></li><li><strong>默认值</strong>: <code>&#39;#999999&#39;</code></li></ul><p>障碍点显示颜色。</p><h3 id="map-freecolor" tabindex="-1">map.freeColor <a class="header-anchor" href="#map-freecolor" aria-label="Permalink to &quot;map.freeColor&quot;">​</a></h3><ul><li><strong>类型</strong>: <code>ColorSource</code></li><li><strong>默认值</strong>: <code>&#39;#ebebeb&#39;</code></li></ul><p>自由区域点显示颜色。(仅结构化地图可用)</p><h3 id="map-autofitoffset" tabindex="-1">map.autoFitOffset <a class="header-anchor" href="#map-autofitoffset" aria-label="Permalink to &quot;map.autoFitOffset&quot;">​</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 &quot;map.adjacencyThreshold&quot;">​</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 &quot;map.originChangeAutoFitThreshold&quot;">​</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 &quot;map.sizeChangeAutoFitThreshold&quot;">​</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 &quot;heatmap&quot;">​</a></h2><p>热力图配置,控制信号强度热力图的渲染效果。</p><h3 id="heatmap-cellsize" tabindex="-1">heatmap.cellSize <a class="header-anchor" href="#heatmap-cellsize" aria-label="Permalink to &quot;heatmap.cellSize&quot;">​</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 &quot;heatmap.maxDistance&quot;">​</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 &quot;heatmap.smoothIterations&quot;">​</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 &quot;heatmap.heatmapAlpha&quot;">​</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 &quot;heatmap.useGradient&quot;">​</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 &quot;heatmap.colorGradients&quot;">​</a></h3><ul><li><strong>类型</strong>: <code>[ColorSource, ColorSource, ColorSource, ColorSource, ColorSource, ColorSource, ColorSource, ColorSource]</code></li><li><strong>默认值</strong>: <code>[&#39;#FF3B30&#39;, &#39;#FF7A00&#39;, &#39;#FFA100&#39;, &#39;#FFD700&#39;, &#39;#99DD70&#39;, &#39;#2EC070&#39;, &#39;#40E0D0&#39;, &#39;#88D0E9&#39;]</code></li></ul><p>热力图颜色渐变配置,从高强度到低强度。</p><h2 id="room" tabindex="-1">room <a class="header-anchor" href="#room" aria-label="Permalink to &quot;room&quot;">​</a></h2><p>房间配置,控制房间的颜色、名称、属性显示等。</p><h3 id="room-colors" tabindex="-1">room.colors <a class="header-anchor" href="#room-colors" aria-label="Permalink to &quot;room.colors&quot;">​</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 &quot;room.colors.sortBy&quot;">​</a></h3><ul><li><strong>类型</strong>: <code>&#39;index&#39; | &#39;area&#39;</code></li><li><strong>默认值</strong>: <code>&#39;index&#39;</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 &quot;room.colors.strategy&quot;">​</a></h3><ul><li><strong>类型</strong>: <code>&#39;priority&#39; | &#39;balanced&#39;</code></li><li><strong>默认值</strong>: <code>&#39;priority&#39;</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 &quot;room.colors.active&quot;">​</a></h4><ul><li><strong>类型</strong>: <code>string[]</code></li><li><strong>默认值</strong>: <code>[&#39;#a8c8f5&#39;, &#39;#9de5c7&#39;, &#39;#d4b9f7&#39;, &#39;#ffd399&#39;]</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 &quot;room.colors.inactive&quot;">​</a></h4><ul><li><strong>类型</strong>: <code>string[]</code></li><li><strong>默认值</strong>: <code>[&#39;#d6e7fc&#39;, &#39;#d1f4e5&#39;, &#39;#ece0fb&#39;, &#39;#fff0d9&#39;]</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 &quot;room.colors.normal&quot;">​</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 &quot;room.colors.name&quot;">​</a></h4><ul><li><strong>类型</strong>: <code>string[]</code></li><li><strong>默认值</strong>: <code>[&#39;#2563b8&#39;, &#39;#26966b&#39;, &#39;#7c3fb8&#39;, &#39;#d97706&#39;]</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 &quot;room.colors.nameInactive&quot;">​</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 &quot;room.colors.nameNormal&quot;">​</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 &quot;room.colors.propertyTheme&quot;">​</a></h4><ul><li><strong>类型</strong>: <code>string[]</code></li><li><strong>默认值</strong>: <code>[&#39;#2563b8&#39;, &#39;#26966b&#39;, &#39;#7c3fb8&#39;, &#39;#d97706&#39;]</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 &quot;room.colors.propertyThemeInactive&quot;">​</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 &quot;room.colors.propertyThemeNormal&quot;">​</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 &quot;room.colors.selectionIndicatorBackground&quot;">​</a></h4><ul><li><strong>类型</strong>: <code>string[]</code></li><li><strong>默认值</strong>: <code>[&#39;#2563b8&#39;, &#39;#26966b&#39;, &#39;#7c3fb8&#39;, &#39;#d97706&#39;]</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 &quot;room.colors.selectionIndicatorIcon&quot;">​</a></h4><ul><li><strong>类型</strong>: <code>string[]</code></li><li><strong>默认值</strong>: <code>[&#39;#ffffff&#39;, &#39;#ffffff&#39;, &#39;#ffffff&#39;, &#39;#ffffff&#39;]</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 &quot;room.colors.NO_ROOM_DATA&quot;">​</a></h4><ul><li><strong>类型</strong>: <code>string</code></li><li><strong>默认值</strong>: <code>&#39;#ebebeb&#39;</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 &quot;room.colors.ROOM_GAP&quot;">​</a></h4><ul><li><strong>类型</strong>: <code>string</code></li><li><strong>默认值</strong>: <code>&#39;#ebebeb&#39;</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 &quot;room.colors.OBSTACLE_ROOM&quot;">​</a></h4><ul><li><strong>类型</strong>: <code>string</code></li><li><strong>默认值</strong>: <code>&#39;#ebebeb&#39;</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 &quot;room.colors.UNKNOWN_ROOM&quot;">​</a></h4><ul><li><strong>类型</strong>: <code>string</code></li><li><strong>默认值</strong>: <code>&#39;#ebebeb&#39;</code></li></ul><p>未知房间的颜色。对于结构化协议代表 <code>roomId &gt;= 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 &quot;room.colors.VERSION0_ROOM&quot;">​</a></h4><ul><li><strong>类型</strong>: <code>string</code></li><li><strong>默认值</strong>: <code>&#39;&#39;</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 &quot;room.nameLabel&quot;">​</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 &quot;room.nameLabel.fontSize&quot;">​</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 &quot;room.nameLabel.fontFamily&quot;">​</a></h4><ul><li><strong>类型</strong>: <code>string</code></li><li><strong>默认值</strong>: <code>&#39;system-ui, -apple-system, sans-serif&#39;</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 &quot;room.nameLabel.fontWeight&quot;">​</a></h4><ul><li><strong>类型</strong>: <code>TextStyleFontWeight</code></li><li><strong>默认值</strong>: <code>&#39;500&#39;</code></li></ul><p>房间名称字体粗细。</p><h3 id="room-type" tabindex="-1">room.type <a class="header-anchor" href="#room-type" aria-label="Permalink to &quot;room.type&quot;">​</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 &quot;room.type.assets&quot;">​</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>&#39;&#39;</code>),则该类型的房间将不会显示任何图标。例如,通过设置 <code>assets[0] = &#39;&#39;</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 &quot;room.type.iconSize&quot;">​</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 &quot;room.type.gap&quot;">​</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 &quot;room.type.position&quot;">​</a></h4><ul><li><strong>类型</strong>: <code>&#39;left&#39; | &#39;right&#39;</code></li><li><strong>默认值</strong>: <code>&#39;left&#39;</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 &quot;room.type.container&quot;">​</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 &quot;room.type.container.visible&quot;">​</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 &quot;room.type.container.size&quot;">​</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 &quot;room.type.container.borderRadius&quot;">​</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 &quot;room.property&quot;">​</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 &quot;room.property.displayOrders&quot;">​</a></h4><ul><li><strong>类型</strong>: <code>(&#39;cleanMode&#39; | &#39;suction&#39; | &#39;cistern&#39; | &#39;cleanTimes&#39; | string)[]</code></li><li><strong>默认值</strong>: <code>[&#39;cleanMode&#39;, &#39;suction&#39;, &#39;cistern&#39;, &#39;cleanTimes&#39;]</code></li></ul><p>房间属性显示顺序。</p><p>你也可以传入自定义的字段名,比如 <code>[&#39;cleanMode&#39;, &#39;suction&#39;, &#39;cistern&#39;, &#39;cleanTimes&#39;, &#39;customProperty1&#39;]</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 &quot;room.property.customAssets&quot;">​</a></h4><ul><li><strong>类型</strong>: <code>Record&lt;string, string[]&gt;</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>
170
170
  <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> room</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: {</span></span>
171
171
  <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> property</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: {</span></span>
172
172
  <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;">&#39;cleanMode&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;suction&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;customProperty1&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;cistern&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;cleanTimes&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;customProperty2&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">],</span></span>
@@ -236,4 +236,4 @@ import{_ as e,c as i,o as a,aq as t}from"./chunks/framework.CBLqO2Q1.js";const g
236
236
  <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>
237
237
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
238
238
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
239
- <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 &quot;snapshot&quot;">​</a></h2><p>截图配置。</p><h3 id="snapshot-format" tabindex="-1">snapshot.format <a class="header-anchor" href="#snapshot-format" aria-label="Permalink to &quot;snapshot.format&quot;">​</a></h3><ul><li><strong>类型</strong>: <code>&#39;png&#39; | &#39;jpg&#39; | &#39;webp&#39;</code></li><li><strong>默认值</strong>: <code>&#39;png&#39;</code></li></ul><p>截图输出格式。</p><h3 id="snapshot-quality" tabindex="-1">snapshot.quality <a class="header-anchor" href="#snapshot-quality" aria-label="Permalink to &quot;snapshot.quality&quot;">​</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 &quot;snapshot.antialias&quot;">​</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 &quot;snapshot.resolution&quot;">​</a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>4</code></li></ul><p>截图分辨率倍数。</p>`,1376)])])}const k=e(s,[["render",l]]);export{g as __pageData,k as default};
239
+ <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 &quot;snapshot&quot;">​</a></h2><p>截图配置。</p><h3 id="snapshot-format" tabindex="-1">snapshot.format <a class="header-anchor" href="#snapshot-format" aria-label="Permalink to &quot;snapshot.format&quot;">​</a></h3><ul><li><strong>类型</strong>: <code>&#39;png&#39; | &#39;jpg&#39; | &#39;webp&#39;</code></li><li><strong>默认值</strong>: <code>&#39;png&#39;</code></li></ul><p>截图输出格式。</p><h3 id="snapshot-quality" tabindex="-1">snapshot.quality <a class="header-anchor" href="#snapshot-quality" aria-label="Permalink to &quot;snapshot.quality&quot;">​</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 &quot;snapshot.antialias&quot;">​</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 &quot;snapshot.resolution&quot;">​</a></h3><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>4</code></li></ul><p>截图分辨率倍数。</p>`,1375)])])}const k=e(s,[["render",l]]);export{g as __pageData,k as default};
@@ -1 +1 @@
1
- import{_ as e,c as i,o as a,aq as t}from"./chunks/framework.CBLqO2Q1.js";const g=JSON.parse('{"title":"配置","description":"","frontmatter":{},"headers":[],"relativePath":"reference/config.md","filePath":"reference/config.md","lastUpdated":1780021074000}'),s={name:"reference/config.md"};function l(n,o,r,c,d,h){return a(),i("div",null,[...o[0]||(o[0]=[t("",1376)])])}const k=e(s,[["render",l]]);export{g as __pageData,k as default};
1
+ import{_ as e,c as i,o as a,aq as t}from"./chunks/framework.CBLqO2Q1.js";const g=JSON.parse('{"title":"配置","description":"","frontmatter":{},"headers":[],"relativePath":"reference/config.md","filePath":"reference/config.md","lastUpdated":1780467652000}'),s={name:"reference/config.md"};function l(n,o,r,c,d,h){return a(),i("div",null,[...o[0]||(o[0]=[t("",1375)])])}const k=e(s,[["render",l]]);export{g as __pageData,k as default};
@@ -1,4 +1,4 @@
1
- import{_ as i,c as a,o as n,aq as h}from"./chunks/framework.CBLqO2Q1.js";const g=JSON.parse('{"title":"数据","description":"","frontmatter":{},"headers":[],"relativePath":"reference/data.md","filePath":"reference/data.md","lastUpdated":1779971049000}'),p={name:"reference/data.md"};function l(t,s,k,e,E,r){return n(),a("div",null,[...s[0]||(s[0]=[h(`<h1 id="数据" tabindex="-1">数据 <a class="header-anchor" href="#数据" aria-label="Permalink to &quot;数据&quot;">​</a></h1><p>了解 RobotMap 支持的各种数据类型和格式。</p><h2 id="map" tabindex="-1">map <a class="header-anchor" href="#map" aria-label="Permalink to &quot;map&quot;">​</a></h2><p>地图栅格数据,通常为编码后的字符串格式。</p><div class="language-tsx vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">tsx</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;">&lt;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">RobotMap</span></span>
1
+ import{_ as i,c as a,o as n,aq as h}from"./chunks/framework.CBLqO2Q1.js";const g=JSON.parse('{"title":"数据","description":"","frontmatter":{},"headers":[],"relativePath":"reference/data.md","filePath":"reference/data.md","lastUpdated":1781611052000}'),p={name:"reference/data.md"};function l(t,s,k,e,E,r){return n(),a("div",null,[...s[0]||(s[0]=[h(`<h1 id="数据" tabindex="-1">数据 <a class="header-anchor" href="#数据" aria-label="Permalink to &quot;数据&quot;">​</a></h1><p>了解 RobotMap 支持的各种数据类型和格式。</p><h2 id="map" tabindex="-1">map <a class="header-anchor" href="#map" aria-label="Permalink to &quot;map&quot;">​</a></h2><p>地图栅格数据,通常为编码后的字符串格式。</p><div class="language-tsx vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">tsx</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;">&lt;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">RobotMap</span></span>
2
2
  <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> map</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;&lt;原始地图数据字符串&gt;&quot;</span></span>
3
3
  <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // ... 其他属性</span></span>
4
4
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">/&gt;</span></span></code></pre></div><p><strong>类型</strong>: <code>string</code></p><p><strong>说明</strong>:</p><ul><li>包含地图尺寸、分辨率、原点等基础信息。</li><li>包含障碍物、房间、地毯等图形数据。</li><li>通常是来源于p2p通道获取的数据,无需做任何处理,直接传入即可。</li></ul><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>目前地图数据协议分为两种,一种是点阵协议,一种是结构化协议。</p><p><code>map</code> 已经兼容支持两种协议,你只需要传入原始数据字符串即可。</p></div><h2 id="path" tabindex="-1">path <a class="header-anchor" href="#path" aria-label="Permalink to &quot;path&quot;">​</a></h2><p>机器人路径数据,包含清扫轨迹和当前位置。</p><div class="language-tsx vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">tsx</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;">&lt;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">RobotMap</span></span>
@@ -158,6 +158,21 @@ import{_ as i,c as a,o as n,aq as h}from"./chunks/framework.CBLqO2Q1.js";const g
158
158
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> y: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">300</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
159
159
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> width: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">60</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
160
160
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> height: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">20</span></span>
161
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
162
+ <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // 固定像素偏移:贴在某个锚点旁边,缩放/旋转都不漂移</span></span>
163
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
164
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> id: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;room-badge&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
165
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> type: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;image&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
166
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> src: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;https://example.com/badge.png&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
167
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> sizeFixed: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
168
+ <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // x/y 为地图锚点(这里假设是房间中心点)</span></span>
169
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> x: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">100</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
170
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> y: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">200</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
171
+ <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // 底部中心对齐锚点,再向上偏移 10px、向右 12px(屏幕像素,不随缩放变化)</span></span>
172
+ <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</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
173
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> pixelOffset: { x: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">12</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, y: </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">10</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
174
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> width: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">20</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
175
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> height: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">20</span></span>
161
176
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
162
177
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]</span></span>
163
178
  <span class="line"></span>
@@ -1 +1 @@
1
- import{_ as i,c as a,o as n,aq as h}from"./chunks/framework.CBLqO2Q1.js";const g=JSON.parse('{"title":"数据","description":"","frontmatter":{},"headers":[],"relativePath":"reference/data.md","filePath":"reference/data.md","lastUpdated":1779971049000}'),p={name:"reference/data.md"};function l(t,s,k,e,E,r){return n(),a("div",null,[...s[0]||(s[0]=[h("",69)])])}const y=i(p,[["render",l]]);export{g as __pageData,y as default};
1
+ import{_ as i,c as a,o as n,aq as h}from"./chunks/framework.CBLqO2Q1.js";const g=JSON.parse('{"title":"数据","description":"","frontmatter":{},"headers":[],"relativePath":"reference/data.md","filePath":"reference/data.md","lastUpdated":1781611052000}'),p={name:"reference/data.md"};function l(t,s,k,e,E,r){return n(),a("div",null,[...s[0]||(s[0]=[h("",69)])])}const y=i(p,[["render",l]]);export{g as __pageData,y as default};
@@ -1,4 +1,4 @@
1
- import{_ as i,c as a,o as n,aq as p}from"./chunks/framework.CBLqO2Q1.js";const y=JSON.parse('{"title":"类型定义","description":"","frontmatter":{},"headers":[],"relativePath":"reference/types.md","filePath":"reference/types.md","lastUpdated":1779971049000}'),h={name:"reference/types.md"};function l(t,s,k,e,r,d){return n(),a("div",null,[...s[0]||(s[0]=[p(`<h1 id="类型定义" tabindex="-1">类型定义 <a class="header-anchor" href="#类型定义" aria-label="Permalink to &quot;类型定义&quot;">​</a></h1><p>了解 RobotMap 支持的各种数据类型和格式。</p><h2 id="point" tabindex="-1">Point <a class="header-anchor" href="#point" aria-label="Permalink to &quot;Point {#point}&quot;">​</a></h2><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;"> Point</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
1
+ import{_ as i,c as a,o as n,aq as p}from"./chunks/framework.CBLqO2Q1.js";const y=JSON.parse('{"title":"类型定义","description":"","frontmatter":{},"headers":[],"relativePath":"reference/types.md","filePath":"reference/types.md","lastUpdated":1781611052000}'),l={name:"reference/types.md"};function h(t,s,k,e,r,d){return n(),a("div",null,[...s[0]||(s[0]=[p(`<h1 id="类型定义" tabindex="-1">类型定义 <a class="header-anchor" href="#类型定义" aria-label="Permalink to &quot;类型定义&quot;">​</a></h1><p>了解 RobotMap 支持的各种数据类型和格式。</p><h2 id="point" tabindex="-1">Point <a class="header-anchor" href="#point" aria-label="Permalink to &quot;Point {#point}&quot;">​</a></h2><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;"> Point</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
2
2
  <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** X坐标 */</span></span>
3
3
  <span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> x</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> number</span></span>
4
4
  <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** Y坐标 */</span></span>
@@ -124,10 +124,19 @@ import{_ as i,c as a,o as n,aq as p}from"./chunks/framework.CBLqO2Q1.js";const y
124
124
  <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** 自定义数据 */</span></span>
125
125
  <span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> customData</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">?:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Record</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&lt;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">string</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">any</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span>
126
126
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h2 id="roomdata" tabindex="-1">RoomData <a class="header-anchor" href="#roomdata" aria-label="Permalink to &quot;RoomData {#roomdata}&quot;">​</a></h2><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;"> RoomData</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> RoomProperty</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> &amp;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
127
- <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** 房间中心点 */</span></span>
127
+ <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** 房间中心点(地图坐标系,绝对坐标) */</span></span>
128
128
  <span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> centerPoint</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Point</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> |</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> null</span></span>
129
+ <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** 房间中心点(机器坐标系,相对 origin,与 Zone / VirtualWall 一致) */</span></span>
130
+ <span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> relativeCenterPoint</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Point</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> |</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> null</span></span>
129
131
  <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** 索引 */</span></span>
130
132
  <span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> index</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> number</span></span>
133
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h2 id="roomcenterinfo" tabindex="-1">RoomCenterInfo <a class="header-anchor" href="#roomcenterinfo" aria-label="Permalink to &quot;RoomCenterInfo {#roomcenterinfo}&quot;">​</a></h2><p>房间中心点信息类型。由地图几何驱动,随 <a href="/reference/callbacks.html#onroomsdrawed"><code>onRoomsDrawed</code></a> 回调抛出,同时提供两种坐标表达。</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;"> RoomCenterInfo</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
134
+ <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** 房间ID */</span></span>
135
+ <span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> id</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> number</span></span>
136
+ <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** 中心点(地图坐标系,绝对坐标) */</span></span>
137
+ <span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> centerPoint</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Point</span></span>
138
+ <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** 中心点(机器坐标系,相对 origin,与 Zone / VirtualWall 一致) */</span></span>
139
+ <span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> relativeCenterPoint</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Point</span></span>
131
140
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h2 id="imagecustomelementparam" tabindex="-1">ImageCustomElementParam <a class="header-anchor" href="#imagecustomelementparam" aria-label="Permalink to &quot;ImageCustomElementParam {#imagecustomelementparam}&quot;">​</a></h2><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;"> ImageCustomElementParam</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
132
141
  <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** 元素ID */</span></span>
133
142
  <span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> id</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> string</span></span>
@@ -154,6 +163,15 @@ import{_ as i,c as a,o as n,aq as p}from"./chunks/framework.CBLqO2Q1.js";const y
154
163
  <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** 尺寸是否固定 */</span></span>
155
164
  <span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> sizeFixed</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">?:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> boolean</span></span>
156
165
  <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /**</span></span>
166
+ <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> * 屏幕像素偏移(仅 sizeFixed: true 生效)</span></span>
167
+ <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> *</span></span>
168
+ <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> * 在 (x, y) 锚点基础上再按屏幕像素平移,该偏移不随地图缩放/旋转变化。</span></span>
169
+ <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> * - x 正值向右,负值向左</span></span>
170
+ <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> * - y 正值向下,负值向上</span></span>
171
+ <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> * 例:贴在房间属性气泡上方 → { x: 12, y: -10 }</span></span>
172
+ <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> */</span></span>
173
+ <span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> pixelOffset</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">?:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Point</span></span>
174
+ <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /**</span></span>
157
175
  <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> * 锚点位置</span></span>
158
176
  <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> *</span></span>
159
177
  <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> * 定义图片的锚点位置,用于控制图片相对于坐标点的对齐方式</span></span>
@@ -189,6 +207,14 @@ import{_ as i,c as a,o as n,aq as p}from"./chunks/framework.CBLqO2Q1.js";const y
189
207
  <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** 尺寸是否固定 */</span></span>
190
208
  <span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> sizeFixed</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">?:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> boolean</span></span>
191
209
  <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /**</span></span>
210
+ <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> * 屏幕像素偏移(仅 sizeFixed: true 生效)</span></span>
211
+ <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> *</span></span>
212
+ <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> * 在 (x, y) 锚点基础上再按屏幕像素平移,该偏移不随地图缩放/旋转变化。</span></span>
213
+ <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> * - x 正值向右,负值向左</span></span>
214
+ <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> * - y 正值向下,负值向上</span></span>
215
+ <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> */</span></span>
216
+ <span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> pixelOffset</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">?:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Point</span></span>
217
+ <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /**</span></span>
192
218
  <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> * 锚点位置</span></span>
193
219
  <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> *</span></span>
194
220
  <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> * 定义GIF的锚点位置,用于控制GIF相对于坐标点的对齐方式</span></span>
@@ -223,6 +249,14 @@ import{_ as i,c as a,o as n,aq as p}from"./chunks/framework.CBLqO2Q1.js";const y
223
249
  <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>
224
250
  <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** 尺寸是否固定 */</span></span>
225
251
  <span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> sizeFixed</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">?:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> boolean</span></span>
252
+ <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /**</span></span>
253
+ <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> * 屏幕像素偏移(仅 sizeFixed: true 生效)</span></span>
254
+ <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> *</span></span>
255
+ <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> * 在 (x, y) 锚点基础上再按屏幕像素平移,该偏移不随地图缩放/旋转变化。</span></span>
256
+ <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> * - x 正值向右,负值向左</span></span>
257
+ <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> * - y 正值向下,负值向上</span></span>
258
+ <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> */</span></span>
259
+ <span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> pixelOffset</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">?:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Point</span></span>
226
260
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h2 id="customelementparam" tabindex="-1">CustomElementParam <a class="header-anchor" href="#customelementparam" aria-label="Permalink to &quot;CustomElementParam {#customelementparam}&quot;">​</a></h2><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;"> CustomElementParam</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span></span>
227
261
  <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> |</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> ImageCustomElementParam</span></span>
228
262
  <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> |</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> GifCustomElementParam</span></span>
@@ -255,4 +289,4 @@ import{_ as i,c as a,o as n,aq as p}from"./chunks/framework.CBLqO2Q1.js";const y
255
289
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h2 id="heatmappoint" tabindex="-1">HeatmapPoint <a class="header-anchor" href="#heatmappoint" aria-label="Permalink to &quot;HeatmapPoint {#heatmappoint}&quot;">​</a></h2><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;"> HeatmapPoint</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Point</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> &amp;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
256
290
  <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** 信号强度 */</span></span>
257
291
  <span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> signal</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> number</span></span>
258
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div>`,65)])])}const F=i(h,[["render",l]]);export{y as __pageData,F as default};
292
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div>`,68)])])}const F=i(l,[["render",h]]);export{y as __pageData,F as default};
@@ -0,0 +1 @@
1
+ import{_ as i,c as a,o as n,aq as p}from"./chunks/framework.CBLqO2Q1.js";const y=JSON.parse('{"title":"类型定义","description":"","frontmatter":{},"headers":[],"relativePath":"reference/types.md","filePath":"reference/types.md","lastUpdated":1781611052000}'),l={name:"reference/types.md"};function h(t,s,k,e,r,d){return n(),a("div",null,[...s[0]||(s[0]=[p("",68)])])}const F=i(l,[["render",h]]);export{y as __pageData,F as default};