Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

自定义覆盖物,被清除时报错。 #105

Closed
fukai2952 opened this issue Apr 12, 2019 · 0 comments · Fixed by #111
Closed

自定义覆盖物,被清除时报错。 #105

fukai2952 opened this issue Apr 12, 2019 · 0 comments · Fixed by #111

Comments

@fukai2952
Copy link

import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import {
Map,
Overlay,
CustomOverlay as Custom,
Base,
} from 'rc-bmap';

const { Point } = Base;

@Custom
class CustomOverlay extends Component {
render() {
return (

这是一个自定义图层

);
}
}

class Example extends React.Component {

state={show:true}
componentWillMount()
{
setTimeout(()=>{
this.setState({show:false})
},5000)
}
render() {
return (
<div style={{ height: '100vh' }}>


{
this.state.show ?



:null
}


);
}
}

ReactDOM.render(
,
document.getElementById('root'),
);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant