huiyan-fe / react-bmap

基于百度地图JavaScript API封装的React组件库

Home Page:http://huiyan-fe.github.io/react-bmap

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MapvLayer options={{draw: 'cluster'}}报错

Y-sen opened this issue · comments

commented

你好,问一下

<MapvLayer data={this.state.dataSet} options={{ fillStyle: 'rgba(255, 50, 0, 1.0)',
size: 5,
minSize: 8,
maxSize: 31,
globalAlpha: 0.8,
clusterRadius: 150,
maxZoom: 19,
label: {
show: true,
fillStyle: 'white',
},
gradient: { 0: "blue", 0.5: 'yellow', 1.0: "rgb(255,0,0)"},
draw: 'cluster'}}
/>
我这样使用,页面报错
Uncaught TypeError: Cannot read property 'getClusters' of undefined
请问是怎么回事呢

您好,这个问题在1.0.104版本解决,请升级到最新版本的react-bmap

commented

1.0.117依然有这个问题