@ray-js/robot-map-sdk 0.0.3-beta-47 → 0.0.3-beta-49

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 (43) hide show
  1. package/dist/constant/methods.js +1 -1
  2. package/dist/index.d.ts +199 -2
  3. package/dist/index.rjs.js +1 -1
  4. package/dist-app/assets/{index-VwsIvmhe.js → index-CY1T4TTF.js} +1 -1
  5. package/dist-app/index.html +1 -1
  6. package/dist-docs/404.html +2 -2
  7. package/dist-docs/assets/{app.CAcoFY26.js → app.voqo-XmY.js} +1 -1
  8. package/dist-docs/assets/chunks/@localSearchIndexroot.C8ORQZ5i.js +1 -0
  9. package/dist-docs/assets/chunks/{VPLocalSearchBox.UD2QNEXA.js → VPLocalSearchBox.Cx4AcJ2A.js} +1 -1
  10. package/dist-docs/assets/chunks/{theme.BcL9rPww.js → theme.kw_dRkmm.js} +2 -2
  11. package/dist-docs/assets/{guide_advanced-usage.md.Op4RP3gd.js → guide_advanced-usage.md.Bt5ROSu8.js} +43 -3
  12. package/dist-docs/assets/{guide_advanced-usage.md.Op4RP3gd.lean.js → guide_advanced-usage.md.Bt5ROSu8.lean.js} +1 -1
  13. package/dist-docs/assets/{guide_getting-started.md.BHgQcxq8.js → guide_getting-started.md.Cpb9H5v0.js} +1 -1
  14. package/dist-docs/assets/{reference_callbacks.md.-S6uhkXO.js → reference_callbacks.md.DgCt5RdP.js} +2 -2
  15. package/dist-docs/assets/{reference_callbacks.md.-S6uhkXO.lean.js → reference_callbacks.md.DgCt5RdP.lean.js} +1 -1
  16. package/dist-docs/assets/reference_config.md.C4_zYqWJ.js +61 -0
  17. package/dist-docs/assets/reference_config.md.C4_zYqWJ.lean.js +1 -0
  18. package/dist-docs/assets/{reference_data.md.B8JfrRhl.js → reference_data.md.DciSLVC8.js} +10 -3
  19. package/dist-docs/assets/{reference_data.md.B8JfrRhl.lean.js → reference_data.md.DciSLVC8.lean.js} +1 -1
  20. package/dist-docs/assets/{reference_methods.md.CO0IvYMn.js → reference_methods.md.DxIWUIJ-.js} +3 -3
  21. package/dist-docs/assets/{reference_methods.md.CO0IvYMn.lean.js → reference_methods.md.DxIWUIJ-.lean.js} +1 -1
  22. package/dist-docs/assets/reference_runtime.md.BA81waFW.js +19 -0
  23. package/dist-docs/assets/{reference_runtime.md.BMm5Nj3U.lean.js → reference_runtime.md.BA81waFW.lean.js} +1 -1
  24. package/dist-docs/assets/{reference_types.md.DkIhhJD0.js → reference_types.md.4zpYEKU_.js} +7 -2
  25. package/dist-docs/assets/{reference_types.md.DkIhhJD0.lean.js → reference_types.md.4zpYEKU_.lean.js} +1 -1
  26. package/dist-docs/guide/advanced-usage.html +46 -6
  27. package/dist-docs/guide/concepts.html +3 -3
  28. package/dist-docs/guide/getting-started.html +5 -5
  29. package/dist-docs/hashmap.json +1 -1
  30. package/dist-docs/index.html +3 -3
  31. package/dist-docs/reference/callbacks.html +5 -5
  32. package/dist-docs/reference/config.html +5 -5
  33. package/dist-docs/reference/data.html +13 -6
  34. package/dist-docs/reference/methods.html +6 -6
  35. package/dist-docs/reference/runtime.html +5 -5
  36. package/dist-docs/reference/types.html +10 -5
  37. package/dist-docs/reference/utils.html +3 -3
  38. package/package.json +1 -1
  39. package/dist-docs/assets/chunks/@localSearchIndexroot.BVVyfLDa.js +0 -1
  40. package/dist-docs/assets/reference_config.md.BCRDz_cF.js +0 -61
  41. package/dist-docs/assets/reference_config.md.BCRDz_cF.lean.js +0 -1
  42. package/dist-docs/assets/reference_runtime.md.BMm5Nj3U.js +0 -19
  43. /package/dist-docs/assets/{guide_getting-started.md.BHgQcxq8.lean.js → guide_getting-started.md.Cpb9H5v0.lean.js} +0 -0
@@ -1,4 +1,4 @@
1
- import{_ as i,c as a,o as n,ag as p}from"./chunks/framework.DRADY2L-.js";const g=JSON.parse('{"title":"数据","description":"","frontmatter":{},"headers":[],"relativePath":"reference/data.md","filePath":"reference/data.md","lastUpdated":1759993272000}'),h={name:"reference/data.md"};function l(t,s,k,e,E,r){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="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,ag as h}from"./chunks/framework.DRADY2L-.js";const g=JSON.parse('{"title":"数据","description":"","frontmatter":{},"headers":[],"relativePath":"reference/data.md","filePath":"reference/data.md","lastUpdated":1762933966000}'),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>
@@ -103,7 +103,14 @@ import{_ as i,c as a,o as n,ag as p}from"./chunks/framework.DRADY2L-.js";const g
103
103
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
104
104
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]</span></span>
105
105
  <span class="line"></span>
106
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&lt;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">RobotMap</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> spots</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{spots} /&gt;</span></span></code></pre></div><p><strong>类型</strong>: <a href="/reference/types.html#spotparam"><code>SpotParam[]</code></a></p><h2 id="detectedobjects" tabindex="-1">detectedObjects <a class="header-anchor" href="#detectedobjects" aria-label="Permalink to &quot;detectedObjects&quot;">​</a></h2><p>AI 检测物体数据,显示机器人识别到的物体。</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;">const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> detectedObjects</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> DetectedObjectParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[] </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [</span></span>
106
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&lt;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">RobotMap</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> spots</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{spots} /&gt;</span></span></code></pre></div><h2 id="waypoints" tabindex="-1">wayPoints <a class="header-anchor" href="#waypoints" aria-label="Permalink to &quot;wayPoints&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:#D73A49;--shiki-dark:#F97583;">const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> wayPoints</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> WayPointParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[] </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [</span></span>
107
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
108
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> id: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;wayPoint1&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
109
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> point: { x: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">120</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, y: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">80</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
110
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
111
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]</span></span>
112
+ <span class="line"></span>
113
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&lt;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">RobotMap</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> wayPoints</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{wayPoints} /&gt;</span></span></code></pre></div><p><strong>类型</strong>: <a href="/reference/types.html#waypointparam"><code>WayPointParam[]</code></a></p><h2 id="detectedobjects" tabindex="-1">detectedObjects <a class="header-anchor" href="#detectedobjects" aria-label="Permalink to &quot;detectedObjects&quot;">​</a></h2><p>AI 检测物体数据,显示机器人识别到的物体。</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;">const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> detectedObjects</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> DetectedObjectParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[] </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [</span></span>
107
114
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
108
115
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> id: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;object1&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
109
116
  <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/shoe-icon.png&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
@@ -153,4 +160,4 @@ import{_ as i,c as a,o as n,ag as p}from"./chunks/framework.DRADY2L-.js";const g
153
160
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
154
161
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]</span></span>
155
162
  <span class="line"></span>
