import type { IAttribute } from '../renderer/IAttribute'; import type { IElements } from '../renderer/IElements'; import type { IRendererService } from '../renderer/IRendererService'; import type { ILayer } from './ILayerService'; import type { IEncodeFeature, IScaleOptions, IStyleAttribute, IStyleAttributeInitializationOptions, IStyleAttributeService, IStyleAttributeUpdateOptions, Triangulation } from './IStyleAttributeService'; /** * 每个 Layer 都拥有一个,用于管理样式属性的注册和更新 */ export default class StyleAttributeService implements IStyleAttributeService { private readonly rendererService; constructor(rendererService: IRendererService); attributesAndIndices: { attributes: { [attributeName: string]: IAttribute; }; elements: IElements; count: number | null; }; private attributes; private triangulation; private featureLayout; registerStyleAttribute(options: Partial): IStyleAttribute; unRegisterStyleAttribute(name: string): void; updateScaleAttribute(scaleOption: IScaleOptions): void; updateStyleAttribute(attributeName: string, options: Partial, updateOptions?: Partial): void; getLayerStyleAttributes(): IStyleAttribute[] | undefined; getLayerStyleAttribute(attributeName: string): IStyleAttribute | undefined; getLayerAttributeScale(name: string): unknown; updateAttributeByFeatureRange(attributeName: string, features: IEncodeFeature[], startFeatureIdx?: number, endFeatureIdx?: number, layer?: ILayer): void; createAttributesAndIndices(features: IEncodeFeature[], triangulation: Triangulation, styleOption: unknown, layer?: ILayer): { attributes: { [attributeName: string]: IAttribute; }; elements: IElements; count: number | null; }; createAttributes(features: IEncodeFeature[], triangulation: Triangulation): { attributes: { [attributeName: string]: IAttribute; }; }; clearAllAttributes(): void; }