sbjw
18 hours ago 6f475ec20efbbb91d5d3d012284eeaa5b0a0bab0
src/example/ExamplePage.js
@@ -2,12 +2,11 @@
import './ExamplePage.css'
import {NavLink} from "react-router-dom";
import "./ExampleLayerPage.css";
import {Button, Input} from "antd";
import {Button, Input, Checkbox} from "antd";
import {updateLanguage} from "iclient3d-plot-diy";
;
export default class ExamplePage extends Component {
export class ExamplePage extends Component {
    constructor(props) {
        super(props);
        this.state = {
@@ -16,6 +15,7 @@
            imageUrl: localStorage.getItem('plot_image') || '',
            demUrl: localStorage.getItem('plot_dem') || '',
            addressSearchUrl: localStorage.getItem('addressSearchUrl') || '',
            sctValue: 'true' === (localStorage.getItem('plot_dem_sct') || 'true'),
        };
    }
@@ -35,6 +35,11 @@
    updateDemUrl(event) {
        localStorage.setItem('plot_dem', this.state.demUrl || '');
        alert('plotUrl服务地址设置成功');
    }
    updateSctValue(event) {
        localStorage.setItem('plot_dem_sct', this.state.sctValue + '');
        alert('sctValue设置成功');
    }
    updateAddressSearchUrl(event) {
@@ -74,6 +79,17 @@
                    <li><NavLink to='/example/defaultSelect'>初始化事件</NavLink></li>
                    <li><NavLink to='/example/fly'>飞行</NavLink></li>
                    <li><NavLink to='/example/dynamicBlc'>动态比例尺</NavLink></li>
                    <li><NavLink to='/example/simpleEvent'>简单事件</NavLink></li>
                    <li><NavLink to='/example/aggregator'>自动聚合</NavLink></li>
                    <li><NavLink to='/example/defaultMap2d'>默认2D</NavLink></li>
                    <li><NavLink to='/example/getPoints'>动态获取坐标</NavLink></li>
                    <li><NavLink to='/example/select'>军标选择</NavLink></li>
                    <li><NavLink to='/example/xzxx'>选中、X图标</NavLink></li>
                    <li><NavLink to='/example/htmlBoard'>Html标牌</NavLink></li>
                    <li><NavLink to='/example/map2dDrawUpdate'>2d画图更新</NavLink></li>
                    <li><NavLink to='/example/blink'>闪烁</NavLink></li>
                    <li><NavLink to='/example/dydraw'>移动式</NavLink></li>
                    <li><NavLink to='/example/dy2draw'>移动式2</NavLink></li>
                </ul>
                <div className={"button_wrapper"}>
@@ -104,7 +120,16 @@
                            defaultValue={this.state['demUrl']}
                            onChange={(v) => this.setState({demUrl: v.target.value})}
                        />
                        <Button type="primary" onClick={this.updateDemUrl.bind(this)}>设置</Button>
                        <Checkbox
                            style={{marginLeft: '10px'}}
                            checked={this.state.sctValue}
                            onChange={(e) => this.setState({sctValue: e.target.checked})}
                        ></Checkbox>Sct
                        <Button type="primary" onClick={() => {
                            this.updateDemUrl();
                            this.updateSctValue();
                        }}>设置</Button>
                    </Input.Group>
                    <br/>