| | |
| | | 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 = { |
| | |
| | | imageUrl: localStorage.getItem('plot_image') || '', |
| | | demUrl: localStorage.getItem('plot_dem') || '', |
| | | addressSearchUrl: localStorage.getItem('addressSearchUrl') || '', |
| | | sctValue: 'true' === (localStorage.getItem('plot_dem_sct') || 'true'), |
| | | }; |
| | | } |
| | | |
| | |
| | | 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) { |
| | |
| | | <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"}> |
| | | |
| | |
| | | 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/> |
| | | |