diff --git a/src/utils/cesium/CesiumViewerManager.ts b/src/utils/cesium/CesiumViewerManager.ts index 3b7ead4..8735e67 100644 --- a/src/utils/cesium/CesiumViewerManager.ts +++ b/src/utils/cesium/CesiumViewerManager.ts @@ -82,7 +82,6 @@ export class CesiumViewerManager { containerId: options.containerId, shouldAnimate: true, baseLayerPicker: false, - imageryProvider: false, timeline: false, animation: false, infoBox: false, diff --git a/src/utils/cesium/EntityManager.ts b/src/utils/cesium/EntityManager.ts index ad05ab5..2fe1afb 100644 --- a/src/utils/cesium/EntityManager.ts +++ b/src/utils/cesium/EntityManager.ts @@ -260,12 +260,21 @@ export class EntityManager { * @param attributes 属性对象 * @private */ - #applyAttributesToEntity(entity: Entity, attributes: Record, entityType?: string): void { + #applyAttributesToEntity( + entity: Entity, + attributes: Record, + entityType?: string + ): void { if (!attributes || Object.keys(attributes).length === 0) { return; } - let targetGraphics: any = null; + let targetGraphics: + | PointGraphics + | BillboardGraphics + | PolylineGraphics + | PolygonGraphics + | null = null; if (entityType === 'point' && entity.point) { targetGraphics = entity.point; @@ -280,13 +289,13 @@ export class EntityManager { if (targetGraphics) { Object.entries(attributes).forEach(([key, value]) => { if (value !== undefined && value !== null) { - (targetGraphics as any)[key] = value; + (targetGraphics as unknown as Record)[key] = value; } }); } else { Object.entries(attributes).forEach(([key, value]) => { if (value !== undefined && value !== null) { - (entity as any)[key] = value; + (entity as unknown as Record)[key] = value; } }); }