156
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&lt;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">RobotMap</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> customElements</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{customElements} /&gt;</span></span></code></pre></div><p><strong>类型</strong>: <a href="/reference/types.html#customelementparam"><code>CustomElementParam[]</code></a></p>`,50)])])}const y=i(h,[["render",l]]);export{g as __pageData,y as default};
163
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&lt;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">RobotMap</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> customElements</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{customElements} /&gt;</span></span></code></pre></div><p><strong>类型</strong>: <a href="/reference/types.html#customelementparam"><code>CustomElementParam[]</code></a></p>`,53)])])}const y=i(p,[["render",l]]);export{g as __pageData,y as default};
@@ -1 +1 @@
1
- import{_ as i,c as a,o as n,ag as p}from"./chunks/framework.DRADY2L-.js";const g=JSON.parse('{"title":"数据","description":"","frontmatter":{},"headers":[],"relativePath":"reference/data.md","filePath":"reference/data.md","lastUpdated":1759993272000}'),h={name:"reference/data.md"};function l(t,s,k,e,E,r){return n(),a("div",null,[...s[0]||(s[0]=[p("",50)])])}const y=i(h,[["render",l]]);export{g as __pageData,y as default};
1
+ import{_ as i,c as a,o as n,ag as h}from"./chunks/framework.DRADY2L-.js";const g=JSON.parse('{"title":"数据","description":"","frontmatter":{},"headers":[],"relativePath":"reference/data.md","filePath":"reference/data.md","lastUpdated":1762933966000}'),p={name:"reference/data.md"};function l(t,s,k,e,E,r){return n(),a("div",null,[...s[0]||(s[0]=[h("",53)])])}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,ag as t}from"./chunks/framework.DRADY2L-.js";const g=JSON.parse('{"title":"地图方法","description":"","frontmatter":{},"headers":[],"relativePath":"reference/methods.md","filePath":"reference/methods.md","lastUpdated":1761277922000}'),e={name:"reference/methods.md"};function p(h,s,l,k,r,o){return n(),a("div",null,[...s[0]||(s[0]=[t(`<h1 id="地图方法" tabindex="-1">地图方法 <a class="header-anchor" href="#地图方法" aria-label="Permalink to &quot;地图方法&quot;">​</a></h1><p>了解 RobotMap 提供的 API 方法。</p><h2 id="使用示例" tabindex="-1">使用示例 <a class="header-anchor" href="#使用示例" aria-label="Permalink to &quot;使用示例&quot;">​</a></h2><p>通过 <code>onMapReady</code> 回调获得 <code>MapApi</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;"> { MapApi } </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>
1
+ import{_ as i,c as a,o as n,ag as t}from"./chunks/framework.DRADY2L-.js";const g=JSON.parse('{"title":"地图方法","description":"","frontmatter":{},"headers":[],"relativePath":"reference/methods.md","filePath":"reference/methods.md","lastUpdated":1762933966000}'),e={name:"reference/methods.md"};function p(h,s,l,k,r,o){return n(),a("div",null,[...s[0]||(s[0]=[t(`<h1 id="地图方法" tabindex="-1">地图方法 <a class="header-anchor" href="#地图方法" aria-label="Permalink to &quot;地图方法&quot;">​</a></h1><p>了解 RobotMap 提供的 API 方法。</p><h2 id="使用示例" tabindex="-1">使用示例 <a class="header-anchor" href="#使用示例" aria-label="Permalink to &quot;使用示例&quot;">​</a></h2><p>通过 <code>onMapReady</code> 回调获得 <code>MapApi</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;"> { MapApi } </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>
2
2
  <span class="line"></span>
3
3
  <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>
4
4
  <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> mapApi</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> useRef</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&lt;</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">MapApi</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">null</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
@@ -21,7 +21,7 @@ import{_ as i,c as a,o as n,ag as t}from"./chunks/framework.DRADY2L-.js";const g
21
21
  <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // ... 其他属性</span></span>
22
22
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> /&gt;</span></span>
23
23
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> )</span></span>
24
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>注意所有地图方法都是异步的Promise,需要使用 <code>await</code> 或 <code>then</code> 来获取结果。</p></div><h2 id="areroomsadjacent" tabindex="-1">areRoomsAdjacent() <a class="header-anchor" href="#areroomsadjacent" aria-label="Permalink to &quot;areRoomsAdjacent()&quot;">​</a></h2><p>判断指定的房间是否相邻(连通)。</p><p>判定阈值由 <code>config.map.adjacencyThreshold</code> 配置决定。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> areRoomsAdjacent</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">roomIds</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> number</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[])</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Promise</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&lt;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">boolean</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>roomIds</code>: <code>number[]</code> - 要检测的房间ID数组</li></ul><p><strong>返回值</strong>: <a href="/reference/types.html#boolean"><code>Promise&lt;boolean&gt;</code></a></p><h2 id="getforbiddensweepzones" tabindex="-1">getForbiddenSweepZones() <a class="header-anchor" href="#getforbiddensweepzones" aria-label="Permalink to &quot;getForbiddenSweepZones()&quot;">​</a></h2><p>获取当前地图上所有禁扫区域数据。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> getForbiddenSweepZones</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Promise</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&lt;</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">ZoneParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[]&gt;</span></span></code></pre></div><p><strong>返回值</strong>: <a href="/reference/types.html#zoneparam"><code>Promise&lt;ZoneParam[]&gt;</code></a></p><h2 id="getforbiddenmopzones" tabindex="-1">getForbiddenMopZones() <a class="header-anchor" href="#getforbiddenmopzones" aria-label="Permalink to &quot;getForbiddenMopZones()&quot;">​</a></h2><p>获取当前地图上所有禁拖区域数据。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> getForbiddenMopZones</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Promise</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&lt;</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">ZoneParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[]&gt;</span></span></code></pre></div><p><strong>返回值</strong>: <a href="/reference/types.html#zoneparam"><code>Promise&lt;ZoneParam[]&gt;</code></a></p><h2 id="getcleanzones" tabindex="-1">getCleanZones() <a class="header-anchor" href="#getcleanzones" aria-label="Permalink to &quot;getCleanZones()&quot;">​</a></h2><p>获取当前地图上所有清扫区域数据。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> getCleanZones</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Promise</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&lt;</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">ZoneParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[]&gt;</span></span></code></pre></div><p><strong>返回值</strong>: <a href="/reference/types.html#zoneparam"><code>Promise&lt;ZoneParam[]&gt;</code></a></p><h2 id="getvirtualwalls" tabindex="-1">getVirtualWalls() <a class="header-anchor" href="#getvirtualwalls" aria-label="Permalink to &quot;getVirtualWalls()&quot;">​</a></h2><p>获取当前地图上所有虚拟墙数据。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> getVirtualWalls</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Promise</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&lt;</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">VirtualWallParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[]&gt;</span></span></code></pre></div><p><strong>返回值</strong>: <a href="/reference/types.html#virtualwallparam"><code>Promise&lt;VirtualWallParam[]&gt;</code></a></p><h2 id="getspots" tabindex="-1">getSpots() <a class="header-anchor" href="#getspots" aria-label="Permalink to &quot;getSpots()&quot;">​</a></h2><p>获取当前地图上所有定点清扫数据。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> getSpots</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Promise</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&lt;</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">SpotParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[]&gt;</span></span></code></pre></div><p><strong>返回值</strong>: <a href="/reference/types.html#spotparam"><code>Promise&lt;SpotParam[]&gt;</code></a></p><h2 id="geteffectivedividerpoints" tabindex="-1">getEffectiveDividerPoints() <a class="header-anchor" href="#geteffectivedividerpoints" aria-label="Permalink to &quot;getEffectiveDividerPoints()&quot;">​</a></h2><p>获取分割线有效端点。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> getEffectiveDividerPoints</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Promise</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&lt;</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Point</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[] </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">|</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> null</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span></code></pre></div><p><strong>返回值</strong>: <a href="/reference/types.html#point"><code>Promise&lt;Point[] | null&gt;</code></a> | <code>null</code></p><h2 id="getdividerendpoints" tabindex="-1">getDividerEndPoints() <a class="header-anchor" href="#getdividerendpoints" aria-label="Permalink to &quot;getDividerEndPoints()&quot;">​</a></h2><p>获取分割线端点。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> getDividerEndPoints</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Promise</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&lt;</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Point</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[] </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">|</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> null</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span></code></pre></div><p><strong>返回值</strong>: <a href="/reference/types.html#point"><code>Point[]</code></a> | <code>null</code></p><h2 id="getviewportcenterpoint" tabindex="-1">getViewportCenterPoint() <a class="header-anchor" href="#getviewportcenterpoint" aria-label="Permalink to &quot;getViewportCenterPoint()&quot;">​</a></h2><p>获取当前视口中心点坐标。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> getViewportCenterPoint</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Promise</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&lt;</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 style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span></code></pre></div><p><strong>返回值</strong>: <a href="/reference/types.html#point"><code>Promise&lt;Point[]&gt;</code></a> | <code>null</code></p><h2 id="getmapcenterpoint" tabindex="-1">getMapCenterPoint() <a class="header-anchor" href="#getmapcenterpoint" aria-label="Permalink to &quot;getMapCenterPoint()&quot;">​</a></h2><p>获取地图中心点坐标。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> getMapCenterPoint</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Promise</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&lt;</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 style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span></code></pre></div><p><strong>返回值</strong>: <a href="/reference/types.html#point"><code>Promise&lt;Point[]&gt;</code></a> | <code>null</code></p><h2 id="getwallpointsbyviewportcenter" tabindex="-1">getWallPointsByViewportCenter() <a class="header-anchor" href="#getwallpointsbyviewportcenter" aria-label="Permalink to &quot;getWallPointsByViewportCenter()&quot;">​</a></h2><p>基于视口中心生成虚拟墙端点坐标。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> getWallPointsByViewportCenter</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">options</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">?:</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
24
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>注意所有地图方法都是异步的Promise,需要使用 <code>await</code> 或 <code>then</code> 来获取结果。</p></div><h2 id="areroomsadjacent" tabindex="-1">areRoomsAdjacent() <a class="header-anchor" href="#areroomsadjacent" aria-label="Permalink to &quot;areRoomsAdjacent()&quot;">​</a></h2><p>判断指定的房间是否相邻(连通)。</p><p>判定阈值由 <code>config.map.adjacencyThreshold</code> 配置决定。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> areRoomsAdjacent</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">roomIds</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> number</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[])</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Promise</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&lt;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">boolean</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>roomIds</code>: <code>number[]</code> - 要检测的房间ID数组</li></ul><p><strong>返回值</strong>: <a href="/reference/types.html#boolean"><code>Promise&lt;boolean&gt;</code></a></p><h2 id="getforbiddensweepzones" tabindex="-1">getForbiddenSweepZones() <a class="header-anchor" href="#getforbiddensweepzones" aria-label="Permalink to &quot;getForbiddenSweepZones()&quot;">​</a></h2><p>获取当前地图上所有禁扫区域数据。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> getForbiddenSweepZones</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Promise</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&lt;</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">ZoneParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[]&gt;</span></span></code></pre></div><p><strong>返回值</strong>: <a href="/reference/types.html#zoneparam"><code>Promise&lt;ZoneParam[]&gt;</code></a></p><h2 id="getforbiddenmopzones" tabindex="-1">getForbiddenMopZones() <a class="header-anchor" href="#getforbiddenmopzones" aria-label="Permalink to &quot;getForbiddenMopZones()&quot;">​</a></h2><p>获取当前地图上所有禁拖区域数据。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> getForbiddenMopZones</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Promise</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&lt;</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">ZoneParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[]&gt;</span></span></code></pre></div><p><strong>返回值</strong>: <a href="/reference/types.html#zoneparam"><code>Promise&lt;ZoneParam[]&gt;</code></a></p><h2 id="getcleanzones" tabindex="-1">getCleanZones() <a class="header-anchor" href="#getcleanzones" aria-label="Permalink to &quot;getCleanZones()&quot;">​</a></h2><p>获取当前地图上所有清扫区域数据。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> getCleanZones</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Promise</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&lt;</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">ZoneParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[]&gt;</span></span></code></pre></div><p><strong>返回值</strong>: <a href="/reference/types.html#zoneparam"><code>Promise&lt;ZoneParam[]&gt;</code></a></p><h2 id="getvirtualwalls" tabindex="-1">getVirtualWalls() <a class="header-anchor" href="#getvirtualwalls" aria-label="Permalink to &quot;getVirtualWalls()&quot;">​</a></h2><p>获取当前地图上所有虚拟墙数据。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> getVirtualWalls</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Promise</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&lt;</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">VirtualWallParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[]&gt;</span></span></code></pre></div><p><strong>返回值</strong>: <a href="/reference/types.html#virtualwallparam"><code>Promise&lt;VirtualWallParam[]&gt;</code></a></p><h2 id="getspots" tabindex="-1">getSpots() <a class="header-anchor" href="#getspots" aria-label="Permalink to &quot;getSpots()&quot;">​</a></h2><p>获取当前地图上所有定点清扫数据。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> getSpots</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Promise</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&lt;</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">SpotParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[]&gt;</span></span></code></pre></div><p><strong>返回值</strong>: <a href="/reference/types.html#spotparam"><code>Promise&lt;SpotParam[]&gt;</code></a></p><h2 id="getwaypoints" tabindex="-1">getWayPoints() <a class="header-anchor" href="#getwaypoints" aria-label="Permalink to &quot;getWayPoints()&quot;">​</a></h2><p>获取当前地图上所有途径点数据。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> getWayPoints</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Promise</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&lt;</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">WayPointParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[]&gt;</span></span></code></pre></div><p><strong>返回值</strong>: <a href="/reference/types.html#waypointparam"><code>Promise&lt;WayPointParam[]&gt;</code></a></p><h2 id="geteffectivedividerpoints" tabindex="-1">getEffectiveDividerPoints() <a class="header-anchor" href="#geteffectivedividerpoints" aria-label="Permalink to &quot;getEffectiveDividerPoints()&quot;">​</a></h2><p>获取分割线有效端点。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> getEffectiveDividerPoints</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Promise</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&lt;</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Point</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[] </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">|</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> null</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span></code></pre></div><p><strong>返回值</strong>: <a href="/reference/types.html#point"><code>Promise&lt;Point[] | null&gt;</code></a> | <code>null</code></p><h2 id="getdividerendpoints" tabindex="-1">getDividerEndPoints() <a class="header-anchor" href="#getdividerendpoints" aria-label="Permalink to &quot;getDividerEndPoints()&quot;">​</a></h2><p>获取分割线端点。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> getDividerEndPoints</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Promise</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&lt;</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Point</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[] </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">|</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> null</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span></code></pre></div><p><strong>返回值</strong>: <a href="/reference/types.html#point"><code>Point[]</code></a> | <code>null</code></p><h2 id="getviewportcenterpoint" tabindex="-1">getViewportCenterPoint() <a class="header-anchor" href="#getviewportcenterpoint" aria-label="Permalink to &quot;getViewportCenterPoint()&quot;">​</a></h2><p>获取当前视口中心点坐标。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> getViewportCenterPoint</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Promise</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&lt;</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 style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span></code></pre></div><p><strong>返回值</strong>: <a href="/reference/types.html#point"><code>Promise&lt;Point[]&gt;</code></a> | <code>null</code></p><h2 id="getmapcenterpoint" tabindex="-1">getMapCenterPoint() <a class="header-anchor" href="#getmapcenterpoint" aria-label="Permalink to &quot;getMapCenterPoint()&quot;">​</a></h2><p>获取地图中心点坐标。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> getMapCenterPoint</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Promise</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&lt;</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 style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span></code></pre></div><p><strong>返回值</strong>: <a href="/reference/types.html#point"><code>Promise&lt;Point[]&gt;</code></a> | <code>null</code></p><h2 id="getwallpointsbyviewportcenter" tabindex="-1">getWallPointsByViewportCenter() <a class="header-anchor" href="#getwallpointsbyviewportcenter" aria-label="Permalink to &quot;getWallPointsByViewportCenter()&quot;">​</a></h2><p>基于视口中心生成虚拟墙端点坐标。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> getWallPointsByViewportCenter</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">options</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">?:</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
25
25
  <span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> width</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">?:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> number</span></span>
26
26
  <span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> direction</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">?:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Direction</span></span>
27
27
  <span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> offsetX</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">?:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> number</span></span>
@@ -95,4 +95,4 @@ import{_ as i,c as a,o as n,ag as t}from"./chunks/framework.DRADY2L-.js";const g
95
95
  <span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> detectedObjects</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">?:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> DetectedObjectParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[]</span></span>
96
96
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
97
97
  <span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> runtime</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">?:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> DeepPartialRuntimeConfig</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
98
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Promise</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;">&gt;</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>data</code> - 地图数据对象</li><li><code>data.map</code>: <code>string</code> - 地图字符串数据</li><li><code>data.path</code>: <code>string</code> - 可选的路径数据</li><li><code>data.roomProperties</code>: <code>RoomProperty[]</code> - 可选的房间属性数据</li><li><code>data.customElements</code>: <code>CustomElementParam[]</code> - 可选的自定义元素数据</li><li><code>data.forbiddenSweepZones</code>: <code>ZoneParam[]</code> - 可选的禁扫区域数据</li><li><code>data.forbiddenMopZones</code>: <code>ZoneParam[]</code> - 可选的禁拖区域数据</li><li><code>data.virtualWalls</code>: <code>VirtualWallParam[]</code> - 可选的虚拟墙数据</li><li><code>data.detectedObjects</code>: <code>DetectedObjectParam[]</code> - 可选的检测物体数据</li><li><code>runtime</code> - 可选的运行时配置</li></ul><p><strong>返回值</strong>: <a href="/reference/types.html#string"><code>Promise&lt;string&gt;</code></a></p>`,130)])])}const E=i(e,[["render",p]]);export{g as __pageData,E as default};
98
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Promise</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;">&gt;</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>data</code> - 地图数据对象</li><li><code>data.map</code>: <code>string</code> - 地图字符串数据</li><li><code>data.path</code>: <code>string</code> - 可选的路径数据</li><li><code>data.roomProperties</code>: <code>RoomProperty[]</code> - 可选的房间属性数据</li><li><code>data.customElements</code>: <code>CustomElementParam[]</code> - 可选的自定义元素数据</li><li><code>data.forbiddenSweepZones</code>: <code>ZoneParam[]</code> - 可选的禁扫区域数据</li><li><code>data.forbiddenMopZones</code>: <code>ZoneParam[]</code> - 可选的禁拖区域数据</li><li><code>data.virtualWalls</code>: <code>VirtualWallParam[]</code> - 可选的虚拟墙数据</li><li><code>data.detectedObjects</code>: <code>DetectedObjectParam[]</code> - 可选的检测物体数据</li><li><code>runtime</code> - 可选的运行时配置</li></ul><p><strong>返回值</strong>: <a href="/reference/types.html#string"><code>Promise&lt;string&gt;</code></a></p>`,135)])])}const E=i(e,[["render",p]]);export{g as __pageData,E as default};
@@ -1 +1 @@
1
- import{_ as i,c as a,o as n,ag as t}from"./chunks/framework.DRADY2L-.js";const g=JSON.parse('{"title":"地图方法","description":"","frontmatter":{},"headers":[],"relativePath":"reference/methods.md","filePath":"reference/methods.md","lastUpdated":1761277922000}'),e={name:"reference/methods.md"};function p(h,s,l,k,r,o){return n(),a("div",null,[...s[0]||(s[0]=[t("",130)])])}const E=i(e,[["render",p]]);export{g as __pageData,E as default};
1
+ import{_ as i,c as a,o as n,ag as t}from"./chunks/framework.DRADY2L-.js";const g=JSON.parse('{"title":"地图方法","description":"","frontmatter":{},"headers":[],"relativePath":"reference/methods.md","filePath":"reference/methods.md","lastUpdated":1762933966000}'),e={name:"reference/methods.md"};function p(h,s,l,k,r,o){return n(),a("div",null,[...s[0]||(s[0]=[t("",135)])])}const E=i(e,[["render",p]]);export{g as __pageData,E as default};
@@ -0,0 +1,19 @@
1
+ import{_ as i,c as e,o as s,ag as a}from"./chunks/framework.DRADY2L-.js";const g=JSON.parse('{"title":"运行时配置","description":"","frontmatter":{},"headers":[],"relativePath":"reference/runtime.md","filePath":"reference/runtime.md","lastUpdated":1762933966000}'),n={name:"reference/runtime.md"};function t(l,o,r,d,h,c){return s(),e("div",null,[...o[0]||(o[0]=[a(`<h1 id="运行时配置" tabindex="-1">运行时配置 <a class="header-anchor" href="#运行时配置" aria-label="Permalink to &quot;运行时配置&quot;">​</a></h1><p>了解 RobotMap 的运行时配置项,用于控制地图在运行过程中的动态行为和状态。</p><h2 id="使用示例" tabindex="-1">使用示例 <a class="header-anchor" href="#使用示例" aria-label="Permalink to &quot;使用示例&quot;">​</a></h2><p>运行时配置通过 <code>runtime</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
+ <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
+ <span class="line"></span>
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>
5
+ <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (</span></span>
6
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &lt;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">RobotMap</span></span>
7
+ <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> runtime</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{{</span></span>
8
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> showPath: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
9
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> showChargingStation: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
10
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> showRoomName: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
11
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> showRoomProperty: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
12
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> showRoomOrder: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
13
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> enableRoomSelection: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">false</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
14
+ <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // ... 其他运行时配置</span></span>
15
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }}</span></span>
16
+ <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // ... 其他props</span></span>
17
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> /&gt;</span></span>
18
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> )</span></span>
19
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h2 id="dividingroomid" tabindex="-1">dividingRoomId <a class="header-anchor" href="#dividingroomid" aria-label="Permalink to &quot;dividingRoomId&quot;">​</a></h2><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>-1</code></li></ul><p>正在分割的房间ID。</p><p>你可以通过将 <code>dividingRoomId</code> 设置为 <code>-1</code> 来移除分割线。</p><h2 id="enableroomselection" tabindex="-1">enableRoomSelection <a class="header-anchor" href="#enableroomselection" aria-label="Permalink to &quot;enableRoomSelection&quot;">​</a></h2><ul><li><strong>类型</strong>: <code>boolean</code></li><li><strong>默认值</strong>: <code>false</code></li></ul><p>是否启用房间选择功能</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>当 <code>enableRoomSelection</code> 为 <code>false</code> 时,房间会始终处于高亮状态。</p><p>当 <code>enableRoomSelection</code> 为 <code>true</code> 时,房间是否高亮取决于 <code>selectRoomIds</code> 是否包含该房间ID。</p></div><h2 id="enablemapclickcapture" tabindex="-1">enableMapClickCapture <a class="header-anchor" href="#enablemapclickcapture" aria-label="Permalink to &quot;enableMapClickCapture&quot;">​</a></h2><ul><li><strong>类型</strong>: <code>boolean</code></li><li><strong>默认值</strong>: <code>false</code></li></ul><p>是否启用地图点击捕获功能。</p><p>开启地图点击捕获功能后,用户点击地图时会触发 <code>onClickMap</code> 回调。</p><h2 id="editingforbiddensweepzoneids" tabindex="-1">editingForbiddenSweepZoneIds <a class="header-anchor" href="#editingforbiddensweepzoneids" aria-label="Permalink to &quot;editingForbiddenSweepZoneIds&quot;">​</a></h2><ul><li><strong>类型</strong>: <code>string[]</code></li><li><strong>默认值</strong>: <code>[]</code></li></ul><p>正在编辑的禁扫区域ID列表。</p><h2 id="editingforbiddenmopzoneids" tabindex="-1">editingForbiddenMopZoneIds <a class="header-anchor" href="#editingforbiddenmopzoneids" aria-label="Permalink to &quot;editingForbiddenMopZoneIds&quot;">​</a></h2><ul><li><strong>类型</strong>: <code>string[]</code></li><li><strong>默认值</strong>: <code>[]</code></li></ul><p>正在编辑的禁拖区域ID列表。</p><h2 id="editingcleanzoneids" tabindex="-1">editingCleanZoneIds <a class="header-anchor" href="#editingcleanzoneids" aria-label="Permalink to &quot;editingCleanZoneIds&quot;">​</a></h2><ul><li><strong>类型</strong>: <code>string[]</code></li><li><strong>默认值</strong>: <code>[]</code></li></ul><p>正在编辑的清扫区域ID列表。</p><h2 id="editingvirtualwallids" tabindex="-1">editingVirtualWallIds <a class="header-anchor" href="#editingvirtualwallids" aria-label="Permalink to &quot;editingVirtualWallIds&quot;">​</a></h2><ul><li><strong>类型</strong>: <code>string[]</code></li><li><strong>默认值</strong>: <code>[]</code></li></ul><p>正在编辑的虚拟墙ID列表。</p><h2 id="editingspotids" tabindex="-1">editingSpotIds <a class="header-anchor" href="#editingspotids" aria-label="Permalink to &quot;editingSpotIds&quot;">​</a></h2><ul><li><strong>类型</strong>: <code>string[]</code></li><li><strong>默认值</strong>: <code>[]</code></li></ul><p>正在编辑的定点清扫ID列表。</p><h2 id="editingwaypointids" tabindex="-1">editingWayPointIds <a class="header-anchor" href="#editingwaypointids" aria-label="Permalink to &quot;editingWayPointIds&quot;">​</a></h2><ul><li><strong>类型</strong>: <code>string[]</code></li><li><strong>默认值</strong>: <code>[]</code></li></ul><p>正在编辑的途径点ID列表。</p><h2 id="maprotation" tabindex="-1">mapRotation <a class="header-anchor" href="#maprotation" aria-label="Permalink to &quot;mapRotation&quot;">​</a></h2><ul><li><strong>类型</strong>: <code>number</code></li><li><strong>默认值</strong>: <code>0</code></li><li><strong>单位</strong>: <code>度(°)</code></li></ul><p>地图旋转角度。</p><h2 id="roompropertyfoldids" tabindex="-1">roomPropertyFoldIds <a class="header-anchor" href="#roompropertyfoldids" aria-label="Permalink to &quot;roomPropertyFoldIds&quot;">​</a></h2><ul><li><strong>类型</strong>: <code>number[]</code></li><li><strong>默认值</strong>: <code>[]</code></li></ul><p>处于折叠状态的房间ID列表。</p><h2 id="roomselectionmode" tabindex="-1">roomSelectionMode <a class="header-anchor" href="#roomselectionmode" aria-label="Permalink to &quot;roomSelectionMode&quot;">​</a></h2><ul><li><strong>类型</strong>: <code>&#39;checkmark&#39; | &#39;order&#39;</code></li><li><strong>默认值</strong>: <code>&#39;checkmark&#39;</code></li></ul><p>房间选中的指示方式。</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>当 <code>roomSelectionMode</code> 为 <code>&#39;checkmark&#39;</code> 时,房间选中后会显示选择指示器。</p><p>当 <code>roomSelectionMode</code> 为 <code>&#39;order&#39;</code> 时,房间选中后会显示清扫顺序数字。</p></div><h2 id="selectroomids" tabindex="-1">selectRoomIds <a class="header-anchor" href="#selectroomids" aria-label="Permalink to &quot;selectRoomIds&quot;">​</a></h2><ul><li><strong>类型</strong>: <code>number[]</code></li><li><strong>默认值</strong>: <code>[]</code></li></ul><p>选中的房间ID列表。只有当 <code>enableRoomSelection</code> 为 <code>true</code> 时,这个值才会生效。</p><h2 id="showroomproperty" tabindex="-1">showRoomProperty <a class="header-anchor" href="#showroomproperty" aria-label="Permalink to &quot;showRoomProperty&quot;">​</a></h2><ul><li><strong>类型</strong>: <code>boolean</code></li><li><strong>默认值</strong>: <code>false</code></li></ul><p>是否显示房间属性。</p><h2 id="showroomorder" tabindex="-1">showRoomOrder <a class="header-anchor" href="#showroomorder" aria-label="Permalink to &quot;showRoomOrder&quot;">​</a></h2><ul><li><strong>类型</strong>: <code>boolean</code></li><li><strong>默认值</strong>: <code>true</code></li></ul><p>是否显示房间清扫顺序。</p><h2 id="showroomname" tabindex="-1">showRoomName <a class="header-anchor" href="#showroomname" aria-label="Permalink to &quot;showRoomName&quot;">​</a></h2><ul><li><strong>类型</strong>: <code>boolean</code></li><li><strong>默认值</strong>: <code>true</code></li></ul><p>是否显示房间名称。</p><h2 id="showpath" tabindex="-1">showPath <a class="header-anchor" href="#showpath" aria-label="Permalink to &quot;showPath&quot;">​</a></h2><ul><li><strong>类型</strong>: <code>boolean</code></li><li><strong>默认值</strong>: <code>true</code></li></ul><p>是否显示机器人路径。</p><h2 id="showchargingstation" tabindex="-1">showChargingStation <a class="header-anchor" href="#showchargingstation" aria-label="Permalink to &quot;showChargingStation&quot;">​</a></h2><ul><li><strong>类型</strong>: <code>boolean</code></li><li><strong>默认值</strong>: <code>true</code></li></ul><p>是否显示充电桩。</p><h2 id="showroomfloortype" tabindex="-1">showRoomFloorType <a class="header-anchor" href="#showroomfloortype" aria-label="Permalink to &quot;showRoomFloorType&quot;">​</a></h2><ul><li><strong>类型</strong>: <code>boolean</code></li><li><strong>默认值</strong>: <code>true</code></li></ul><p>是否显示房间地板材质。</p><h2 id="showcarpet" tabindex="-1">showCarpet <a class="header-anchor" href="#showcarpet" aria-label="Permalink to &quot;showCarpet&quot;">​</a></h2><ul><li><strong>类型</strong>: <code>boolean</code></li><li><strong>默认值</strong>: <code>true</code></li></ul><p>是否显示地毯。</p><h2 id="showchargingstationring" tabindex="-1">showChargingStationRing <a class="header-anchor" href="#showchargingstationring" aria-label="Permalink to &quot;showChargingStationRing&quot;">​</a></h2><ul><li><strong>类型</strong>: <code>boolean</code></li><li><strong>默认值</strong>: <code>false</code></li></ul><p>是否显示充电桩预警圈。</p><h2 id="showrobotring" tabindex="-1">showRobotRing <a class="header-anchor" href="#showrobotring" aria-label="Permalink to &quot;showRobotRing&quot;">​</a></h2><ul><li><strong>类型</strong>: <code>boolean</code></li><li><strong>默认值</strong>: <code>false</code></li></ul><p>是否显示机器人预警圈。</p><h2 id="showrobotsleepanimation" tabindex="-1">showRobotSleepAnimation <a class="header-anchor" href="#showrobotsleepanimation" aria-label="Permalink to &quot;showRobotSleepAnimation&quot;">​</a></h2><ul><li><strong>类型</strong>: <code>boolean</code></li><li><strong>默认值</strong>: <code>false</code></li></ul><p>是否显示机器人睡眠动画。</p><h2 id="showrobotpulsecircle" tabindex="-1">showRobotPulseCircle <a class="header-anchor" href="#showrobotpulsecircle" aria-label="Permalink to &quot;showRobotPulseCircle&quot;">​</a></h2><ul><li><strong>类型</strong>: <code>boolean</code></li><li><strong>默认值</strong>: <code>false</code></li></ul><p>是否显示机器人脉冲圈(呼吸效果)。</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>机器人脉冲圈会在机器人图标下方显示一个呼吸动画效果,可用于充电等状态的视觉提示。</p></div>`,82)])])}const k=i(n,[["render",t]]);export{g as __pageData,k as default};
@@ -1 +1 @@
1
- import{_ as i,c as s,o as e,ag as a}from"./chunks/framework.DRADY2L-.js";const g=JSON.parse('{"title":"运行时配置","description":"","frontmatter":{},"headers":[],"relativePath":"reference/runtime.md","filePath":"reference/runtime.md","lastUpdated":1762223438000}'),n={name:"reference/runtime.md"};function t(l,o,r,d,h,c){return e(),s("div",null,[...o[0]||(o[0]=[a("",75)])])}const k=i(n,[["render",t]]);export{g as __pageData,k as default};
1
+ import{_ as i,c as e,o as s,ag as a}from"./chunks/framework.DRADY2L-.js";const g=JSON.parse('{"title":"运行时配置","description":"","frontmatter":{},"headers":[],"relativePath":"reference/runtime.md","filePath":"reference/runtime.md","lastUpdated":1762933966000}'),n={name:"reference/runtime.md"};function t(l,o,r,d,h,c){return s(),e("div",null,[...o[0]||(o[0]=[a("",82)])])}const k=i(n,[["render",t]]);export{g as __pageData,k as default};
@@ -1,4 +1,4 @@
1
- import{_ as i,c as a,o as n,ag as p}from"./chunks/framework.DRADY2L-.js";const y=JSON.parse('{"title":"类型定义","description":"","frontmatter":{},"headers":[],"relativePath":"reference/types.md","filePath":"reference/types.md","lastUpdated":1761045125000}'),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>
1
+ import{_ as i,c as a,o as n,ag as p}from"./chunks/framework.DRADY2L-.js";const y=JSON.parse('{"title":"类型定义","description":"","frontmatter":{},"headers":[],"relativePath":"reference/types.md","filePath":"reference/types.md","lastUpdated":1762933966000}'),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>
@@ -50,6 +50,11 @@ import{_ as i,c as a,o as n,ag as p}from"./chunks/framework.DRADY2L-.js";const y
50
50
  <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>
51
51
  <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** 点坐标 */</span></span>
52
52
  <span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> point</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Point</span></span>
53
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h2 id="waypointparam" tabindex="-1">WayPointParam <a class="header-anchor" href="#waypointparam" aria-label="Permalink to &quot;WayPointParam {#waypointparam}&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;"> WayPointParam</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
54
+ <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** 途径点ID */</span></span>
55
+ <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>
56
+ <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** 点坐标 */</span></span>
57
+ <span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> point</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Point</span></span>
53
58
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h2 id="roomproperty" tabindex="-1">RoomProperty <a class="header-anchor" href="#roomproperty" aria-label="Permalink to &quot;RoomProperty {#roomproperty}&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;"> RoomProperty</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
54
59
  <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** 房间ID */</span></span>
55
60
  <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>
@@ -169,4 +174,4 @@ import{_ as i,c as a,o as n,ag as p}from"./chunks/framework.DRADY2L-.js";const y
169
174
  <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>
170
175
  <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** 自定义数据 */</span></span>
171
176
  <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>
172
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div>`,41)])])}const F=i(l,[["render",h]]);export{y as __pageData,F as default};
177
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div>`,44)])])}const F=i(l,[["render",h]]);export{y as __pageData,F as default};
@@ -1 +1 @@
1
- import{_ as i,c as a,o as n,ag as p}from"./chunks/framework.DRADY2L-.js";const y=JSON.parse('{"title":"类型定义","description":"","frontmatter":{},"headers":[],"relativePath":"reference/types.md","filePath":"reference/types.md","lastUpdated":1761045125000}'),l={name:"reference/types.md"};function h(t,s,k,e,r,d){return n(),a("div",null,[...s[0]||(s[0]=[p("",41)])])}const F=i(l,[["render",h]]);export{y as __pageData,F as default};
1
+ import{_ as i,c as a,o as n,ag as p}from"./chunks/framework.DRADY2L-.js";const y=JSON.parse('{"title":"类型定义","description":"","frontmatter":{},"headers":[],"relativePath":"reference/types.md","filePath":"reference/types.md","lastUpdated":1762933966000}'),l={name:"reference/types.md"};function h(t,s,k,e,r,d){return n(),a("div",null,[...s[0]||(s[0]=[p("",44)])])}const F=i(l,[["render",h]]);export{y as __pageData,F as default};
@@ -9,11 +9,11 @@
9
9
  <link rel="preload stylesheet" href="/assets/style.CN_tJoU2.css" as="style">
10
10
  <link rel="preload stylesheet" href="/vp-icons.css" as="style">
11
11
 
12
- <script type="module" src="/assets/app.CAcoFY26.js"></script>
12
+ <script type="module" src="/assets/app.voqo-XmY.js"></script>
13
13
  <link rel="preload" href="/assets/inter-roman-latin.Di8DUHzh.woff2" as="font" type="font/woff2" crossorigin="">
14
- <link rel="modulepreload" href="/assets/chunks/theme.BcL9rPww.js">
14
+ <link rel="modulepreload" href="/assets/chunks/theme.kw_dRkmm.js">
15
15
  <link rel="modulepreload" href="/assets/chunks/framework.DRADY2L-.js">
16
- <link rel="modulepreload" href="/assets/guide_advanced-usage.md.Op4RP3gd.lean.js">
16
+ <link rel="modulepreload" href="/assets/guide_advanced-usage.md.Bt5ROSu8.lean.js">
17
17
  <script id="check-dark-mode">(()=>{const e=localStorage.getItem("vitepress-theme-appearance")||"auto",a=window.matchMedia("(prefers-color-scheme: dark)").matches;(!e||e==="auto"?a:e==="dark")&&document.documentElement.classList.add("dark")})();</script>
18
18
  <script id="check-mac-os">document.documentElement.classList.toggle("mac",/Mac|iPhone|iPod|iPad/i.test(navigator.platform));</script>
