UNPKG

@idmwx/idmui-gl3

Version:

idm webgl3

1,291 lines 82.7 kB
import mapboxgl from 'mapbox-gl'; export interface ParticleOptions { fadeOpacity: number; speedFactor: number; dropRate: number; dropRateBump: number; uvRange: number[]; sRange: number[]; scale: number; } export declare class Viewport { map: mapboxgl.Map; private mercator; rampColorLayer: string; rampColorSource: string; particleLayer: string; particleSource: string; rampColorCanvas: HTMLCanvasElement; particleCanvas: HTMLCanvasElement; ratio: number; constructor(map: mapboxgl.Map); /** * 转换为[-180, 180]的经度,且包含转换次数 * @param lng * @param n */ private convertNLng; /** * [4326坐标] * 返回视窗边界经纬度(从西北方向逆时针返回四个角的经纬度) * 依次为: NW, NE, SE, SW * @param map * @return [[lng, lat], [lng, lat], [lng, lat], [lng, lat]] */ getBoundLngLat(): number[][]; /** * [视窗像素坐标] * @see https://github.com/mapbox/sphericalmercator * 返回视窗边界像素 * 依次为: 左下角(lf = left bottom)、右上角(rt = right top) * @param [lb.x, lb.y, rt.x, rt.y] */ getBoundPixel(): any[]; /** * [视窗边界像素宽度] */ getBoundRange(): any[]; /** * 获取视窗世界(多世界复本) * @param pixels * @param zoom */ getWorldCopy(pixels: number[], zoom: number): number[][]; resize(): void; toggle(visible: boolean): void; toggleParticle(visible: boolean): void; } export declare class WebGL { /** * 创建着色器 * @see https://webglfundamentals.org/webgl/lessons/zh_cn/webgl-shaders-and-glsl.html * @param gl * @param type [VERTEX_SHADER, FRAGMENT_SHADER] * @param schema 着色器渲染代码[GLSL] */ createShader(gl: WebGLRenderingContext, type: GLenum, schema: any): WebGLShader | null; /** * 创建纹理 * @see https://blog.csdn.net/qq_37987033/article/details/128745577 * @param gl * @param minFilter * @param magFilter * @param wrapFilter * @param data * @param width?? * @param height?? */ createTexture(gl: WebGLRenderingContext, minFilter: GLint, magFilter: GLint, wrapFilter: GLint, data: Uint8Array | HTMLCanvasElement | HTMLImageElement | undefined, width?: number | undefined, height?: number | undefined): WebGLTexture | null; /** * 创建数据资源 * @param type [array, element] * array: ARRAY_BUFFER * element: ELEMENT_ARRAY_BUFFER * @param resource 顶点数据 */ createDataBuffer(gl: WebGLRenderingContext, type: string, resource: BufferSource | undefined): WebGLBuffer | null; /** * 创建程序 * @param gl * @param vertexSchema * @param fragmentSchema */ createProgram(gl: WebGLRenderingContext, vertexSchema: string, fragmentSchema: string): WebGLProgram | null; /** * 创建程序并提取attrib & uniform参数 * @param gl * @param vertexSchema * @param fragmentSchema */ private createProgramWrapper; /** * 初始化渐变色纹理 * @param colors */ setup(context: WebGLRenderingContext | null, colors: Array<[number, string]>, int8?: boolean, width?: number, height?: number): { canvas: HTMLCanvasElement; texture: WebGLTexture | null; } | undefined; setupParticle(context: WebGLRenderingContext, num?: number): { resolution: number; total: number; texture0: WebGLTexture | null; texture1: WebGLTexture | null; indexBuffer: WebGLBuffer | null; }; bind(context: WebGLRenderingContext | null, vertexSchema: string, fragmentSchema: string): { program: WebGLProgram; aPositionBuffer: WebGLBuffer | null; } | { program?: undefined; aPositionBuffer?: undefined; }; bindParticle(gl: WebGLRenderingContext, drawVert: string, drawFrag: string, quadVert: string, screenFrag: string, updateFrag: string): { particle: { program: WebGLProgram; } | undefined; screen: { program: WebGLProgram; } | undefined; update: { program: WebGLProgram; } | undefined; quadBuffer: WebGLBuffer | null; frameBuffer: WebGLFramebuffer | null; }; draw(viewport: Viewport, context: WebGLRenderingContext | null, program: WebGLProgram | null, texture: WebGLTexture | null, colorTexture: WebGLTexture | null, aPositionBuffer: WebGLBuffer | null, options?: ParticleOptions): void; drawParticle(viewport: Viewport, gl: WebGLRenderingContext, factorTexture: WebGLTexture, wrapper: any, options: ParticleOptions): void; private renderScreen; private renderScreenTexture; renderParticles(viewport: Viewport, gl: WebGLRenderingContext, wrapper: any, options: ParticleOptions): void; updateParticles(viewport: Viewport, gl: WebGLRenderingContext, wrapper: any, options: ParticleOptions): void; resize(viewport: Viewport, gl: WebGLRenderingContext): { screenTexture: WebGLTexture | null; backgroundTexture: WebGLTexture | null; }; loadImg(data: any): Promise<HTMLImageElement>; } /** * WebGL (GLSL)渲染语法 */ export declare class WebGLSchema { static vertexSchema: string; static uvFragmentSchema: string; static fragmentSchema: string; } export declare class ParticleSchema { static vertexSchema: string; static fragmentSchema: string; static quadVertSchema: string; static screenFragmentSchema: string; static updateFragmentSchema: string; } /** * Mapbox辅助图层 */ export declare class MapboxHelper { token: any; mapboxCustomer: any; i4: any; hi: any; td: any; windy: any; constructor(token?: string); initialOnlineStyle(): { version: number; name: string; metadata: { 'mapbox:print': { width: number; height: number; units: string; format: string; resolution: number; }; 'mapbox:type': string; 'mapbox:trackposition': boolean; 'mapbox:autocomposite': boolean; 'mapbox:sdk-support': { android: string; ios: string; js: string; }; 'mapbox:origin': string; 'mapbox:groups': { 'Terrain, terrain-labels': { name: string; collapsed: boolean; }; 'Administrative boundaries, admin': { name: string; collapsed: boolean; }; 'Land & water, built': { name: string; collapsed: boolean; }; 'Terrain, surface': { name: string; collapsed: boolean; }; 'Land & water, land': { name: string; collapsed: boolean; }; 'Natural features, natural-labels': { name: string; collapsed: boolean; }; 'Walking, cycling, etc., barriers-bridges': { name: string; collapsed: boolean; }; 'Place labels, place-labels': { name: string; collapsed: boolean; }; 'Transit, ferries': { name: string; collapsed: boolean; }; 'Transit, elevated': { name: string; collapsed: boolean; }; 'Walking, cycling, etc., tunnels': { name: string; collapsed: boolean; }; 'Terrain, land': { name: string; collapsed: boolean; }; 'Road network, tunnels-case': { name: string; collapsed: boolean; }; 'Walking, cycling, etc., walking-cycling-labels': { name: string; collapsed: boolean; }; 'Walking, cycling, etc., surface': { name: string; collapsed: boolean; }; 'Road network, surface-icons': { name: string; collapsed: boolean; }; 'Land & water, water': { name: string; collapsed: boolean; }; }; }; lights: never[]; fog: { color: string; range: number[]; 'high-color': string; 'space-color': (string | number | string[])[]; 'horizon-blend': (string | number | string[])[]; 'star-intensity': (string | number | string[])[]; 'vertical-range': number[]; }; center: number[]; zoom: number; bearing: number; pitch: number; sprite: string; glyphs: string; projection: { name: string; }; sources: { composite: { type: string; url: string; data: { attribution: string; bounds: number[]; center: number[]; description: string; format: string; language_options: { ar: string; ca: string; cs: string; da: string; de: string; el: string; en: string; es: string; fa: string; fi: string; fr: string; he: string; hu: string; id: string; it: string; ja: string; ka: string; ko: string; local: string; lv: string; ms: string; nb: string; nl: string; no: string; pl: string; pt: string; ro: string; ru: string; sk: string; sl: string; sr: string; sv: string; th: string; tl: string; tr: string; uk: string; vi: string; 'zh-Hans': string; 'zh-Hant': string; }; mapbox_logo: boolean; maskLevel: number; maxzoom: number; minzoom: number; mts: boolean; name: string; scheme: string; tilejson: string; tiles: string[]; vector_layers: ({ id: string; minzoom: number; source: string; maxzoom?: undefined; source_name?: undefined; description?: undefined; fields?: undefined; } | { id: string; maxzoom: number; minzoom: number; source: string; source_name?: undefined; description?: undefined; fields?: undefined; } | { id: string; maxzoom: number; minzoom: number; source: string; source_name: string; description?: undefined; fields?: undefined; } | { description: string; fields: { ICECODE: string; ORIG_FID: string; Shape_Area: string; Shape_Leng: string; }; id: string; maxzoom: number; minzoom: number; source: string; source_name: string; })[]; worldview_default: string; worldview_options: { ALL: string; AR: string; CN: string; IN: string; JP: string; MA: string; RS: string; RU: string; TR: string; US: string; VN: string; }; }; }; }; layers: ({ id: string; type: string; metadata: { 'mapbox:featureComponent': string; 'mapbox:group': string; }; paint: { 'background-color': string; 'fill-color'?: undefined; 'fill-opacity'?: undefined; 'fill-antialias'?: undefined; 'line-color'?: undefined; 'line-width'?: undefined; 'line-blur'?: undefined; 'line-translate'?: undefined; 'line-translate-anchor'?: undefined; 'line-opacity'?: undefined; 'fill-translate'?: undefined; 'fill-translate-anchor'?: undefined; 'fill-pattern'?: undefined; 'line-dasharray'?: undefined; 'text-color'?: undefined; 'text-halo-color'?: undefined; 'text-halo-width'?: undefined; 'text-halo-blur'?: undefined; 'icon-opacity'?: undefined; 'text-opacity'?: undefined; }; source?: undefined; 'source-layer'?: undefined; maxzoom?: undefined; minzoom?: undefined; filter?: undefined; layout?: undefined; } | { id: string; type: string; source: string; 'source-layer': string; metadata: { 'mapbox:featureComponent': string; 'mapbox:group': string; }; maxzoom: number; paint: { 'fill-color': (string | string[])[]; 'fill-opacity': (string | number | (string | number)[])[]; 'fill-antialias': boolean; 'background-color'?: undefined; 'line-color'?: undefined; 'line-width'?: undefined; 'line-blur'?: undefined; 'line-translate'?: undefined; 'line-translate-anchor'?: undefined; 'line-opacity'?: undefined; 'fill-translate'?: undefined; 'fill-translate-anchor'?: undefined; 'fill-pattern'?: undefined; 'line-dasharray'?: undefined; 'text-color'?: undefined; 'text-halo-color'?: undefined; 'text-halo-width'?: undefined; 'text-halo-blur'?: undefined; 'icon-opacity'?: undefined; 'text-opacity'?: undefined; }; minzoom?: undefined; filter?: undefined; layout?: undefined; } | { id: string; type: string; source: string; 'source-layer': string; metadata: { 'mapbox:featureComponent': string; 'mapbox:group': string; }; minzoom: number; filter: (string | string[])[]; paint: { 'line-color': string; 'line-width': (string | number | (string | number)[])[]; 'line-blur': (string | number | (string | number)[])[]; 'background-color'?: undefined; 'fill-color'?: undefined; 'fill-opacity'?: undefined; 'fill-antialias'?: undefined; 'line-translate'?: undefined; 'line-translate-anchor'?: undefined; 'line-opacity'?: undefined; 'fill-translate'?: undefined; 'fill-translate-anchor'?: undefined; 'fill-pattern'?: undefined; 'line-dasharray'?: undefined; 'text-color'?: undefined; 'text-halo-color'?: undefined; 'text-halo-width'?: undefined; 'text-halo-blur'?: undefined; 'icon-opacity'?: undefined; 'text-opacity'?: undefined; }; maxzoom?: undefined; layout?: undefined; } | { id: string; type: string; source: string; 'source-layer': string; metadata: { 'mapbox:featureComponent': string; 'mapbox:group': string; }; minzoom: number; filter: (string | (string | boolean | (string | number | boolean | (string | boolean | (string | number | string[])[])[])[])[] | (string | number | (string | (string | number | (string | number)[])[])[])[])[]; paint: { 'fill-color': (string | number | (string | (string | string[])[])[])[]; 'fill-opacity': (string | number | (string | number | string[])[])[]; 'fill-antialias': boolean; 'background-color'?: undefined; 'line-color'?: undefined; 'line-width'?: undefined; 'line-blur'?: undefined; 'line-translate'?: undefined; 'line-translate-anchor'?: undefined; 'line-opacity'?: undefined; 'fill-translate'?: undefined; 'fill-translate-anchor'?: undefined; 'fill-pattern'?: undefined; 'line-dasharray'?: undefined; 'text-color'?: undefined; 'text-halo-color'?: undefined; 'text-halo-width'?: undefined; 'text-halo-blur'?: undefined; 'icon-opacity'?: undefined; 'text-opacity'?: undefined; }; maxzoom?: undefined; layout?: undefined; } | { id: string; type: string; source: string; 'source-layer': string; metadata: { 'mapbox:featureComponent': string; 'mapbox:group': string; }; minzoom: number; filter: (string | string[])[]; paint: { 'line-color': string; 'background-color'?: undefined; 'fill-color'?: undefined; 'fill-opacity'?: undefined; 'fill-antialias'?: undefined; 'line-width'?: undefined; 'line-blur'?: undefined; 'line-translate'?: undefined; 'line-translate-anchor'?: undefined; 'line-opacity'?: undefined; 'fill-translate'?: undefined; 'fill-translate-anchor'?: undefined; 'fill-pattern'?: undefined; 'line-dasharray'?: undefined; 'text-color'?: undefined; 'text-halo-color'?: undefined; 'text-halo-width'?: undefined; 'text-halo-blur'?: undefined; 'icon-opacity'?: undefined; 'text-opacity'?: undefined; }; maxzoom?: undefined; layout?: undefined; } | { id: string; type: string; source: string; 'source-layer': string; metadata: { 'mapbox:featureComponent': string; 'mapbox:group': string; }; minzoom: number; layout: { 'line-cap': (string | number | string[])[]; 'line-join': (string | number | string[])[]; 'text-font'?: undefined; 'text-max-angle'?: undefined; 'symbol-spacing'?: undefined; 'text-size'?: undefined; 'symbol-placement'?: undefined; 'text-pitch-alignment'?: undefined; 'text-field'?: undefined; visibility?: undefined; 'icon-image'?: undefined; 'text-offset'?: undefined; 'text-anchor'?: undefined; 'text-letter-spacing'?: undefined; 'text-line-height'?: undefined; 'text-max-width'?: undefined; 'text-transform'?: undefined; 'text-padding'?: undefined; 'text-radial-offset'?: undefined; 'symbol-sort-key'?: undefined; 'text-justify'?: undefined; }; paint: { 'line-color': string; 'line-width': (string | number | (string | number | string[])[])[]; 'line-translate': (string | number | (string | number)[] | (string | number[])[])[]; 'line-translate-anchor': string; 'line-opacity': (string | number | string[])[]; 'background-color'?: undefined; 'fill-color'?: undefined; 'fill-opacity'?: undefined; 'fill-antialias'?: undefined; 'line-blur'?: undefined; 'fill-translate'?: undefined; 'fill-translate-anchor'?: undefined; 'fill-pattern'?: undefined; 'line-dasharray'?: undefined; 'text-color'?: undefined; 'text-halo-color'?: undefined; 'text-halo-width'?: undefined; 'text-halo-blur'?: undefined; 'icon-opacity'?: undefined; 'text-opacity'?: undefined; }; maxzoom?: undefined; filter?: undefined; } | { id: string; type: string; source: string; 'source-layer': string; metadata: { 'mapbox:featureComponent': string; 'mapbox:group': string; }; minzoom: number; paint: { 'fill-color': string; 'fill-translate': (string | number | (string | number)[] | (string | number[])[])[]; 'fill-translate-anchor': string; 'background-color'?: undefined; 'fill-opacity'?: undefined; 'fill-antialias'?: undefined; 'line-color'?: undefined; 'line-width'?: undefined; 'line-blur'?: undefined; 'line-translate'?: undefined; 'line-translate-anchor'?: undefined; 'line-opacity'?: undefined; 'fill-pattern'?: undefined; 'line-dasharray'?: undefined; 'text-color'?: undefined; 'text-halo-color'?: undefined; 'text-halo-width'?: undefined; 'text-halo-blur'?: undefined; 'icon-opacity'?: undefined; 'text-opacity'?: undefined; }; maxzoom?: undefined; filter?: undefined; layout?: undefined; } | { id: string; type: string; source: string; 'source-layer': string; metadata: { 'mapbox:featureComponent': string; 'mapbox:group': string; }; minzoom: number; layout: { 'line-cap': (string | number | string[])[]; 'line-join': (string | number | string[])[]; 'text-font'?: undefined; 'text-max-angle'?: undefined; 'symbol-spacing'?: undefined; 'text-size'?: undefined; 'symbol-placement'?: undefined; 'text-pitch-alignment'?: undefined; 'text-field'?: undefined; visibility?: undefined; 'icon-image'?: undefined; 'text-offset'?: undefined; 'text-anchor'?: undefined; 'text-letter-spacing'?: undefined; 'text-line-height'?: undefined; 'text-max-width'?: undefined; 'text-transform'?: undefined; 'text-padding'?: undefined; 'text-radial-offset'?: undefined; 'symbol-sort-key'?: undefined; 'text-justify'?: undefined; }; paint: { 'line-color': string; 'line-width': (string | number | (string | number | string[])[])[]; 'line-opacity': (string | number | string[])[]; 'background-color'?: undefined; 'fill-color'?: undefined; 'fill-opacity'?: undefined; 'fill-antialias'?: undefined; 'line-blur'?: undefined; 'line-translate'?: undefined; 'line-translate-anchor'?: undefined; 'fill-translate'?: undefined; 'fill-translate-anchor'?: undefined; 'fill-pattern'?: undefined; 'line-dasharray'?: undefined; 'text-color'?: undefined; 'text-halo-color'?: undefined; 'text-halo-width'?: undefined; 'text-halo-blur'?: undefined; 'icon-opacity'?: undefined; 'text-opacity'?: undefined; }; maxzoom?: undefined; filter?: undefined; } | { id: string; type: string; source: string; 'source-layer': string; metadata: { 'mapbox:featureComponent': string; 'mapbox:group': string; }; paint: { 'fill-color': string; 'background-color'?: undefined; 'fill-opacity'?: undefined; 'fill-antialias'?: undefined; 'line-color'?: undefined; 'line-width'?: undefined; 'line-blur'?: undefined; 'line-translate'?: undefined; 'line-translate-anchor'?: undefined; 'line-opacity'?: undefined; 'fill-translate'?: undefined; 'fill-translate-anchor'?: undefined; 'fill-pattern'?: undefined; 'line-dasharray'?: undefined; 'text-color'?: undefined; 'text-halo-color'?: undefined; 'text-halo-width'?: undefined; 'text-halo-blur'?: undefined; 'icon-opacity'?: undefined; 'text-opacity'?: undefined; }; maxzoom?: undefined; minzoom?: undefined; filter?: undefined; layout?: undefined; } | { id: string; type: string; source: string; 'source-layer': string; metadata: { 'mapbox:featureComponent': string; 'mapbox:group': string; }; maxzoom: number; paint: { 'fill-antialias': boolean; 'fill-color': (string | number | (string | number | string[])[])[]; 'background-color'?: undefined; 'fill-opacity'?: undefined; 'line-color'?: undefined; 'line-width'?: undefined; 'line-blur'?: undefined; 'line-translate'?: undefined; 'line-translate-anchor'?: undefined; 'line-opacity'?: undefined; 'fill-translate'?: undefined; 'fill-translate-anchor'?: undefined; 'fill-pattern'?: undefined; 'line-dasharray'?: undefined; 'text-color'?: undefined; 'text-halo-color'?: undefined; 'text-halo-width'?: undefined; 'text-halo-blur'?: undefined; 'icon-opacity'?: undefined; 'text-opacity'?: undefined; }; minzoom?: undefined; filter?: undefined; layout?: undefined; } | { id: string; type: string; source: string; 'source-layer': string; metadata: { 'mapbox:featureComponent': string; 'mapbox:group': string; }; minzoom: number; filter: (string | boolean | string[])[]; paint: { 'fill-color': string; 'fill-opacity': (string | number | string[])[]; 'background-color'?: undefined; 'fill-antialias'?: undefined; 'line-color'?: undefined; 'line-width'?: undefined; 'line-blur'?: undefined; 'line-translate'?: undefined; 'line-translate-anchor'?: undefined; 'line-opacity'?: undefined; 'fill-translate'?: undefined; 'fill-translate-anchor'?: undefined; 'fill-pattern'?: undefined; 'line-dasharray'?: undefined; 'text-color'?: undefined; 'text-halo-color'?: undefined; 'text-halo-width'?: undefined; 'text-halo-blur'?: undefined; 'icon-opacity'?: undefined; 'text-opacity'?: undefined; }; maxzoom?: undefined; layout?: undefined; } | { id: string; type: string; source: string; 'source-layer': string; metadata: { 'mapbox:featureComponent': string; 'mapbox:group': string; }; minzoom: number; filter: (string | boolean | string[])[]; paint: { 'fill-color': string; 'fill-opacity': (string | number | string[])[]; 'fill-pattern': string; 'fill-translate-anchor': string; 'background-color'?: undefined; 'fill-antialias'?: undefined; 'line-color'?: undefined; 'line-width'?: undefined; 'line-blur'?: undefined; 'line-translate'?: undefined; 'line-translate-anchor'?: undefined; 'line-opacity'?: undefined; 'fill-translate'?: undefined; 'line-dasharray'?: undefined; 'text-color'?: undefined; 'text-halo-color'?: undefined; 'text-halo-width'?: undefined; 'text-halo-blur'?: undefined; 'icon-opacity'?: undefined; 'text-opacity'?: undefined; }; maxzoom?: undefined; layout?: undefined; } | { id: string; type: string; source: string; 'source-layer': string; metadata: { 'mapbox:featureComponent': string; 'mapbox:group': string; }; minzoom: number; filter: (string | (string | string[])[])[]; paint: { 'fill-color': string; 'background-color'?: undefined; 'fill-opacity'?: undefined; 'fill-antialias'?: undefined; 'line-color'?: undefined; 'line-width'?: undefined; 'line-blur'?: undefined; 'line-translate'?: undefined; 'line-translate-anchor'?: undefined; 'line-opacity'?: undefined; 'fill-translate'?: undefined; 'fill-translate-anchor'?: undefined; 'fill-pattern'?: undefined; 'line-dasharray'?: undefined; 'text-color'?: undefined; 'text-halo-color'?: undefined; 'text-halo-width'?: undefined; 'text-halo-blur'?: undefined; 'icon-opacity'?: undefined; 'text-opacity'?: undefined; }; maxzoom?: undefined; layout?: undefined; } | { id: string; type: string; source: string; 'source-layer': string; metadata: { 'mapbox:featureComponent': string; 'mapbox:group': string; }; minzoom: number; filter: (string | (string | string[])[])[]; layout: { 'line-cap': string; 'line-join'?: undefined; 'text-font'?: undefined; 'text-max-angle'?: undefined; 'symbol-spacing'?: undefined; 'text-size'?: undefined; 'symbol-placement'?: undefined; 'text-pitch-alignment'?: undefined; 'text-field'?: undefined; visibility?: undefined; 'icon-image'?: undefined; 'text-offset'?: undefined; 'text-anchor'?: undefined; 'text-letter-spacing'?: undefined; 'text-line-height'?: undefined; 'text-max-width'?: undefined; 'text-transform'?: undefined; 'text-padding'?: undefined; 'text-radial-offset'?: undefined; 'symbol-sort-key'?: undefined; 'text-justify'?: undefined; }; paint: { 'line-width': (string | number | (string | number)[])[]; 'line-color': string; 'background-color'?: undefined; 'fill-color'?: undefined; 'fill-opacity'?: undefined; 'fill-antialias'?: undefined; 'line-blur'?: undefined; 'line-translate'?: undefined; 'line-translate-anchor'?: undefined; 'line-opacity'?: undefined; 'fill-translate'?: undefined; 'fill-translate-anchor'?: undefined; 'fill-pattern'?: undefined; 'line-dasharray'?: undefined; 'text-color'?: undefined; 'text-halo-color'?: undefined; 'text-halo-width'?: undefined; 'text-halo-blur'?: undefined; 'icon-opacity'?: undefined; 'text-opacity'?: undefined; }; maxzoom?: undefined; } | { id: string; type: string; source: string; 'source-layer': string; paint: { 'fill-color': (string | number | string[])[]; 'background-color'?: undefined; 'fill-opacity'?: undefined; 'fill-antialias'?: undefined; 'line-color'?: undefined; 'line-width'?: undefined; 'line-blur'?: undefined; 'line-translate'?: undefined; 'line-translate-anchor'?: undefined; 'line-opacity'?: undefined; 'fill-translate'?: undefined; 'fill-translate-anchor'?: undefined; 'fill-pattern'?: undefined; 'line-dasharray'?: undefined; 'text-color'?: undefined; 'text-halo-color'?: undefined; 'text-halo-width'?: undefined; 'text-halo-blur'?: undefined; 'icon-opacity'?: undefined; 'text-opacity'?: undefined; }; metadata?: undefined; maxzoom?: undefined; minzoom?: undefined; filter?: undefined; layout?: undefined; } | { id: string; type: string; source: string; 'source-layer': string; metadata: { 'mapbox:featureComponent': string; 'mapbox:group': string; }; minzoom: number; filter: (string | (string | number | string[])[] | (string | boolean | string[])[])[]; paint: { 'line-width': (string | number | string[])[]; 'line-color': string; 'line-opacity': (string | number | string[])[]; 'line-blur': (string | number | string[])[]; 'background-color'?: undefined; 'fill-color'?: undefined; 'fill-opacity'?: undefined; 'fill-antialias'?: undefined; 'line-translate'?: undefined; 'line-translate-anchor'?: undefined; 'fill-translate'?: undefined; 'fill-translate-anchor'?: undefined; 'fill-pattern'?: undefined; 'line-dasharray'?: undefined; 'text-color'?: undefined; 'text-halo-color'?: undefined; 'text-halo-width'?: undefined; 'text-halo-blur'?: undefined; 'icon-opacity'?: undefined; 'text-opacity'?: undefined; }; maxzoom?: undefined; layout?: undefined; } | { id: string; type: string; source: string; 'source-layer': string; metadata: { 'mapbox:featureComponent': string; 'mapbox:group': string; }; minzoom: number; filter: (string | (string | number | string[])[] | (string | boolean | string[])[])[]; paint: { 'line-color': string; 'line-width': (string | number | string[])[]; 'line-dasharray': (string | number | (string | number[])[])[]; 'background-color'?: undefined; 'fill-color'?: undefined; 'fill-opacity'?: undefined; 'fill-antialias'?: undefined; 'line-blur'?: undefined; 'line-translate'?: undefined; 'line-translate-anchor'?: undefined; 'line-opacity'?: undefined; 'fill-translate'?: undefined; 'fill-translate-anchor'?: undefined; 'fill-pattern'?: undefined; 'text-color'?: undefined; 'text-halo-color'?: undefined; 'text-halo-width'?: undefined; 'text-halo-blur'?: undefined; 'icon-opacity'?: undefined; 'text-opacity'?: undefined; }; maxzoom?: undefined; layout?: undefined; } | { id: string; type: string; source: string; 'source-layer': string; metadata: { 'mapbox:featureComponent': string; 'mapbox:group': string; }; minzoom: number; filter: (string | (string | boolean | (string | boolean | string[])[])[] | (string | number | boolean | (string | number | string[])[])[])[]; layout: { 'text-font': string[]; 'text-max-angle': number; 'symbol-spacing': (string | number | (string | number)[])[]; 'text-size': (string | number | string[])[]; 'symbol-placement': string; 'text-pitch-alignment': string; 'text-field': (string | string[])[]; visibility: string; 'line-cap'?: undefined; 'line-join'?: undefined; 'icon-image'?: undefined; 'text-offset'?: undefined; 'text-anchor'?: undefined; 'text-letter-spacing'?: undefined; 'text-line-height'?: undefined; 'text-max-width'?: undefined; 'text-transform'?: undefined; 'text-padding'?: undefined; 'text-radial-offset'?: undefined; 'symbol-sort-key'?: undefined; 'text-justify'?: undefined; }; paint: { 'text-color': string; 'text-halo-color': string; 'background-color'?: undefined; 'fill-color'?: undefined; 'fill-opacity'?: undefined; 'fill-antialias'?: undefined; 'line-color'?: undefined; 'line-width'?: undefined; 'line-blur'?: undefined; 'line-translate'?: undefined; 'line-translate-anchor'?: undefined; 'line-opacity'?: undefined; 'fill-translate'?: undefined; 'fill-translate-anchor'?: undefined; 'fill-pattern'?: undefined; 'line-dasharray'?: undefined; 'text-halo-width'?: undefined; 'text-halo-blur'?: undefined; 'icon-opacity'?: undefined; 'text-opacity'?: undefined; }; maxzoom?: undefined; } | { id: string; type: string; source: string; 'source-layer': string; metadata: { 'mapbox:featureComponent': string; 'mapbox:group': string; }; minzoom: number; filter: (string | (string | boolean | (string | boolean | string[])[])[] | (string | number | boolean | (string | number | string[])[])[])[]; layout: { 'text-size': (string | number | (string | number | string[])[])[]; 'text-max-angle': number; 'text-field': (string | string[])[]; 'text-font': string[]; 'symbol-placement': string; 'text-pitch-alignment': string; visibility: string; 'line-cap'?: undefined; 'line-join'?: undefined; 'symbol-spacing'?: undefined; 'icon-image'?: undefined; 'text-offset'?: undefined; 'text-anchor'?: undefined; 'text-letter-spacing'?: undefined; 'text-line-height'?: undefined; 'text-max-width'?: undefined; 'text-transform'?: undefined; 'text-padding'?: undefined; 'text-radial-offset'?: undefined; 'symbol-sort-key'?: undefined; 'text-justify'?: undefined; }; paint: { 'text-halo-width': number; 'text-halo-color': string; 'text-halo-blur': number; 'text-color': string; 'background-color'?: undefined; 'fill-color'?: undefined; 'fill-opacity'?: undefined; 'fill-antialias'?: undefined; 'line-color'?: undefined; 'line-width'?: undefined; 'line-blur'?: undefined; 'line-translate'?: undefined; 'line-translate-anchor'?: undefined; 'line-opacity'?: undefined; 'fill-translate'?: undefined; 'fill-translate-anchor'?: undefined; 'fill-pattern'?: undefined; 'line-dasharray'?: undefined; 'icon-opacity'?: undefined; 'text-opacity'?: undefined; }; maxzoom?: undefined; } | { id: string; type: string; source: string; 'source-layer': string; metadata: { 'mapbox:featureComponent': string; 'mapbox:group': string; }; minzoom: number; filter: (string | (string | boolean | (string | boolean | string[])[])[] | (string | number | boolean | (string | number | string[])[])[])[]; layout: { 'text-size': (string | number | (string | number | string[])[])[]; 'icon-image': (string | (string | (string | string[])[])[])[]; 'text-font': string[]; 'text-offset': (string | number | (string | number | (string | number[])[])[])[]; 'text-anchor': (string | number | (string | number | string[])[])[]; 'text-field': (string | string[])[]; visibility: string; 'line-cap'?: undefined; 'line-join'?: undefined; 'text-max-angle'?: undefined; 'symbol-spacing'?: undefined; 'symbol-placement'?: undefined; 'text-pitch-alignment'?: undefined; 'text-letter-spacing'?: undefined; 'text-line-height'?: undefined; 'text-max-width'?: undefined; 'text-transform'?: undefined; 'text-padding'?: undefined; 'text-radial-offset'?: undefined; 'symbol-sort-key'?: undefined; 'text-justify'?: undefined; }; paint: { 'icon-opacity': (string | number | (string | number | string[])[])[]; 'text-halo-color': string; 'text-halo-width': number; 'text-halo-blur': number; 'text-color': string; 'background-color'?: undefined; 'fill-color'?: undefined; 'fill-opacity'?: undefined; 'fill-antialias'?: undefined; 'line-color'?: undefined; 'line-width'?: undefined; 'line-blur'?: undefined; 'line-translate'?: undefined; 'line-translate-anchor'?: undefined; 'line-opacity'?: undefined; 'fill-translate'?: undefined; 'fill-translate-anchor'?: undefined; 'fill-pattern'?: undefined; 'line-dasharray'?: undefined; 'text-opacity'?: undefined; }; maxzoom?: undefined; } | { id: string; type: string; source: string; 'source-layer': string; metadata: { 'mapbox:featureComponent': string; 'mapbox:group': string; }; minzoom: number; filter: (string | (string | boolean | (string | boolean | string[])[])[] | (string | number | boolean | (string | number | string[])[])[])[]; layout: { 'text-size': (string | number | (string | number | (string | number | (string | string[])[])[])[])[]; 'text-max-angle': number; 'text-letter-spacing': (string | number | string[])[]; 'text-font': string[]; 'symbol-placement': string; 'text-pitch-alignment': string; 'text-field': (string | string[])[]; visibility: string; 'line-cap'?: undefined; 'line-join'?: undefined; 'symbol-spacing'?: undefined; 'icon-image'?: undefined; 'text-offset'?: undefined; 'text-anchor'?: undefined; 'text-line-height'?: undefined; 'text-max-width'?: undefined; 'text-transform'?: undefined; 'text-padding'?: undefined; 'text-radial-offset'?: undefined; 'symbol-sort-key'?: undefined; 'text-justify'?: undefined; }; paint: { 'text-color': (string | string[])[]; 'text-halo-color': string; 'background-color'?: undefined; 'fill-color'?: undefined; 'fill-opacity'?: undefined; 'fill-antialias'?: undefined; 'line-color'?: undefined; 'line-width'?: undefined; 'line-blur'?: undefined; 'line-translate'?: undefined; 'line-translate-anchor'?: undefined; 'line-opacity'?: undefined; 'fill-translate'?: undefined; 'fill-translate-anchor'?: undefined; 'fill-pattern'?: undefined; 'line-dasharray'?: undefined; 'text-halo-width'?: undefined; 'text-halo-blur'?: undefined; 'icon-opacity'?: undefined; 'text-opacity'?: undefined; }; maxzoom?: undefined; } | { id: string; type: string; source: string; 'source-layer': string; metadata: { 'mapbox:featureCompo