diff --git a/packages/layers/src/utils/updateShape.ts b/packages/layers/src/utils/updateShape.ts index 49ad412d20..b29f37a6ce 100644 --- a/packages/layers/src/utils/updateShape.ts +++ b/packages/layers/src/utils/updateShape.ts @@ -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; } }); } diff --git a/stories/Map/components/mapCenter.tsx b/stories/Map/components/mapCenter.tsx index 87fbe4a16f..fb6dc16eaf 100644 --- a/stories/Map/components/mapCenter.tsx +++ b/stories/Map/components/mapCenter.tsx @@ -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)