19
19
  </head>
@@ -530,7 +530,47 @@
530
530
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> acc[room.id] </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 0</span></span>
531
531
  <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> acc</span></span>
532
532
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }, {}),</span></span>
533
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>这体现了 <code>Tuya Robot Map</code> 纯受控设计的优势,你可以自由主导地图的状态。</p></div><h2 id="检测物体" tabindex="-1">检测物体 <a class="header-anchor" href="#检测物体" aria-label="Permalink to &quot;检测物体&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:#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>
533
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>这体现了 <code>Tuya Robot Map</code> 纯受控设计的优势,你可以自由主导地图的状态。</p></div><h2 id="途径点" tabindex="-1">途径点 <a class="header-anchor" href="#途径点" aria-label="Permalink to &quot;途径点&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:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> React, { useState } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;react&#39;</span></span>
534
+ <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { RobotMap, WayPointParam } </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>
535
+ <span class="line"></span>
536
+ <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">const</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> MapPage</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> () </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
537
+ <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> const</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">wayPoints</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">setWayPoints</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">] </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> useState</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&lt;</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">WayPointParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[]&gt;([])</span></span>
538
+ <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> const</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">editingWayPointIds</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">setEditingWayPointIds</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">] </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> useState</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;">[]&gt;([])</span></span>
539
+ <span class="line"></span>
540
+ <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // 通过点击地图获取的坐标来新增途径点</span></span>
541
+ <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> const</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> handleClickMap</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">point</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Point</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
542
+ <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> id</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> nanoid</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span></span>
543
+ <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> setWayPoints</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">([</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">...</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">wayPoints, { id, point }])</span></span>
544
+ <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> setEditingWayPointIds</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">([id])</span></span>
545
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
546
+ <span class="line"></span>
547
+ <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // 更新途径点坐标</span></span>
548
+ <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> const</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> handleUpdateWayPoint</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">wayPoint</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> WayPointParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
549
+ <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> setWayPoints</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span></span>
550
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> wayPoints.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">map</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">((</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">item</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (item.id </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">===</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> wayPoint.id </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">?</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> wayPoint </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> item)),</span></span>
551
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> )</span></span>
552
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
553
+ <span class="line"></span>
554
+ <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // 点击途径点时切换到编辑状态</span></span>
555
+ <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> const</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> handleClickWayPoint</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">wayPoint</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> WayPointParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
556
+ <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> setEditingWayPointIds</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">([wayPoint.id])</span></span>
557
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
558
+ <span class="line"></span>
559
+ <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (</span></span>
560
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &lt;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">RobotMap</span></span>
561
+ <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> runtime</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{{</span></span>
562
+ <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // 启用地图点击捕获,点击地图时会触发onClickMap回调</span></span>
563
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> enableMapClickCapture: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
564
+ <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // 正在编辑的途径点ID列表</span></span>
565
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> editingWayPointIds,</span></span>
566
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }}</span></span>
567
+ <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> wayPoints</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{wayPoints}</span></span>
568
+ <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onClickMap</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{handleClickMap}</span></span>
569
+ <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onUpdateWayPoint</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{handleUpdateWayPoint}</span></span>
570
+ <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onClickWayPoint</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{handleClickWayPoint}</span></span>
571
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> /&gt;</span></span>
572
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> )</span></span>
573
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h2 id="检测物体" tabindex="-1">检测物体 <a class="header-anchor" href="#检测物体" aria-label="Permalink to &quot;检测物体&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:#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>
534
574
  <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>
535
575
  <span class="line"></span>
536
576
  <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">const</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> MapPage</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> () </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
@@ -644,8 +684,8 @@
644
684
  <span class="line"></span>
645
685
  <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">const</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> MapPage</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> () </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
646
686
  <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &lt;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">RobotMap</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> runtime</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{{ mapRotation: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">90</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }} /&gt;</span></span>
