From c6bec252e4cf12a0c1e9a7da55d5953717715294 Mon Sep 17 00:00:00 2001
From: sbjw <sbjw.happy@163.com>
Date: Fri, 05 Dec 2025 03:59:21 +0000
Subject: [PATCH] 同步更新1.0.32版本
---
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