Verified Commit bb374158 authored by jxtxzzw's avatar jxtxzzw
Browse files

优化:地图点聚合样式



Signed-off-by: jxtxzzw's avatarjxtxzzw <jxtxzzw@126.com>
parent 1ec4da1c
Pipeline #704 passed with stages
in 15 minutes and 3 seconds
......@@ -15,17 +15,17 @@ function getPointLayer(data, that) {
},
})
.scale('point_count', {
type: 'quantile', // 根据四分位数将每个聚合点实际包含的点的个数分为五份
type: 'log', // type: 'quantile', // 根据四分位数将每个聚合点实际包含的点的个数分为五份
})
.size('point_count', [20, 25, 30, 40, 50]) // 根据每个聚合点实际包含的点的个数决定点的大小
.size('point_count', [10, 25, 40, 60, 80]) // 根据每个聚合点实际包含的点的个数决定点的大小
.color('point_count', (pc) => {
if (pc === 1) {
return '#4cfd47'
} else if (pc >= 2 && pc <= 5) {
return '#01a31c'
} else if (pc >= 6 && pc <= 10) {
} else if (pc >= 6 && pc <= 15) {
return '#006400'
} else if (pc >= 11 && pc <= 30) {
} else if (pc >= 16 && pc <= 30) {
return '#20a0ff'
} else {
return '#5b8ff9'
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment