-
Notifications
You must be signed in to change notification settings - Fork 660
Description
问题描述
聚合点对于单个点时没生效,虽然设置了minPoints: 1,但是还是没有形成聚合涂层
版本:
"@antv/l7": "^2.20.14",
"@antv/l7-maps": "^2.20.14",
示例代码如下:
`import { PointLayer, Scene, Source } from '@antv/l7';
import { GaodeMap } from '@antv/l7-maps';
const scene = new Scene({
id: 'map',
map: new GaodeMap({
center: [120.19382669582967, 30.258134],
style: 'dark',
zoom: 3,
}),
});
scene.on('loaded', () => {
let testData = [
{
name: "Plug'nRoll",
owner: "Plug'nRoll",
lat: 46.913439,
lng: 9.781794,
},
];
const dataSource = new Source(testData, {
parser: {
type: 'csv',
x: 'lng',
y: 'lat',
},
cluster: true,
clusterOption: {
radius: 40,
minPoints: 1,
},
});
// 3. 图层样式
const devPointLayer = new PointLayer({ zIndex: 1 })
.source(dataSource)
.shape('circle')
.size('point_count', [10, 15, 20, 25])
.color('#67C23A')
.style({ opacity: 1 });
// 4. 文字图层
const devPointLayerText = new PointLayer({ zIndex: 3 })
.source(this.dataSource)
.shape('point_count', 'text')
.size(12)
.color('#fff')
.style({ opacity: 1 });
this.scene.addLayer(devPointLayer);
this.scene.addLayer(devPointLayerText);
});`
重现链接
https://stackblitz.com/edit/react-stkrymej?file=index.js
重现步骤
No response
预期行为
No response
平台
- 操作系统: [macOS, Windows, Linux, React Native ...]
- 网页浏览器: [Google Chrome, Safari, Firefox]
屏幕截图或视频(可选)
No response
补充说明(可选)
No response