mirror of https://gitee.com/antv-l7/antv-l7
896 B
896 B
title | order |
---|---|
城市建筑 | 6 |
使用
import { CityBuildingLayer } from '@antv/l7';
source
size
color
animate
开启动画效果
layer.animate(true);
style
- baseColor 楼房颜色,
- windowColor: 窗户颜色,
- brightColor: 点亮窗户颜色
其他 style 配置项同
完整代码
const pointLayer = new CityBuildingLayer();
pointLayer
.source(await response.json())
.size('floor', [0, 500])
.color('rgba(242,246,250,1.0)')
.animate({
enable: true,
})
.style({
opacity: 1.0,
baseColor: 'rgb(16,16,16)',
windowColor: 'rgb(30,60,89)',
brightColor: 'rgb(255,176,38)',
});
scene.addLayer(pointLayer);