| | |
| | | import {NavLink} from "react-router-dom"; |
| | | import "./ExampleLayerPage.css"; |
| | | import {Button, Input} from "antd"; |
| | | import {updateLanguage} from "../iclient3d-plot-diy"; |
| | | import {updateLanguage} from "iclient3d-plot-diy"; |
| | | |
| | | ; |
| | | |
| | | export default class ExamplePage extends Component { |
| | | constructor(props) { |
| | |
| | | plotLanguage: localStorage.getItem('plot_language') || '', |
| | | imageUrl: localStorage.getItem('plot_image') || '', |
| | | demUrl: localStorage.getItem('plot_dem') || '', |
| | | addressSearchUrl: localStorage.getItem('addressSearchUrl') || '', |
| | | }; |
| | | } |
| | | |
| | |
| | | |
| | | updateDemUrl(event) { |
| | | localStorage.setItem('plot_dem', this.state.demUrl || ''); |
| | | alert('plotUrl服务地址设置成功'); |
| | | } |
| | | |
| | | updateAddressSearchUrl(event) { |
| | | localStorage.setItem('addressSearchUrl', this.state.addressSearchUrl || ''); |
| | | alert('plotUrl服务地址设置成功'); |
| | | } |
| | | |
| | |
| | | <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> |
| | | </ul> |
| | | <div className={"button_wrapper"}> |
| | | |
| | |
| | | <Button type="primary" onClick={this.updateDemUrl.bind(this)}>设置</Button> |
| | | </Input.Group> |
| | | <br/> |
| | | |
| | | <span>公共地址查询URL:</span> |
| | | <Input.Group compact> |
| | | <Input |
| | | placeholder={'公共地址查询URL'} |
| | | defaultValue={this.state['addressSearchUrl']} |
| | | onChange={(v) => this.setState({addressSearchUrl: v.target.value})} |
| | | /> |
| | | <Button type="primary" onClick={this.updateAddressSearchUrl.bind(this)}>设置</Button> |
| | | </Input.Group> |
| | | <br/> |
| | | <span>公共语言:</span> |
| | | <Button type="primary" onClick={this.updateLanguage1.bind(this)}>中文</Button> |
| | | <Button type="primary" onClick={this.updateLanguage2.bind(this)}>英文</Button> |