From 8bda1f7325f3a990e0e96304cc14959047098fc0 Mon Sep 17 00:00:00 2001
From: sbjw <sbjw.happy@163.com>
Date: Mon, 10 Nov 2025 09:20:30 +0000
Subject: [PATCH] 增加相关样例

---
 public/example/ExampleGetPointsPage.md |   52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 52 insertions(+), 0 deletions(-)

diff --git a/public/example/ExampleGetPointsPage.md b/public/example/ExampleGetPointsPage.md
index d75c6fd..14d2099 100644
--- a/public/example/ExampleGetPointsPage.md
+++ b/public/example/ExampleGetPointsPage.md
@@ -36,6 +36,54 @@
             this.mapFunction.mapApiService.removeDraw(p.code);
         })
     }
+    async getBox() {
+
+        let p = await this.mapFunction.mapApiService.draw({
+            type: "box",
+        });
+        p.drawEnd.subscribe(value => {
+            let c = p.export();
+            alert(JSON.stringify(c.points));
+            this.mapFunction.mapApiService.removeDraw(p.code);
+            this.mapFunction.mapApiService.showDrawDatas([c])
+        })
+    }
+    async getLine() {
+
+        let p = await this.mapFunction.mapApiService.draw({
+            type: "line",
+        });
+        p.drawEnd.subscribe(value => {
+            let c = p.export();
+            alert(JSON.stringify(c.points));
+            this.mapFunction.mapApiService.removeDraw(p.code);
+            this.mapFunction.mapApiService.showDrawDatas([c])
+        })
+    }
+    async getPolygon() {
+
+        let p = await this.mapFunction.mapApiService.draw({
+            type: "polygon",
+        });
+        p.drawEnd.subscribe(value => {
+            let c = p.export();
+            alert(JSON.stringify(c.points));
+            this.mapFunction.mapApiService.removeDraw(p.code);
+            this.mapFunction.mapApiService.showDrawDatas([c])
+        })
+    }
+    async getCircle() {
+
+        let p = await this.mapFunction.mapApiService.draw({
+            type: "circle",
+        });
+        p.drawEnd.subscribe(value => {
+            let c = p.export();
+            alert(JSON.stringify(c.points));
+            this.mapFunction.mapApiService.removeDraw(p.code);
+            this.mapFunction.mapApiService.showDrawDatas([c])
+        })
+    }
 
     render() {
         return (
@@ -53,6 +101,10 @@
                     />
                 </div>
                 <Button type="primary" onClick={this.getPoints.bind(this)}>获取坐标点</Button>
+                <Button type="primary" onClick={this.getBox.bind(this)}>获取box</Button>
+                <Button type="primary" onClick={this.getLine.bind(this)}>获取线</Button>
+                <Button type="primary" onClick={this.getPolygon.bind(this)}>获取面</Button>
+                <Button type="primary" onClick={this.getCircle.bind(this)}>获取圆</Button>
                 <div className={"code_wrapper"}>
                     <div dangerouslySetInnerHTML={{__html: this.state.htmlString}}></div>
                 </div>

--
Gitblit v1.9.3