From 5159b1f9f30ea4135afb1542ad5b454907a68698 Mon Sep 17 00:00:00 2001
From: sbjw <sbjw.happy@163.com>
Date: Mon, 19 Jan 2026 01:52:29 +0000
Subject: [PATCH] 默认显示

---
 src/example/ExampleDrawPage.js |   19 +++++++++++++++----
 1 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/src/example/ExampleDrawPage.js b/src/example/ExampleDrawPage.js
index e9a1f61..84064b1 100644
--- a/src/example/ExampleDrawPage.js
+++ b/src/example/ExampleDrawPage.js
@@ -1,6 +1,6 @@
 import React, {Component} from 'react'
 import './ExampleDrawPage.css'
-import {GIS} from "../iclient3d-plot-diy";
+import {GIS} from "iclient3d-plot-diy";
 
 ;
 import {Button} from "antd";
@@ -10,6 +10,7 @@
 
     optionObjs = {
         "目标简标": {
+            code: '123123',
             bz: true,
             bzlx: 'simple',
             jbwb: 'R:00017',
@@ -35,7 +36,7 @@
             bz: true,
             bzlx: 'simple',
             jbwb: "P:00019",
-            type: "fx",
+            type: "2010",
             useModify: false,
             lon: 102.76054539488224, lat: 31.000468100060593, height: 0,
             points: [{lon: 102.76554539488224, lat: 31.000468100060593, height: 0}, {
@@ -50,7 +51,7 @@
             bzlx: 'detail',
             jbwb: 'P:00019',
             xbwb: "F16-1\n美国\n16:45:56\nR:00019\nC:00019",
-            type: "fx",
+            type: "2010",
             useModify: false,
             lon: 102.73054539488224, lat: 31.001068100060593, height: 0,
             points: [{lon: 102.73554539488224, lat: 31.001068100060593, height: 0}, {
@@ -239,6 +240,7 @@
             .then(mdText => {
                 this.setState({htmlString: window.marked.parse(mdText)});
             });
+        this.showOptions();
     }
 
     showOptions = () => {
@@ -251,6 +253,10 @@
         }
     };
 
+    showOptions2 = () => {
+        this.mapFunction.mapApiService.showDrawDatas([this.optionObjs['目标简标']]);
+    }
+
 
     async draw(option) {
         this.closeUpdate();
@@ -259,7 +265,10 @@
         delete option.lon;
         delete option.lat;
         delete option.height;
-        let p = await this.mapFunction.mapApiService.draw(option)
+        let p = await this.mapFunction.mapApiService.draw(option);
+        p.drawEnd.subscribe(value => {
+            // alert(p.export());
+        })
         this.drawOps.push(p);
     }
 
@@ -404,12 +413,14 @@
                             this.mapFunction = e
                         }
                     }
+                         useSvgIcon={true}
                          iconScales={[[0, 2000], [2000, 10000], [10000, 5000000]]}
                          plotUrl={this.state.plotUrl}
                          mapRef={this}
                          showDefaultLayer={true}
                     />
                 </div>
+                <Button type="primary" onClick={this.showOptions2.bind(this)}>2222</Button>
                 <Button type="primary" onClick={this.showOptions.bind(this)}>显示已有标绘数据</Button>
                 {buttons}
                 <Button type="primary" onClick={this.export.bind(this)}>导出绘制配置</Button>

--
Gitblit v1.9.3