import type { PositionName } from '../component/IControlService'; import type { ILayerAttributesOption, ILayerConfig } from '../layer/ILayerService'; import type { IMapWrapper } from '../map/IMapService'; import type { IRenderConfig } from '../renderer/IRendererService'; export interface ISceneConfig extends IRenderConfig { id: string | HTMLDivElement; canvas?: HTMLCanvasElement; gl?: any; map: IMapWrapper; logoPosition?: PositionName; logoVisible?: boolean; animate?: boolean; fitBoundsOptions?: unknown; pickBufferScale?: number; stencil?: boolean; debug?: boolean; /** * Support regl & @antv/g-device-api now */ renderer?: 'regl' | 'device'; } export interface IGlobalConfigService { /** * 获取场景配置项 * @param sceneId 场景 ID */ getSceneConfig(sceneId: string): Partial; setSceneConfig(sceneId: string, config: Partial): void; /** * 校验用户传入的场景配置项 * @param data 场景配置项 */ /** * 校验用户传入的地图配置项 * @param data 地图配置项 */ /** * 获取图层配置项 * @param layerId 图层 ID */ getLayerConfig(layerId: string): Partial; /** * 获取警告信息 * @param key */ getSceneWarninfo(layerId: string): string; /** * 设置图层配置项,继承所属场景配置项 * @param sceneId 场景 ID * @param layerId 图层 ID * @param config 图层配置项 */ setLayerConfig(sceneId: string, layerId: string, config: Partial): void; /** * 获取数据映射 */ getAttributeConfig(layerId: string): Partial; /** * 设置数据映射 * @param layerId sh * @param attr */ setAttributeConfig(layerId: string, attr: Partial): void; /** * 清除场景和图层配置项 Cache,但是需要保留校验器 */ clean(): void; }