### ExampleSimpleEventPage 代码
```jsx
import React, {Component} from 'react'
import './CommonExample.css'
import {GIS} from "iclient3d-plot-diy";
import {Button} from "antd";
export default class ExampleSimpleEventPage extends Component {
drawOps = [];
constructor(props) {
super(props);
this.state = {
htmlString: '
正在加载中...
',
};
}
componentDidMount() {
this.showData();
fetch('./example/ExampleSimpleEventPage.md')
.then(response => response.text())
.then(mdText => {
this.setState({htmlString: window.marked.parse(mdText)});
});
//监听拨盘事件
this.mapFunction.mapApiService.showDrawDatas([{
code: 'asdladjakl',
bz: true,
bzColor: '#e000ff',
bzLineColor: '#ff0000',
bzlx: 'simple',
jbwb: 'R:00017',
type: "2002",
returnHeight: true,
useModify: false,
lon: 102.33054539488224,
lat: 31.005468100060593,
height: 0,
points: [],
iconSize: [[20, 20], [30, 30], [40, 40]]
}, {
type: 'yhqy',
code: 'xxcxvawda',
points: [{lon: 102.642853926199, lat: 31.012509646376447, height: 0},
{lon: 102.65927322610115, lat: 31.01540811637356, height: 0},
{lon: 102.66192135373299, lat: 31.005988487769518, height: 0},
{lon: 102.64755620178961, lat: 31.00246196283815, height: 0},
{lon: 102.642853926199, lat: 31.012509646376447, height: 0}],
useModify: false,
}])
}
showData() {
// 左击 如果需要dom时的监听
this.mapFunction.addEventListener((id, overlay, primitive, data) => {
alert('gis组件的左击事件:' + id);
}, this);
// 左击如果需要底层对象的监听
this.mapFunction.mapClickEvent.addEventListener((id, primitive, isPoint) => {
console.log(id, primitive, isPoint);
alert('左击事件:' + id);
}, this);
// 右键监听
this.mapFunction.mapApiService.mapRightClickEvent.addEventListener((id, primitive, isPoint) => {
console.log(id, primitive, isPoint);
alert('右击事件' + id);
}, this);
}
drawPolygon() {
//监听拨盘事件
this.mapFunction.mapApiService.draw({
code: 'xxcx_new_',
type: 'yhqy',
useModify: true,
});
}
render() {
return (
自定义事件
{
this.mapFunction = e
}}
plotUrl={this.state.plotUrl}
mapRef={this}
showDefaultLayer={true}
/>
)
}
}
```