ExampleHightLightLocatePage 代码
import React, {Component} from 'react'
import './ExampleDrawPage.css'
import {GIS} from "iclient3d-plot-diy";
import {Button} from "antd";
export default class ExampleHightLightLocatePage extends Component {
constructor(props) {
super(props);
this.state = {
htmlString: '<h3>正在加载中...</h3>',
};
}
componentDidMount() {
fetch('./example/ExampleHightLightLocatePage.md')
.then(response => response.text())
.then(mdText => {
this.setState({htmlString: window.marked.parse(mdText)});
});
}
render() {
return (
<div className={"example_draw_container"}>
<h3>军标绘制拨盘功能</h3>
<div className={"map_wrapper"}>
<GIS refs={
e => {
this.mapFunction = e
}
}
plotUrl={this.state.plotUrl}
mapRef={this}
showDefaultLayer={false}
/>
</div>
<Button type="primary" onClick={() => this.draw()}>高亮点</Button>
<Button type="primary" onClick={() => this.draw()}>高亮线</Button>
<Button type="primary" onClick={() => this.draw()}>高亮面</Button>
<Button type="primary" onClick={() => this.export()}>定位点</Button>
<Button type="primary" onClick={() => this.export()}>定位线</Button>
<Button type="primary" onClick={() => this.export()}>定位面</Button>
<div className={"code_wrapper"}>
<div dangerouslySetInnerHTML={{__html: this.state.htmlString}}></div>
</div>
</div>
)
}
}