This commit is contained in:
2912401452 2022-04-07 16:56:52 +08:00
commit bc92f70873
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)