mirror of https://gitee.com/antv-l7/antv-l7
Shihuidev (#1043)
* feat: fillImage 支持自由设置图标的旋转角度 * style: lint style * feat: 增加对 pointLayer 的 shape 切换支持
This commit is contained in:
parent
be80c6525d
commit
a03b41787b
|
@ -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;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue