We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
0.2.7
macOS/Safari
class AMapboxViz extends React.Component { constructor(props){ super(props); const markers = this.props.locations; this.state={ useCluster: true, }; this.state = { markers }; } render(){ return ( <Map amapkey={'ba035e10b09acfc492d168adfd1b97cb'} center={{longitude: 110, latitude: 40}} zoom={5} > <Markers markers={this.state.markers} useCluster={this.state.useCluster} /> </Map> ); } }
function amapbox(slice, json){ const div = d3.select(slice.selector); div.selectAll('*').remove(); ReactDOM.render( <AMapboxViz {...json.data} />, div.node(), ); }
显示的地图的marker会cluster成圆圈。
仅显示了markers,并没有cluster起来。
The text was updated successfully, but these errors were encountered:
好吧 是由于constructor内两个紧接着的this.state={},第二个把第一个overwrite了。
Sorry, something went wrong.
No branches or pull requests
react-amap version
0.2.7
OS/Browers version
macOS/Safari
Reproduction Link
Steps to reproduce
What is Expected?
显示的地图的marker会cluster成圆圈。
What is actually happening?
仅显示了markers,并没有cluster起来。
The text was updated successfully, but these errors were encountered: