From 76dd488c026c17c0aa3dda4c401a4b7893d02214 Mon Sep 17 00:00:00 2001
From: sbjw <sbjw.happy@163.com>
Date: Fri, 17 Oct 2025 08:52:29 +0000
Subject: [PATCH] 更新包同步到1.0.26
---
src/example/ExampleGetPointsPage.js | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 60 insertions(+), 0 deletions(-)
diff --git a/src/example/ExampleGetPointsPage.js b/src/example/ExampleGetPointsPage.js
new file mode 100644
index 0000000..87b8e62
--- /dev/null
+++ b/src/example/ExampleGetPointsPage.js
@@ -0,0 +1,60 @@
+import React, {Component} from 'react'
+import './ExampleDrawPage.css'
+import {GIS} from "iclient3d-plot-diy";
+import {Button} from "antd";
+
+
+export default class ExampleGetPointsPage extends Component {
+
+ constructor(props) {
+ super(props);
+ this.state = {
+ htmlString: '<h3>正在加载中...</h3>',
+ };
+ }
+
+ componentDidMount() {
+ fetch('./example/ExampleGetPointsPage.md')
+ .then(response => response.text())
+ .then(mdText => {
+ this.setState({htmlString: window.marked.parse(mdText)});
+ });
+ }
+
+ async getPoints() {
+
+ let p = await this.mapFunction.mapApiService.draw({
+ type: "0",
+ });
+ p.drawEnd.subscribe(value => {
+ let c = p.export();
+ alert(`lon: ${c.lon}, lat: ${c.lat}, height: ${c.height}`);
+ this.mapFunction.mapApiService.removeDraw(p.code);
+ })
+ }
+
+ render() {
+ return (
+ <div className={"example_draw_container"}>
+ <h3>军标绘制拨盘功能</h3>
+ <div className={"map_wrapper"}>
+ <GIS refs={
+ e => {
+ this.mapFunction = e
+ }
+ }
+ plotUrl={this.state.plotUrl}
+ mapRef={this}
+ showDefaultLayer={false}
+ />
+ </div>
+ <Button type="primary" onClick={this.getPoints.bind(this)}>获取坐标点</Button>
+ <div className={"code_wrapper"}>
+ <div dangerouslySetInnerHTML={{__html: this.state.htmlString}}></div>
+ </div>
+ </div>
+ )
+ }
+}
+
+
--
Gitblit v1.9.3