| | |
| | | ```jsx |
| | | import React, {Component} from 'react' |
| | | import './ExampleDrawPage.css' |
| | | import {GIS} from "../iclient3d-plot-diy"; |
| | | import {GIS} from "iclient3d-plot-diy"; |
| | | |
| | | ; |
| | | import {Button} from "antd"; |
| | |
| | | super(props); |
| | | this.state = { |
| | | htmlString: '<h3>正在加载中...</h3>', |
| | | scale: 0 |
| | | }; |
| | | } |
| | | |
| | |
| | | this.setState({htmlString: window.marked.parse(mdText)}); |
| | | }); |
| | | //监听拨盘事件 |
| | | this.mapFunction.addScaleListener((scale) => { |
| | | this.setState({scale: scale}); |
| | | }) |
| | | } |
| | | |
| | | showData() { |
| | |
| | | <Button type="primary" onClick={() => this.setCameraHeightByScale(2500)}>1:2500</Button> |
| | | <Button type="primary" onClick={() => this.setCameraHeightByScale(10000)}>1:10000</Button> |
| | | <Button type="primary" onClick={() => this.setCameraHeightByScale(50000)}>1:50000</Button> |
| | | <span>当前比例尺: {this.state.scale}</span> |
| | | <div className={"code_wrapper"}> |
| | | <div dangerouslySetInnerHTML={{__html: this.state.htmlString}}></div> |
| | | </div> |