647
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div></div></div></main><footer class="VPDocFooter" data-v-39a288b8 data-v-e257564d><!--[--><!--]--><div class="edit-info" data-v-e257564d><!----><div class="last-updated" data-v-e257564d><p class="VPLastUpdated" data-v-e257564d data-v-e98dd255>最后更新于: <time datetime="2025-11-11T02:20:16.000Z" data-v-e98dd255></time></p></div></div><nav class="prev-next" aria-labelledby="doc-footer-aria-label" data-v-e257564d><span class="visually-hidden" id="doc-footer-aria-label" data-v-e257564d>Pager</span><div class="pager" data-v-e257564d><a class="VPLink link pager-link prev" href="/guide/getting-started.html" data-v-e257564d><!--[--><span class="desc" data-v-e257564d>Previous page</span><span class="title" data-v-e257564d>快速开始</span><!--]--></a></div><div class="pager" data-v-e257564d><!----></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><!----><!--[--><!--]--></div></div>
648
- <script>window.__VP_HASH_MAP__=JSON.parse("{\"guide_advanced-usage.md\":\"Op4RP3gd\",\"guide_concepts.md\":\"CmCisqcF\",\"guide_getting-started.md\":\"BHgQcxq8\",\"index.md\":\"Sm6vD2Gl\",\"reference_callbacks.md\":\"-S6uhkXO\",\"reference_config.md\":\"BCRDz_cF\",\"reference_data.md\":\"B8JfrRhl\",\"reference_methods.md\":\"CO0IvYMn\",\"reference_runtime.md\":\"BMm5Nj3U\",\"reference_types.md\":\"DkIhhJD0\",\"reference_utils.md\":\"CSshxnp0\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"Tuya Robot Map\",\"description\":\"涂鸦扫地机地图组件\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"siteTitle\":\"Tuya Robot Map\",\"outline\":{\"level\":[2,5],\"label\":\"页面导航\"},\"nav\":[{\"text\":\"首页\",\"link\":\"/\"},{\"text\":\"指南\",\"link\":\"/guide/concepts\",\"activeMatch\":\"^/guide/\"},{\"text\":\"参考\",\"link\":\"/reference/data\",\"activeMatch\":\"^/reference/\"}],\"sidebar\":{\"/guide/\":[{\"text\":\"指南\",\"items\":[{\"text\":\"基本概念\",\"link\":\"/guide/concepts\"},{\"text\":\"快速开始\",\"link\":\"/guide/getting-started\"},{\"text\":\"进阶使用\",\"link\":\"/guide/advanced-usage\"}]}],\"/reference/\":[{\"text\":\"组件Props\",\"items\":[{\"text\":\"数据\",\"link\":\"/reference/data\"},{\"text\":\"配置\",\"link\":\"/reference/config\"},{\"text\":\"运行时\",\"link\":\"/reference/runtime\"},{\"text\":\"地图事件回调\",\"link\":\"/reference/callbacks\"}]},{\"text\":\"方法\",\"items\":[{\"text\":\"地图方法\",\"link\":\"/reference/methods\"},{\"text\":\"工具方法\",\"link\":\"/reference/utils\"}]},{\"text\":\"类型定义\",\"items\":[{\"text\":\"类型定义\",\"link\":\"/reference/types\"}]}]},\"search\":{\"provider\":\"local\"},\"lastUpdated\":{\"text\":\"最后更新于\",\"formatOptions\":{\"dateStyle\":\"short\",\"timeStyle\":\"short\"}}},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
687
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div></div></div></main><footer class="VPDocFooter" data-v-39a288b8 data-v-e257564d><!--[--><!--]--><div class="edit-info" data-v-e257564d><!----><div class="last-updated" data-v-e257564d><p class="VPLastUpdated" data-v-e257564d data-v-e98dd255>最后更新于: <time datetime="2025-11-12T07:52:46.000Z" data-v-e98dd255></time></p></div></div><nav class="prev-next" aria-labelledby="doc-footer-aria-label" data-v-e257564d><span class="visually-hidden" id="doc-footer-aria-label" data-v-e257564d>Pager</span><div class="pager" data-v-e257564d><a class="VPLink link pager-link prev" href="/guide/getting-started.html" data-v-e257564d><!--[--><span class="desc" data-v-e257564d>Previous page</span><span class="title" data-v-e257564d>快速开始</span><!--]--></a></div><div class="pager" data-v-e257564d><!----></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><!----><!--[--><!--]--></div></div>
688
+ <script>window.__VP_HASH_MAP__=JSON.parse("{\"guide_advanced-usage.md\":\"Bt5ROSu8\",\"guide_concepts.md\":\"CmCisqcF\",\"guide_getting-started.md\":\"Cpb9H5v0\",\"index.md\":\"Sm6vD2Gl\",\"reference_callbacks.md\":\"DgCt5RdP\",\"reference_config.md\":\"C4_zYqWJ\",\"reference_data.md\":\"DciSLVC8\",\"reference_methods.md\":\"DxIWUIJ-\",\"reference_runtime.md\":\"BA81waFW\",\"reference_types.md\":\"4zpYEKU_\",\"reference_utils.md\":\"CSshxnp0\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"Tuya Robot Map\",\"description\":\"涂鸦扫地机地图组件\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"siteTitle\":\"Tuya Robot Map\",\"outline\":{\"level\":[2,6],\"label\":\"页面导航\"},\"nav\":[{\"text\":\"首页\",\"link\":\"/\"},{\"text\":\"指南\",\"link\":\"/guide/concepts\",\"activeMatch\":\"^/guide/\"},{\"text\":\"参考\",\"link\":\"/reference/data\",\"activeMatch\":\"^/reference/\"}],\"sidebar\":{\"/guide/\":[{\"text\":\"指南\",\"items\":[{\"text\":\"基本概念\",\"link\":\"/guide/concepts\"},{\"text\":\"快速开始\",\"link\":\"/guide/getting-started\"},{\"text\":\"进阶使用\",\"link\":\"/guide/advanced-usage\"}]}],\"/reference/\":[{\"text\":\"组件Props\",\"items\":[{\"text\":\"数据\",\"link\":\"/reference/data\"},{\"text\":\"配置\",\"link\":\"/reference/config\"},{\"text\":\"运行时\",\"link\":\"/reference/runtime\"},{\"text\":\"地图事件回调\",\"link\":\"/reference/callbacks\"}]},{\"text\":\"方法\",\"items\":[{\"text\":\"地图方法\",\"link\":\"/reference/methods\"},{\"text\":\"工具方法\",\"link\":\"/reference/utils\"}]},{\"text\":\"类型定义\",\"items\":[{\"text\":\"类型定义\",\"link\":\"/reference/types\"}]}]},\"search\":{\"provider\":\"local\"},\"lastUpdated\":{\"text\":\"最后更新于\",\"formatOptions\":{\"dateStyle\":\"short\",\"timeStyle\":\"short\"}}},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
649
689
 
650
690
  </body>
651
691
  </html>
@@ -9,9 +9,9 @@
9
9
  <link rel="preload stylesheet" href="/assets/style.CN_tJoU2.css" as="style">
10
10
  <link rel="preload stylesheet" href="/vp-icons.css" as="style">
11
11
 
12
- <script type="module" src="/assets/app.CAcoFY26.js"></script>
12
+ <script type="module" src="/assets/app.voqo-XmY.js"></script>
13
13
  <link rel="preload" href="/assets/inter-roman-latin.Di8DUHzh.woff2" as="font" type="font/woff2" crossorigin="">
14
- <link rel="modulepreload" href="/assets/chunks/theme.BcL9rPww.js">
14
+ <link rel="modulepreload" href="/assets/chunks/theme.kw_dRkmm.js">
15
15
  <link rel="modulepreload" href="/assets/chunks/framework.DRADY2L-.js">
16
16
  <link rel="modulepreload" href="/assets/guide_concepts.md.CmCisqcF.lean.js">
17
17
  <script id="check-dark-mode">(()=>{const e=localStorage.getItem("vitepress-theme-appearance")||"auto",a=window.matchMedia("(prefers-color-scheme: dark)").matches;(!e||e==="auto"?a:e==="dark")&&document.documentElement.classList.add("dark")})();</script>
@@ -21,7 +21,7 @@
21
21
  <div id="app"><div class="Layout" data-v-5d98c3a5><!--[--><!--]--><!--[--><span tabindex="-1" data-v-0b0ada53></span><a href="#VPContent" class="VPSkipLink visually-hidden" data-v-0b0ada53>Skip to content</a><!--]--><!----><header class="VPNav" data-v-5d98c3a5 data-v-ae24b3ad><div class="VPNavBar" data-v-ae24b3ad data-v-6aa21345><div class="wrapper" data-v-6aa21345><div class="container" data-v-6aa21345><div class="title" data-v-6aa21345><div class="VPNavBarTitle has-sidebar" data-v-6aa21345 data-v-1168a8e4><a class="title" href="/" data-v-1168a8e4><!--[--><!--]--><!----><span data-v-1168a8e4>Tuya Robot Map</span><!--[--><!--]--></a></div></div><div class="content" data-v-6aa21345><div class="content-body" data-v-6aa21345><!--[--><!--]--><div class="VPNavBarSearch search" data-v-6aa21345><!--[--><!----><div id="local-search"><button type="button" class="DocSearch DocSearch-Button" aria-label="Search"><span class="DocSearch-Button-Container"><span class="vp-icon DocSearch-Search-Icon"></span><span class="DocSearch-Button-Placeholder">Search</span></span><span class="DocSearch-Button-Keys"><kbd class="DocSearch-Button-Key"></kbd><kbd class="DocSearch-Button-Key">K</kbd></span></button></div><!--]--></div><nav aria-labelledby="main-nav-aria-label" class="VPNavBarMenu menu" data-v-6aa21345 data-v-dc692963><span id="main-nav-aria-label" class="visually-hidden" data-v-dc692963> Main Navigation </span><!--[--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/" tabindex="0" data-v-dc692963 data-v-e56f3d57><!--[--><span data-v-e56f3d57>首页</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink active" href="/guide/concepts.html" tabindex="0" data-v-dc692963 data-v-e56f3d57><!--[--><span data-v-e56f3d57>指南</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/reference/data.html" tabindex="0" data-v-dc692963 data-v-e56f3d57><!--[--><span data-v-e56f3d57>参考</span><!--]--></a><!--]--><!--]--></nav><!----><div class="VPNavBarAppearance appearance" data-v-6aa21345 data-v-6c893767><button class="VPSwitch VPSwitchAppearance" type="button" role="switch" title aria-checked="false" data-v-6c893767 data-v-5337faa4 data-v-1d5665e3><span class="check" data-v-1d5665e3><span class="icon" data-v-1d5665e3><!--[--><span class="vpi-sun sun" data-v-5337faa4></span><span class="vpi-moon moon" data-v-5337faa4></span><!--]--></span></span></button></div><!----><div class="VPFlyout VPNavBarExtra extra" data-v-6aa21345 data-v-bb2aa2f0 data-v-cf11d7a2><button type="button" class="button" aria-haspopup="true" aria-expanded="false" aria-label="extra navigation" data-v-cf11d7a2><span class="vpi-more-horizontal icon" data-v-cf11d7a2></span></button><div class="menu" data-v-cf11d7a2><div class="VPMenu" data-v-cf11d7a2 data-v-b98bc113><!----><!--[--><!--[--><!----><div class="group" data-v-bb2aa2f0><div class="item appearance" data-v-bb2aa2f0><p class="label" data-v-bb2aa2f0>Appearance</p><div class="appearance-action" data-v-bb2aa2f0><button class="VPSwitch VPSwitchAppearance" type="button" role="switch" title aria-checked="false" data-v-bb2aa2f0 data-v-5337faa4 data-v-1d5665e3><span class="check" data-v-1d5665e3><span class="icon" data-v-1d5665e3><!--[--><span class="vpi-sun sun" data-v-5337faa4></span><span class="vpi-moon moon" data-v-5337faa4></span><!--]--></span></span></button></div></div></div><!----><!--]--><!--]--></div></div></div><!--[--><!--]--><button type="button" class="VPNavBarHamburger hamburger" aria-label="mobile navigation" aria-expanded="false" aria-controls="VPNavScreen" data-v-6aa21345 data-v-e5dd9c1c><span class="container" data-v-e5dd9c1c><span class="top" data-v-e5dd9c1c></span><span class="middle" data-v-e5dd9c1c></span><span class="bottom" data-v-e5dd9c1c></span></span></button></div></div></div></div><div class="divider" data-v-6aa21345><div class="divider-line" data-v-6aa21345></div></div></div><!----></header><div class="VPLocalNav has-sidebar empty" data-v-5d98c3a5 data-v-a6f0e41e><div class="container" data-v-a6f0e41e><button class="menu" aria-expanded="false" aria-controls="VPSidebarNav" data-v-a6f0e41e><span class="vpi-align-left menu-icon" data-v-a6f0e41e></span><span class="menu-text" data-v-a6f0e41e>Menu</span></button><div class="VPLocalNavOutlineDropdown" style="--vp-vh:0px;" data-v-a6f0e41e data-v-8a42e2b4><button data-v-8a42e2b4>Return to top</button><!----></div></div></div><aside class="VPSidebar" data-v-5d98c3a5 data-v-319d5ca6><div class="curtain" data-v-319d5ca6></div><nav class="nav" id="VPSidebarNav" aria-labelledby="sidebar-aria-label" tabindex="-1" data-v-319d5ca6><span class="visually-hidden" id="sidebar-aria-label" data-v-319d5ca6> Sidebar Navigation </span><!--[--><!--]--><!--[--><div class="no-transition group" data-v-c40bc020><section class="VPSidebarItem level-0 has-active" data-v-c40bc020 data-v-b3fd67f8><div class="item" role="button" tabindex="0" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><h2 class="text" data-v-b3fd67f8>指南</h2><!----></div><div class="items" data-v-b3fd67f8><!--[--><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/guide/concepts.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>基本概念</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/guide/getting-started.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>快速开始</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/guide/advanced-usage.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>进阶使用</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><!--]--><!--[--><!--]--></nav></aside><div class="VPContent has-sidebar" id="VPContent" data-v-5d98c3a5 data-v-1428d186><div class="VPDoc has-sidebar has-aside" data-v-1428d186 data-v-39a288b8><!--[--><!--]--><div class="container" data-v-39a288b8><div class="aside" data-v-39a288b8><div class="aside-curtain" data-v-39a288b8></div><div class="aside-container" data-v-39a288b8><div class="aside-content" data-v-39a288b8><div class="VPDocAside" data-v-39a288b8 data-v-3f215769><!--[--><!--]--><!--[--><!--]--><nav aria-labelledby="doc-outline-aria-label" class="VPDocAsideOutline" data-v-3f215769 data-v-a5bbad30><div class="content" data-v-a5bbad30><div class="outline-marker" data-v-a5bbad30></div><div aria-level="2" class="outline-title" id="doc-outline-aria-label" role="heading" data-v-a5bbad30>页面导航</div><ul class="VPDocOutlineItem root" data-v-a5bbad30 data-v-b933a997><!--[--><!--]--></ul></div></nav><!--[--><!--]--><div class="spacer" data-v-3f215769></div><!--[--><!--]--><!----><!--[--><!--]--><!--[--><!--]--></div></div></div></div><div class="content" data-v-39a288b8><div class="content-container" data-v-39a288b8><!--[--><!--]--><main class="main" data-v-39a288b8><div style="position:relative;" class="vp-doc _guide_concepts" data-v-39a288b8><div><h1 id="基本概念" tabindex="-1">基本概念 <a class="header-anchor" href="#基本概念" aria-label="Permalink to &quot;基本概念&quot;">​</a></h1><p>了解 Tuya Robot Map 的核心概念。</p><h2 id="核心组件" tabindex="-1">核心组件 <a class="header-anchor" href="#核心组件" aria-label="Permalink to &quot;核心组件&quot;">​</a></h2><p>后续文档中,我们会使用 <code>RobotMap</code> 组件作为示例,你可以根据实际需求选择使用 <code>RobotMap</code> 或 <code>RjsRobotMap</code> 组件。</p><h3 id="robotmap-组件" tabindex="-1">RobotMap 组件 <a class="header-anchor" href="#robotmap-组件" aria-label="Permalink to &quot;RobotMap 组件&quot;">​</a></h3><p>React 地图组件,提供完整的地图渲染和交互功能:</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 style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> /&gt;</span></span></code></pre></div><div class="tip custom-block"><p class="custom-block-title">TIP</p><ul><li><p><code>RobotMap</code> 组件是基于 <a href="https://developer.tuya.com/cn/miniapp/develop/ray/component/open/web-view" target="_blank" rel="noreferrer">WebView</a> 开发的,开发前请详细阅读<a href="https://developer.tuya.com/cn/miniapp/develop/miniapp/component/native-component/native-component" target="_blank" rel="noreferrer">原生组件说明</a>。</p></li><li><p><code>RobotMap</code> 默认铺满全屏,适用于<strong>首页实时地图</strong>等场景,一个页面只能有一个 <code>RobotMap</code> 组件。</p></li><li><p>需要在小程序<code>global.config.ts</code>中配置<code>webviewRoot</code>让小程序能够正确加载<code>RobotMap</code>的资源。</p></li></ul><div class="language-json vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">json</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>
22
22
  <span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;webviewRoot&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;node_modules/@ray-js/robot-map-sdk/dist-app&quot;</span></span>
23
23
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div></div><h3 id="rjsrobotmap-组件" tabindex="-1">RjsRobotMap 组件 <a class="header-anchor" href="#rjsrobotmap-组件" aria-label="Permalink to &quot;RjsRobotMap 组件&quot;">​</a></h3><p>基于Rjs开发的地图组件,它拥有和 <code>RobotMap</code> 组件相同的Props。</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;">RjsRobotMap</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> /&gt;</span></span></code></pre></div><div class="tip custom-block"><p class="custom-block-title">TIP</p><p><code>RjsRobotMap</code> 基于 <a href="https://developer.tuya.com/cn/miniapp/develop/ray/framework/render" target="_blank" rel="noreferrer">Rjs</a> 开发,它没有原生组件的限制,一个页面可以有多个 <code>RjsRobotMap</code> 组件。适用于<strong>多地图</strong>、<strong>弹窗里的地图</strong> 等场景。</p></div><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>引入 <code>RjsRobotMap</code> 对页面加载速度有一定影响。如无必要场景,我们建议始终使用 <code>RobotMap</code> 组件。</p></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>地图原点是扫地机器人运行过程中确定的参考点,地图上的元素都是基于这个原点计算的相对位置。</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>地图原点本身是相对于地图左上角来定位的。例如在一张100 x 100(宽 x 高)的 地图中,如果原点坐标是(20, 80),表示原点位于相对于地图左上角(20, 80)的位置。</p></div><h3 id="机器坐标系" tabindex="-1">机器坐标系 <a class="header-anchor" href="#机器坐标系" aria-label="Permalink to &quot;机器坐标系&quot;">​</a></h3><p>机器坐标系是机器人运行过程中使用的笛卡尔坐标系(Cartesian coordinate system),以地图原点为中心(0, 0),X轴向上为正方向,Y轴向右为正方向。地图上所有元素的坐标都在这个坐标系下计算相对位置。</p><p>例如:</p><ul><li>充电桩</li><li>清扫路径 (含机器人位置)</li><li>虚拟墙</li><li>禁区</li><li>清扫区域</li><li>分割线</li><li>其他自定义元素</li><li>...</li></ul><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>本文档中,如果未特别说明,涉及到的坐标均指机器坐标系。</p></div></div></div></main><footer class="VPDocFooter" data-v-39a288b8 data-v-e257564d><!--[--><!--]--><div class="edit-info" data-v-e257564d><!----><div class="last-updated" data-v-e257564d><p class="VPLastUpdated" data-v-e257564d data-v-e98dd255>最后更新于: <time datetime="2025-11-03T13:28:07.000Z" data-v-e98dd255></time></p></div></div><nav class="prev-next" aria-labelledby="doc-footer-aria-label" data-v-e257564d><span class="visually-hidden" id="doc-footer-aria-label" data-v-e257564d>Pager</span><div class="pager" data-v-e257564d><!----></div><div class="pager" data-v-e257564d><a class="VPLink link pager-link next" href="/guide/getting-started.html" data-v-e257564d><!--[--><span class="desc" data-v-e257564d>Next page</span><span class="title" data-v-e257564d>快速开始</span><!--]--></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><!----><!--[--><!--]--></div></div>
24
- <script>window.__VP_HASH_MAP__=JSON.parse("{\"guide_advanced-usage.md\":\"Op4RP3gd\",\"guide_concepts.md\":\"CmCisqcF\",\"guide_getting-started.md\":\"BHgQcxq8\",\"index.md\":\"Sm6vD2Gl\",\"reference_callbacks.md\":\"-S6uhkXO\",\"reference_config.md\":\"BCRDz_cF\",\"reference_data.md\":\"B8JfrRhl\",\"reference_methods.md\":\"CO0IvYMn\",\"reference_runtime.md\":\"BMm5Nj3U\",\"reference_types.md\":\"DkIhhJD0\",\"reference_utils.md\":\"CSshxnp0\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"Tuya Robot Map\",\"description\":\"涂鸦扫地机地图组件\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"siteTitle\":\"Tuya Robot Map\",\"outline\":{\"level\":[2,5],\"label\":\"页面导航\"},\"nav\":[{\"text\":\"首页\",\"link\":\"/\"},{\"text\":\"指南\",\"link\":\"/guide/concepts\",\"activeMatch\":\"^/guide/\"},{\"text\":\"参考\",\"link\":\"/reference/data\",\"activeMatch\":\"^/reference/\"}],\"sidebar\":{\"/guide/\":[{\"text\":\"指南\",\"items\":[{\"text\":\"基本概念\",\"link\":\"/guide/concepts\"},{\"text\":\"快速开始\",\"link\":\"/guide/getting-started\"},{\"text\":\"进阶使用\",\"link\":\"/guide/advanced-usage\"}]}],\"/reference/\":[{\"text\":\"组件Props\",\"items\":[{\"text\":\"数据\",\"link\":\"/reference/data\"},{\"text\":\"配置\",\"link\":\"/reference/config\"},{\"text\":\"运行时\",\"link\":\"/reference/runtime\"},{\"text\":\"地图事件回调\",\"link\":\"/reference/callbacks\"}]},{\"text\":\"方法\",\"items\":[{\"text\":\"地图方法\",\"link\":\"/reference/methods\"},{\"text\":\"工具方法\",\"link\":\"/reference/utils\"}]},{\"text\":\"类型定义\",\"items\":[{\"text\":\"类型定义\",\"link\":\"/reference/types\"}]}]},\"search\":{\"provider\":\"local\"},\"lastUpdated\":{\"text\":\"最后更新于\",\"formatOptions\":{\"dateStyle\":\"short\",\"timeStyle\":\"short\"}}},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
24
+ <script>window.__VP_HASH_MAP__=JSON.parse("{\"guide_advanced-usage.md\":\"Bt5ROSu8\",\"guide_concepts.md\":\"CmCisqcF\",\"guide_getting-started.md\":\"Cpb9H5v0\",\"index.md\":\"Sm6vD2Gl\",\"reference_callbacks.md\":\"DgCt5RdP\",\"reference_config.md\":\"C4_zYqWJ\",\"reference_data.md\":\"DciSLVC8\",\"reference_methods.md\":\"DxIWUIJ-\",\"reference_runtime.md\":\"BA81waFW\",\"reference_types.md\":\"4zpYEKU_\",\"reference_utils.md\":\"CSshxnp0\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"Tuya Robot Map\",\"description\":\"涂鸦扫地机地图组件\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"siteTitle\":\"Tuya Robot Map\",\"outline\":{\"level\":[2,6],\"label\":\"页面导航\"},\"nav\":[{\"text\":\"首页\",\"link\":\"/\"},{\"text\":\"指南\",\"link\":\"/guide/concepts\",\"activeMatch\":\"^/guide/\"},{\"text\":\"参考\",\"link\":\"/reference/data\",\"activeMatch\":\"^/reference/\"}],\"sidebar\":{\"/guide/\":[{\"text\":\"指南\",\"items\":[{\"text\":\"基本概念\",\"link\":\"/guide/concepts\"},{\"text\":\"快速开始\",\"link\":\"/guide/getting-started\"},{\"text\":\"进阶使用\",\"link\":\"/guide/advanced-usage\"}]}],\"/reference/\":[{\"text\":\"组件Props\",\"items\":[{\"text\":\"数据\",\"link\":\"/reference/data\"},{\"text\":\"配置\",\"link\":\"/reference/config\"},{\"text\":\"运行时\",\"link\":\"/reference/runtime\"},{\"text\":\"地图事件回调\",\"link\":\"/reference/callbacks\"}]},{\"text\":\"方法\",\"items\":[{\"text\":\"地图方法\",\"link\":\"/reference/methods\"},{\"text\":\"工具方法\",\"link\":\"/reference/utils\"}]},{\"text\":\"类型定义\",\"items\":[{\"text\":\"类型定义\",\"link\":\"/reference/types\"}]}]},\"search\":{\"provider\":\"local\"},\"lastUpdated\":{\"text\":\"最后更新于\",\"formatOptions\":{\"dateStyle\":\"short\",\"timeStyle\":\"short\"}}},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
25
25
 
26
26
  </body>
27
27
  </html>