* feat: fillImage 支持自由设置图标的旋转角度

* style: lint style

* feat: 增加对 pointLayer 的 shape 切换支持
This commit is contained in:
YiQianYao 2022-04-07 16:55:31 +08:00 committed by GitHub
parent be80c6525d
commit a03b41787b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 0 deletions

View File

@ -23,10 +23,16 @@ export function updateShape(
typeof currentShape === 'string' &&
lastShape !== currentShape
) {
if(layer.type === 'PointLayer') {
layer.dataState.dataSourceNeedUpdate = true;
return;
}
shapeUpdateList.map((shapes) => {
if (shapes.includes(lastShape) && shapes.includes(currentShape)) {
// TODO: dataSourceNeedUpdate 借用数据更新时更新 layer model 的工作流
layer.dataState.dataSourceNeedUpdate = true;
return;
}
});
}

View File

@ -70,6 +70,10 @@ export default class GaodeMapComponent extends React.Component {
},
},
)
// - cylinder
// - triangleColumn
// - hexagonColumn
// - squareColumn,
.shape('circle')
// .shape('cylinder')
// .color('#0f9')
@ -108,6 +112,11 @@ export default class GaodeMapComponent extends React.Component {
// })
// .active({ color: '#00f' });
setTimeout(() => {
layer.shape('triangleColumn')
scene.render();
}, 2000)
this.scene = scene;
// console.log('layer', layer)