@maptalks/vt 0.94.0 → 0.96.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,955 @@
1
+ /*!
2
+ * @maptalks/vt v0.96.0
3
+ * LICENSE : undefined
4
+ * (c) 2016-2024 maptalks.org
5
+ */
6
+ import * as maptalks from 'maptalks';
7
+ import { FillSymbol, LineSymbol, MarkerCommonSymbol, TextSymbol, LayerIdentifyOptionsType, TileLayerOptionsType, LayerJSONType, OverlayLayerOptionsType } from 'maptalks';
8
+ import { reshader, GroundPainter, createREGL } from '@maptalks/gl';
9
+
10
+ interface FillDataConfig {
11
+ type?: "fill";
12
+ }
13
+ interface LineDataConfig {
14
+ type?: "line";
15
+ }
16
+ interface IconDataConfig {
17
+ type?: "point";
18
+ }
19
+ interface TextDataConfig {
20
+ type?: "point";
21
+ }
22
+ interface LitDataConfig {
23
+ type?: "3d-extrusion" | "line-extrusion";
24
+ altitudeProperty?: string | null;
25
+ minHeightProperty?: string | null;
26
+ altitudeScale?: number;
27
+ defaultAltitude?: number;
28
+ topThickness?: number;
29
+ top?: boolean;
30
+ side?: boolean;
31
+ }
32
+ type VtDataConfig = FillDataConfig | LineDataConfig | IconDataConfig | TextDataConfig | LitDataConfig;
33
+ interface VtSceneConfig {
34
+ collision?: boolean;
35
+ fading?: boolean;
36
+ fadingDuration?: number;
37
+ fadeInDelay?: number;
38
+ fadeOutDelay?: number;
39
+ uniquePlacement?: number;
40
+ depthFunc?: "always" | "<=";
41
+ depthRange?: number[];
42
+ }
43
+ interface LitMaterial {
44
+ baseColorTexture?: string | null;
45
+ baseColorFactor?: number[];
46
+ hsv?: number[];
47
+ baseColorIntensity?: number;
48
+ contrast?: number;
49
+ outputSRGB?: number;
50
+ metallicRoughnessTexture?: string | null;
51
+ roughnessFactor?: number[];
52
+ metallicFactor?: number[];
53
+ normalTexture?: string | null;
54
+ uvScale?: number[];
55
+ uvOffset?: number[];
56
+ uvRotation?: number;
57
+ uvOffsetAnim?: number[];
58
+ normalMapFactor?: number;
59
+ emissiveTexture?: string | null;
60
+ emissiveFactor?: number[];
61
+ emitColorFactor?: number;
62
+ emitMultiplicative?: number;
63
+ }
64
+ interface LitSymbol {
65
+ bloom?: boolean;
66
+ ssr?: boolean;
67
+ polygonOpacity?: number;
68
+ material?: LitMaterial;
69
+ }
70
+ interface WaterSymbol {
71
+ ssr?: boolean;
72
+ texWaveNormal?: string | null;
73
+ texWavePerturbation?: string | null;
74
+ waterBaseColor?: number[];
75
+ contrast?: number;
76
+ hsv?: number[];
77
+ uvScale?: number;
78
+ animation?: boolean;
79
+ waterSpeed?: number;
80
+ waterDirection?: number;
81
+ }
82
+ type VtSymbol = FillSymbol | LineSymbol | MarkerCommonSymbol | TextSymbol | WaterSymbol | LitSymbol;
83
+ interface BackgroundConfig {
84
+ enable: boolean;
85
+ renderPlugin: {
86
+ type: "fill";
87
+ sceneConfig: VtSceneConfig;
88
+ };
89
+ symbol: FillSymbol;
90
+ }
91
+
92
+ /**
93
+ * Style:
94
+ * [
95
+ * {
96
+ * renderPlugin : { ... },
97
+ * filter : [],
98
+ * symbol : { ... }
99
+ * }
100
+ * ]
101
+ */
102
+ declare class VectorTileLayer extends maptalks.TileLayer {
103
+ VERSION: string;
104
+ ready: boolean;
105
+ options: VectorTileLayerOptionsType;
106
+ static loadFrom(url: string, fetchOptions: Record<string, any>): Promise<VectorTileLayer>;
107
+ constructor(id: string, options: VectorTileLayerOptionsType);
108
+ /**
109
+ * 设置url处理函数。
110
+ *
111
+ * @english
112
+ * Set URL processing function.
113
+ * @param modifier - URL processing function
114
+ * @return this
115
+ */
116
+ setURLModifier(modifier: Function): this;
117
+ /**
118
+ * 获取url处理函数。
119
+ *
120
+ * @english
121
+ * Get URL processing function.
122
+ * @return url modifier
123
+ */
124
+ getURLModifier(): Function;
125
+ onAdd(): void;
126
+ /**
127
+ * 设置数据状态。
128
+ *
129
+ * @english
130
+ * Set state of feature.
131
+ * @param source - layer source
132
+ * @param state - feature state
133
+ * @return this
134
+ */
135
+ setFeatureState(source: {
136
+ id: string;
137
+ layer: string;
138
+ }, state: unknown): this;
139
+ /**
140
+ * 删除数据状态。
141
+ *
142
+ * @english
143
+ * Remove state of feature.
144
+ * @param source - layer source
145
+ * @param key - object key
146
+ * @return this
147
+ */
148
+ removeFeatureState(source: {
149
+ id: string;
150
+ layer: string;
151
+ }, key: string | number | object): this;
152
+ /**
153
+ * 获取数据状态。
154
+ *
155
+ * @english
156
+ * Get state of feature.
157
+ * @param source - layer source
158
+ * @return feature state
159
+ */
160
+ getFeatureState(source: any): unknown;
161
+ protected _prepareOptions(): void;
162
+ onWorkerReady(): void;
163
+ /**
164
+ * 更新图层配置。
165
+ *
166
+ * @english
167
+ * Update layer config.
168
+ * @param conf - layer config
169
+ * @return void
170
+ */
171
+ onConfig(conf: object): void;
172
+ /**
173
+ * 获取worker参数。
174
+ *
175
+ * @english
176
+ * Get worker options.
177
+ * @return worker options
178
+ */
179
+ getWorkerOptions(): Record<string, any>;
180
+ /**
181
+ * 设置图层样式。
182
+ *
183
+ * @english
184
+ * Set the style of layer.
185
+ * @param style - vt style object
186
+ * @return this
187
+ */
188
+ setStyle(style: any): this;
189
+ queryTilePointTerrain(point: any, terrainTileInfo: any, tilePoint: any, extent: any, res: any): any;
190
+ queryTerrainTiles(tileInfo: object): any;
191
+ /**
192
+ * 获取图层的polygonOffsetCount,用于GroupGLLayer全局管理polygonOffset。
193
+ *
194
+ * @english
195
+ * Get the polygonOffsetCount of layer,used for GroupGLLayer global management of polygonOffset.
196
+ * @return polygonOffsetCount
197
+ */
198
+ getPolygonOffsetCount(): any;
199
+ /**
200
+ * 获取图层的polygonOffset,用于GroupGLLayer全局管理polygonOffset
201
+ *
202
+ * @english
203
+ * Get the polygonOffset of layer,used for GroupGLLayer global management of polygonOffset
204
+ * @return polygonOffset
205
+ */
206
+ getPolygonOffset(): number;
207
+ /**
208
+ * 设置图层的polygonOffset
209
+ *
210
+ * @english
211
+ * Set the polygonOffset of layer
212
+ * @return this
213
+ */
214
+ setPolygonOffset(offset: number, total?: number): this;
215
+ /**
216
+ * 获取图层的polygonOffset总数。
217
+ *
218
+ * @english
219
+ * Get the total polygonOffset of layer
220
+ * @return total polygonOffset
221
+ */
222
+ getTotalPolygonOffset(): number;
223
+ /**
224
+ * 获取已经渲染的features。
225
+ *
226
+ * @english
227
+ * Get rendered features of layer
228
+ * @return rendered features
229
+ */
230
+ getRenderedFeatures(): any;
231
+ getRenderedFeaturesAsync(options?: AsyncFeatureQueryOptions): Promise<unknown>;
232
+ /**
233
+ * 高亮整个图层
234
+ *
235
+ * @english
236
+ * Outline the layer
237
+ * @return this
238
+ */
239
+ outlineAll(): this;
240
+ /**
241
+ * 高亮数据
242
+ *
243
+ * @english
244
+ * Outline features
245
+ * @param idx - style index
246
+ * @param featureIds - feature ids
247
+ * @return this
248
+ */
249
+ outline(idx: number, featureIds: number[]): this;
250
+ /**
251
+ * 高亮数据
252
+ *
253
+ * @english
254
+ * Outline features
255
+ * @param idx - style index
256
+ * @return this
257
+ */
258
+ outlineBatch(idx: number): this;
259
+ /**
260
+ * 高亮数据
261
+ *
262
+ * @english
263
+ * Outline features
264
+ * @param featureIds - feature ids
265
+ * @return this
266
+ */
267
+ outlineFeatures(featureIds: number[]): this;
268
+ /**
269
+ * 取消高亮
270
+ *
271
+ * @english
272
+ * Cancel outline
273
+ * @return this
274
+ */
275
+ cancelOutline(): this;
276
+ highlight(highlights: any): this;
277
+ cancelHighlight(ids: number): this;
278
+ cancelAllHighlight(): this;
279
+ /**
280
+ * 更新 SceneConfig
281
+ *
282
+ * @english
283
+ * Update sceneConfig
284
+ * @param idx - style name or index
285
+ * @param sceneConfig - properties of sceneConfig
286
+ * @return this
287
+ */
288
+ updateSceneConfig(idx: string | number, sceneConfig: VtSceneConfig): this;
289
+ /**
290
+ * 更新 feature 的 SceneConfig
291
+ *
292
+ * @english
293
+ * Update feature sceneConfig
294
+ * @param idx - feature index
295
+ * @param styleIdx - style index
296
+ * @param sceneConfig - properties of sceneConfig
297
+ * @return this
298
+ */
299
+ updateFeatureSceneConfig(idx: number, styleIdx: number, sceneConfig: VtSceneConfig): this;
300
+ /**
301
+ * 更新 dataConfig
302
+ *
303
+ * @english
304
+ * Update dataConfig
305
+ * @param idx - style name or index
306
+ * @param dataConfig - properties of dataConfig
307
+ * @return this
308
+ */
309
+ updateDataConfig(idx: number | string, dataConfig: VtDataConfig): this;
310
+ /**
311
+ * 更新 feature 的 dataConfig
312
+ *
313
+ * @english
314
+ * Update feature dataConfig
315
+ * @param idx - feature index
316
+ * @param styleIdx - style index
317
+ * @param dataConfig - properties of dataConfig
318
+ * @return this
319
+ */
320
+ updateFeatureDataConfig(idx: number, styleIdx: number, dataConfig: VtDataConfig): this;
321
+ /**
322
+ * 更新 symbol
323
+ *
324
+ * @english
325
+ * Update symbol
326
+ * @param idx - style name or index
327
+ * @param symbol - properties of symbol
328
+ * @return this
329
+ */
330
+ updateSymbol(idx: number | string, symbol: VtSymbol): this;
331
+ /**
332
+ * 更新 feature symbol
333
+ *
334
+ * @english
335
+ * Update symbol
336
+ * @param idx - style name or index
337
+ * @param symbol - properties of symbol
338
+ * @return this
339
+ */
340
+ updateFeatureSymbol(idx: number, feaStyleIdx: number, symbol: VtSymbol): this;
341
+ isDefaultRender(): any;
342
+ /**
343
+ * 校验style是否合法
344
+ *
345
+ * @english
346
+ * Validate style
347
+ * @return void
348
+ */
349
+ validateStyle(): void;
350
+ /**
351
+ * 获取当前 style
352
+ *
353
+ * @english
354
+ * Get style
355
+ * @return style
356
+ */
357
+ getStyle(): any;
358
+ /**
359
+ * 获取图层的背景设置
360
+ *
361
+ * @english
362
+ * Get Background config of the layer
363
+ * @return backgroundConfig
364
+ */
365
+ getGroundConfig(): BackgroundConfig;
366
+ getComputedStyle(): any;
367
+ /**
368
+ * 识别给定坐标的数据
369
+ *
370
+ * @english
371
+ * Identify the data on the given container point
372
+ * @param coordinate - coordinate to identify
373
+ * @param options=null - options
374
+ * @param options.tolerance=0 - identify tolerance in pixel
375
+ * @param options.count=null - result count
376
+ * @return data identified
377
+ */
378
+ identify(coordinate: maptalks.Coordinate, options?: LayerIdentifyOptionsType): object[];
379
+ /**
380
+ * 识别给定点的数据
381
+ *
382
+ * @english
383
+ * Identify the data on the given container point
384
+ * @param point - point to identify
385
+ * @param options=null - options
386
+ * @param options.tolerance=0 - identify tolerance in pixel
387
+ * @param options.count=0 - result count
388
+ * @return data identified
389
+ */
390
+ identifyAtPoint(point: maptalks.Point, options?: {
391
+ tolerance?: number;
392
+ count?: number;
393
+ filter?: (feature: any) => boolean;
394
+ }): object[];
395
+ /**
396
+ * A separate collision index for background tiles
397
+ * To avoid conflict with current zoom's tiles
398
+ * @returns {CollisionIndex}
399
+ */
400
+ /**
401
+ * Clear layer's background tiles collision index.
402
+ */
403
+ /**
404
+ * Return vector tile data's schema, including layers, properties, data types
405
+ * Will return all zoom's schema if z is undefined
406
+ * @param {Number} [z=undefined] - tile's zoom, optional
407
+ * @returns {Object} data schema
408
+ */
409
+ /**
410
+ * 返回矢量瓦片数据的重要信息,包括图层、属性和数据类型
411
+ *
412
+ * @english
413
+ * Return vector tile data's schema, including layers, properties, data types
414
+ * @param z=undefined - tile's zoom, optional
415
+ * @return data schema
416
+ */
417
+ getDataSchema(z: number): object;
418
+ onRemove(): void;
419
+ static fromJSON(layerJSON: object): VectorTileLayer;
420
+ static registerPlugin(Plugin: {
421
+ type: string;
422
+ [key: string]: unknown;
423
+ }): void;
424
+ static getPlugins(): any;
425
+ static compressStyleJSON(json: object | object[]): object;
426
+ }
427
+
428
+ type VectorTileLayerOptionsType = {
429
+ renderer?: "gl";
430
+ altitudeProperty?: string;
431
+ features?: boolean;
432
+ schema?: boolean;
433
+ collision?: boolean;
434
+ collisionBuffserSize?: number;
435
+ picking?: boolean;
436
+ pickingPoint?: boolean;
437
+ pickingGeometry?: boolean;
438
+ glyphSdfLimitPerFrame?: number;
439
+ antialias?: boolean;
440
+ iconErrorUrl?: string;
441
+ collisionFrameLimit?: number;
442
+ defaultRendering?: boolean;
443
+ textGamma?: number;
444
+ maxIconSize?: number;
445
+ workarounds?: {
446
+ "win-intel-gpu-crash"?: boolean;
447
+ };
448
+ styleScale?: number;
449
+ enableAltitude?: true;
450
+ debugTileData?: boolean;
451
+ altitudeQueryTimeLimitPerFrame?: number;
452
+ workerGlyph?: boolean;
453
+ featureIdProperty?: string;
454
+ currentTilesFirst?: true;
455
+ style?: any;
456
+ } & TileLayerOptionsType;
457
+ type AsyncFeatureQueryOptions = {
458
+ countPerTime?: number;
459
+ };
460
+
461
+ declare class MapboxVectorTileLayer extends VectorTileLayer {
462
+ getTileUrl(x: number, y: number, z: number): string;
463
+ static fromJSON(layerJSON: object): MapboxVectorTileLayer;
464
+ }
465
+
466
+ declare class GeoJSONVectorTileLayer extends VectorTileLayer {
467
+ options: GeoJSONVectorTileLayerOptionsType;
468
+ features: Record<string, any>;
469
+ constructor(id: string, options: GeoJSONVectorTileLayerOptionsType);
470
+ onAdd(): void;
471
+ protected _prepareOptions(): void;
472
+ getWorkerOptions(): Record<string, any>;
473
+ setData(data: any): this;
474
+ getExtent(): maptalks.Extent;
475
+ onWorkerReady(err?: any, params?: any): void;
476
+ getData(): Record<string, any>;
477
+ getTileUrl(x: number, y: number, z: number): string;
478
+ getFeature(id: string): any;
479
+ static fromJSON(layerJSON: LayerJSONType): GeoJSONVectorTileLayer | null;
480
+ }
481
+
482
+ type GeoJSONVectorTileLayerOptionsType = {
483
+ features?: string;
484
+ tileBuffer?: number;
485
+ extent?: number;
486
+ pyramidMode?: 1;
487
+ simplifyTolerance?: number;
488
+ tileStackDepth?: number;
489
+ generateOMBB?: boolean;
490
+ data?: any;
491
+ convertFn?: (data: any) => any;
492
+ } & VectorTileLayerOptionsType;
493
+
494
+ declare const WorkerConnection_base: {
495
+ new (workerKey: string): {
496
+ initializing: boolean;
497
+ workerKey: string;
498
+ workerPool: {
499
+ active: {
500
+ [key: number]: boolean;
501
+ };
502
+ workerCount: number;
503
+ workers: Worker[];
504
+ acquire(id: number): Worker[];
505
+ release(id: number): void;
506
+ addMessage(workerId: number, data: any, buffers: ArrayBuffer[]): void;
507
+ commit(): void;
508
+ getWorkers(): Worker[];
509
+ broadcastIdleMessage(messageRatio: number): any;
510
+ };
511
+ currentActor: number;
512
+ actorId: number;
513
+ workers: Worker[];
514
+ callbacks: {
515
+ [key: string]: Function;
516
+ };
517
+ callbackID: number;
518
+ receiveFn: any;
519
+ created(): void;
520
+ isActive(): boolean;
521
+ broadcast<T = any>(data: T, buffers: ArrayBuffer[], cb: Function): any;
522
+ send<T_1 = any>(data: T_1, buffers: ArrayBuffer[], cb: Function, workerId?: number): any;
523
+ receive(message: maptalks.Message<any>): void;
524
+ remove(): void;
525
+ post(data: any, buffers: ArrayBuffer[], targetID: number): number;
526
+ getDedicatedWorker(): number;
527
+ };
528
+ };
529
+ declare class WorkerConnection extends WorkerConnection_base {
530
+ constructor(workerKey: any, layer: any);
531
+ _layer: any;
532
+ _mapId: any;
533
+ _workerLayerId: string;
534
+ _isDedicated: boolean;
535
+ _dedicatedVTWorkers: {};
536
+ _iconRequestor: any;
537
+ _glyphRequestor: any;
538
+ initialize(cb: any): void;
539
+ addLayer(cb: any): void;
540
+ abortTile(url: any, cb: any): void;
541
+ removeLayer(cb: any): void;
542
+ updateStyle(style: any, cb: any): void;
543
+ updateOptions(options: any, cb: any): void;
544
+ loadTile(context: any, cb: any): void;
545
+ fetchIconGlyphs({ icons, glyphs }: {
546
+ icons: any;
547
+ glyphs: any;
548
+ }, cb: any): void;
549
+ setData(geojson: any, cb: any): void;
550
+ _getTileKey(tileInfo: any): any;
551
+ }
552
+
553
+ declare class DebugPainter {
554
+ constructor(regl: any, map: any, color: any);
555
+ _regl: any;
556
+ _map: any;
557
+ _color: any;
558
+ draw(debugInfo: any, transform: any, tileSize: any, extent: any, fbo: any): void;
559
+ _data: any;
560
+ _textData: any;
561
+ _extent: any;
562
+ _debugInfoCanvas: HTMLCanvasElement;
563
+ _texture: any;
564
+ delete(): void;
565
+ _init(): void;
566
+ _texCoordData: any;
567
+ _command: any;
568
+ }
569
+ //# sourceMappingURL=DebugPainter.d.ts.map
570
+
571
+ declare class TileStencilRenderer {
572
+ constructor(regl: any, canvas: any, map: any);
573
+ _regl: any;
574
+ _geometry: reshader.Geometry;
575
+ _scene: reshader.Scene;
576
+ _meshes: any[];
577
+ _counter: number;
578
+ _canvas: any;
579
+ _map: any;
580
+ start(): void;
581
+ /**
582
+ * 添加一个瓦片
583
+ * @param {Number} ref - stencil ref value
584
+ * @param {Number} extent - vector tile extent: 4096 or 8192
585
+ * @param {Number[]} transform - tile transform matrix
586
+ */
587
+ add(ref: number, EXTENT: any, transform: number[]): void;
588
+ render(fbo: any): void;
589
+ _getMesh(): any;
590
+ _init(regl: any): void;
591
+ _shader: reshader.MeshShader;
592
+ _renderer: reshader.Renderer;
593
+ remove(): void;
594
+ }
595
+
596
+ declare class VectorTileLayerRenderer extends maptalks.renderer.TileLayerCanvasRenderer {
597
+ constructor(layer: any);
598
+ supportRenderMode(): boolean;
599
+ ready: boolean;
600
+ _styleCounter: number;
601
+ _requestingMVT: {};
602
+ _plugins: {};
603
+ _featurePlugins: {};
604
+ getTileLevelValue(tileInfo: any, currentTileZoom: any): number;
605
+ getWorkerConnection(): WorkerConnection;
606
+ getStyleCounter(): number;
607
+ setStyle(): void;
608
+ _workersyncing: boolean;
609
+ _needRetire: boolean;
610
+ _preservePrevTiles(): void;
611
+ _prevTilesInView: maptalks.TilesInViewType;
612
+ _parentTiles: any[];
613
+ _childTiles: any[];
614
+ _tileZoom: any;
615
+ updateOptions(conf: any): void;
616
+ updateSceneConfig(type: any, idx: any, sceneConfig: any): void;
617
+ updateDataConfig(type: any, idx: any, dataConfig: any, old: any): void;
618
+ updateSymbol(type: any, idx: any, symbol: any): any;
619
+ needRetireFrames(): boolean;
620
+ isAnimating(): boolean;
621
+ _highlightFrametime: any;
622
+ needToRefreshTerrainTileOnZooming(): boolean;
623
+ _isInGroupGLLayer(): boolean;
624
+ regl: any;
625
+ glOptions: any;
626
+ pickingFBO: any;
627
+ _debugPainter: DebugPainter;
628
+ _groundPainter: GroundPainter;
629
+ _createREGLContext(canvas: any): {
630
+ gl: any;
631
+ attributes: any;
632
+ regl: createREGL.Regl;
633
+ };
634
+ _prepareWorker(): void;
635
+ _workerConn: WorkerConnection;
636
+ checkResources(): any[];
637
+ _drawTiles(tiles: any, parentTiles: any, childTiles: any, placeholders: any, context: any): void;
638
+ _deletePrevPlugins(): void;
639
+ draw(timestamp: any, parentContext: any): void;
640
+ _frameTime: any;
641
+ _zScale: number;
642
+ _parentContext: any;
643
+ _currentTimestamp: any;
644
+ _setPluginIndex(): void;
645
+ _prepareRender(): void;
646
+ _pluginOffsets: any;
647
+ _polygonOffsetIndex: number;
648
+ getFrameTimestamp(): any;
649
+ drawOnInteracting(event: any, timestamp: any, parentContext: any): void;
650
+ drawOutline(fbo: any): void;
651
+ getAnalysisMeshes(): any[];
652
+ getShadowMeshes(): any[];
653
+ isForeground(mesh: any): boolean;
654
+ _getTileZoomDiff(mesh: any): number;
655
+ isTileNearCamera(mesh: any): boolean;
656
+ isBackTile(id: any): boolean;
657
+ loadTileQueue(tileQueue: any): void;
658
+ loadTile(tileInfo: any): {};
659
+ getTileGLScale(z: any): number;
660
+ getCentimeterToPoint(z: any): number;
661
+ getRenderedFeatures(): {
662
+ tile: {
663
+ id: any;
664
+ x: any;
665
+ y: any;
666
+ z: any;
667
+ url: any;
668
+ };
669
+ current: boolean;
670
+ features: any[];
671
+ }[];
672
+ _onReceiveMVTData(url: any, err: any, data: any): void;
673
+ _parseTileData(styleType: any, i: any, pluginData: any, features: any): {
674
+ isUpdated: boolean;
675
+ layer: {
676
+ layer: any;
677
+ type: any;
678
+ };
679
+ };
680
+ _updateSchema(target: any, source: any): void;
681
+ _updatePluginIfNecessary(styleType: any, i: any, data: any): {
682
+ style: any;
683
+ isUpdated: boolean;
684
+ };
685
+ _layerPlugins: {};
686
+ _getFramePlugins(tileData: any): any;
687
+ _getAllPlugins(): any[];
688
+ _getStylePlugins(styleCounter: any): any;
689
+ _getFeaturePlugins(styleCounter: any): any;
690
+ _startFrame(timestamp: any, filter: any): void;
691
+ _endFrame(timestamp: any): void;
692
+ getPolygonOffsetCount(): number;
693
+ _drawDebug(): void;
694
+ _isVisitable(plugin: any): true | 0 | 1 | 2;
695
+ _getPluginContext(plugin: any, polygonOffsetIndex: any, cameraPosition: any, timestamp: any): {
696
+ regl: any;
697
+ layer: any;
698
+ gl: maptalks.TileRenderingContext;
699
+ isRenderingTerrain: boolean;
700
+ isRenderingTerrainSkin: any;
701
+ sceneConfig: any;
702
+ pluginIndex: any;
703
+ polygonOffsetIndex: any;
704
+ cameraPosition: any;
705
+ timestamp: any;
706
+ };
707
+ _hasMesh(meshes: any): boolean;
708
+ _drawTileStencil(fbo: any, painter: any): void;
709
+ _stencilRenderer: TileStencilRenderer;
710
+ _addTileStencil(tileInfo: any, ref: any): void;
711
+ onDrawTileStart(context: any): void;
712
+ _vtCurrentTiles: {};
713
+ _vtBgTiles: {};
714
+ _stencilTiles: any;
715
+ isEnableTileStencil(): boolean;
716
+ setTerrainHelper(terrainLayer: any): void;
717
+ _terrainLayer: any;
718
+ getTerrainHelper(): any;
719
+ drawTileOnTerrain(...args: any[]): void;
720
+ createTerrainTexture(regl: any): any;
721
+ _terrainDepthStencil: any;
722
+ deleteTerrainTexture(texture: any): void;
723
+ renderTerrainSkin(terrainRegl: any, terrainLayer: any, skinImages: any): void;
724
+ _drawTerrainTile(tile: any): void;
725
+ _endTerrainFrame(skinImages: any): void;
726
+ drawTile(tileInfo: any, tileData: any, filter: any): void;
727
+ _createOneTile(tileInfo: any, tileData: any): void;
728
+ checkTileInQueue(tileData: any): boolean;
729
+ pick(x: any, y: any, options: any): any[];
730
+ deleteTile(tile: any): void;
731
+ abortTileLoading(tileImage: any, tileInfo: any): void;
732
+ resizeCanvas(canvasSize: any): void;
733
+ _clearPlugin(): void;
734
+ plugins: {};
735
+ hitDetect(point: any): boolean;
736
+ _initPlugins(): any;
737
+ _createRenderPlugin(config: any): any;
738
+ _createGLContext(canvas: any, options: any): any;
739
+ _getCentiMeterScale(res: any): number;
740
+ debugFBO(id: any, fbo: any): void;
741
+ _getDefaultRenderPlugin(type: any): {
742
+ plugin: any;
743
+ symbol: {
744
+ markerFill: string;
745
+ markerSize: number;
746
+ markerOpacity: number;
747
+ lineColor?: undefined;
748
+ lineOpacity?: undefined;
749
+ polygonFill?: undefined;
750
+ polygonOpacity?: undefined;
751
+ } | {
752
+ lineColor: string;
753
+ lineOpacity: number;
754
+ markerFill?: undefined;
755
+ markerSize?: undefined;
756
+ markerOpacity?: undefined;
757
+ polygonFill?: undefined;
758
+ polygonOpacity?: undefined;
759
+ } | {
760
+ polygonFill: string;
761
+ polygonOpacity: number;
762
+ markerFill?: undefined;
763
+ markerSize?: undefined;
764
+ markerOpacity?: undefined;
765
+ lineColor?: undefined;
766
+ lineOpacity?: undefined;
767
+ };
768
+ renderPlugin: {
769
+ type: string;
770
+ dataConfig: {
771
+ type: string;
772
+ only2D: boolean;
773
+ };
774
+ sceneConfig?: undefined;
775
+ } | {
776
+ type: string;
777
+ dataConfig: {
778
+ type: string;
779
+ only2D: boolean;
780
+ };
781
+ sceneConfig: {
782
+ antialias: boolean;
783
+ };
784
+ };
785
+ };
786
+ _isVisible(): boolean;
787
+ isEnableWorkAround(key: any): boolean;
788
+ getZScale(): number;
789
+ outline(idx: any, featureIds: any): void;
790
+ _outline: any[];
791
+ outlineFeatures(featureIds: any): void;
792
+ outlineBatch(idx: any): void;
793
+ outlineAll(): void;
794
+ _outlineAll: boolean;
795
+ paintOutlineAll(fbo: any): void;
796
+ paintOutline(fbo: any, idx: any, featureIds: any): void;
797
+ paintBatchOutline(fbo: any, idx: any): void;
798
+ cancelOutline(): void;
799
+ setZIndex(...args: any[]): any;
800
+ consumeTile(tileImage: any, tileInfo: any): void;
801
+ onTileError(tileImage: any, tileInfo: any): void;
802
+ _retirePrevTile(tileInfo: any): void;
803
+ highlight(highlights: any): void;
804
+ _highlighted: Map<any, any>;
805
+ _highlightUpdated: boolean;
806
+ cancelHighlight(names: any): void;
807
+ cancelAllHighlight(): void;
808
+ _getLayerOpacity(): any;
809
+ }
810
+
811
+ declare class Vector3DLayer extends maptalks.OverlayLayer {
812
+ static registerPainter(name: string, clazz: unknown): void;
813
+ static get3DPainterClass(name: string): any;
814
+ setURLModifier(modifier: Function): this;
815
+ getURLModifier(): Function;
816
+ getEvents(): any;
817
+ onConfig(conf: unknown): void;
818
+ updateSymbol(idx: number, symbol: Record<string, any>): this;
819
+ /**
820
+ * 获取图层的polygonOffsetCount
821
+ * 用于GroupGLLayer全局管理polygonOffset
822
+ */
823
+ getPolygonOffsetCount(): 0 | 1;
824
+ /**
825
+ * 获取图层的polygonOffset
826
+ * 用于GroupGLLayer全局管理polygonOffset
827
+ */
828
+ getPolygonOffset(): number;
829
+ setPolygonOffset(offset: number, total: number): this;
830
+ getTotalPolygonOffset(): number;
831
+ /**
832
+ * Identify the geometries on the given coordinate
833
+ * @param {maptalks.Coordinate} coordinate - coordinate to identify
834
+ * @param {Object} [options=null] - options
835
+ * @param {Object} [options.tolerance=0] - identify tolerance in pixel
836
+ * @param {Object} [options.count=null] - result count
837
+ * @return {Geometry[]} geometries identified
838
+ */
839
+ identify(coordinate: maptalks.Coordinate, options?: LayerIdentifyOptionsType): maptalks.Geometry[];
840
+ /**
841
+ * Identify the geometries on the given container point
842
+ * @param point - point to identify
843
+ * @param [options=null] - options
844
+ * @param [options.tolerance=0] - identify tolerance in pixel
845
+ * @param [options.count=null] - result count
846
+ * @return geometries identified
847
+ */
848
+ identifyAtPoint(point: maptalks.Point, options?: {
849
+ tolerance?: number;
850
+ count?: number;
851
+ filter?: (picked: any) => boolean;
852
+ }): any[];
853
+ getComputedStyle(): {
854
+ style: any;
855
+ };
856
+ outlineAll(): this;
857
+ outline(geoIds: string[]): this;
858
+ cancelOutline(): this;
859
+ /**
860
+ * Export the Layer's JSON. <br>
861
+ * @return {Object} layer's JSON
862
+ */
863
+ toJSON(): any;
864
+ getTileSize(): maptalks.Size;
865
+ }
866
+ //# sourceMappingURL=Vector3DLayer.d.ts.map
867
+
868
+ declare namespace ICON_PAINTER_SCENECONFIG {
869
+ let collision: boolean;
870
+ let fading: boolean;
871
+ let fadingDuration: number;
872
+ let fadeInDelay: number;
873
+ let fadeOutDelay: number;
874
+ let uniquePlacement: boolean;
875
+ let depthFunc: string;
876
+ }
877
+
878
+ interface PointLayerOptions extends OverlayLayerOptionsType {
879
+ glyphSdfLimitPerFrame?: number;
880
+ iconErrorUrl?: string;
881
+ workarounds?: {
882
+ "win-intel-gpu-crash"?: boolean;
883
+ };
884
+ sceneConfig?: typeof ICON_PAINTER_SCENECONFIG;
885
+ collisionFrameLimit?: number;
886
+ }
887
+ declare class PointLayer extends Vector3DLayer {
888
+ options: PointLayerOptions;
889
+ /**
890
+ * Reproduce a PointLayer from layer's JSON.
891
+ * @param {Object} layerJSON - layer's JSON
892
+ * @return {PointLayer}
893
+ * @static
894
+ * @private
895
+ * @function
896
+ */
897
+ static fromJSON(json: object): PointLayer;
898
+ constructor(...args: any);
899
+ getPolygonOffsetCount(): 0 | 1;
900
+ getPolygonOffset(): number;
901
+ }
902
+ //# sourceMappingURL=PointLayer.d.ts.map
903
+
904
+ declare class LineStringLayer extends Vector3DLayer {
905
+ /**
906
+ * Reproduce a LineStringLayer from layer's JSON.
907
+ * @param {Object} layerJSON - layer's JSON
908
+ * @return {LineStringLayer}
909
+ * @static
910
+ * @private
911
+ * @function
912
+ */
913
+ static fromJSON(json: object): LineStringLayer;
914
+ }
915
+ //# sourceMappingURL=LineStringLayer.d.ts.map
916
+
917
+ declare class PolygonLayer extends Vector3DLayer {
918
+ /**
919
+ * Reproduce a PolygonLayer from layer's JSON.
920
+ * @param {Object} layerJSON - layer's JSON
921
+ * @return {PolygonLayer}
922
+ * @static
923
+ * @private
924
+ * @function
925
+ */
926
+ static fromJSON(json: object): PolygonLayer;
927
+ }
928
+
929
+ interface ExtrudePolygonLayerOptions extends OverlayLayerOptionsType {
930
+ dataConfig: LitDataConfig;
931
+ material: LitMaterial;
932
+ sideMaterial: LitMaterial;
933
+ }
934
+ declare class ExtrudePolygonLayer extends Vector3DLayer {
935
+ options: ExtrudePolygonLayerOptions;
936
+ /**
937
+ * Reproduce a PolygonLayer from layer's JSON.
938
+ * @param {Object} layerJSON - layer's JSON
939
+ * @return {PolygonLayer}
940
+ * @static
941
+ * @private
942
+ * @function
943
+ */
944
+ static fromJSON(json: object): ExtrudePolygonLayer;
945
+ getPolygonOffsetCount(): 0 | 1;
946
+ getPolygonOffset(): number;
947
+ onConfig(conf: Record<string, any>): void;
948
+ updateMaterial(matInfo: LitMaterial): this;
949
+ updateSideMaterial(matInfo: LitMaterial): this;
950
+ updateDataConfig(dataConfig: LitDataConfig): this;
951
+ }
952
+ //# sourceMappingURL=ExtrudePolygonLayer.d.ts.map
953
+
954
+ export { ExtrudePolygonLayer, GeoJSONVectorTileLayer, LineStringLayer, MapboxVectorTileLayer, PointLayer, PolygonLayer, Vector3DLayer, VectorTileLayer, VectorTileLayerRenderer };
955
+ //# sourceMappingURL=maptalks.vt.d.ts.map