@terra.gl/core 0.0.1-alpha.54 → 0.0.1-alpha.61

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.
package/dist/index.d.ts CHANGED
@@ -3857,8 +3857,9 @@ declare class Map extends Map_base {
3857
3857
  /**
3858
3858
  * Remove layer.
3859
3859
  * 移除图层
3860
+ * @param layerOrId Layer instance or layer ID. 图层实例或图层ID
3860
3861
  */
3861
- removeLayer(layerId: string): boolean;
3862
+ removeLayer(layerOrId: string | Layer): boolean;
3862
3863
  /**
3863
3864
  * Add regular layer (Add to scene only).
3864
3865
  * 添加普通图层(只添加到场景)
@@ -7316,6 +7317,7 @@ export declare class VectorTileLayer extends BaseTileLayer {
7316
7317
  _feaList: Feature[];
7317
7318
  _collision: boolean;
7318
7319
  private _renderAltitude;
7320
+ private _eventsBound;
7319
7321
  /**
7320
7322
  * Create a new VectorTileLayer instance.
7321
7323
  * 创建一个新的 VectorTileLayer 实例。
@@ -7420,6 +7422,20 @@ export declare class VectorTileLayer extends BaseTileLayer {
7420
7422
  * @param opacity Opacity value (0-1). 透明度值 (0-1)。
7421
7423
  */
7422
7424
  setOpacity(opacity: number): void;
7425
+ /**
7426
+ * Hide layer.
7427
+ * 隐藏图层。
7428
+ *
7429
+ * @returns {this} The layer instance for chaining. 图层实例,用于链式调用。
7430
+ */
7431
+ hide(): this;
7432
+ /**
7433
+ * Show layer.
7434
+ * 显示图层。
7435
+ *
7436
+ * @returns {this} The layer instance for chaining. 图层实例,用于链式调用。
7437
+ */
7438
+ show(): this;
7423
7439
  /**
7424
7440
  * Update layer - Override to add vector specific logic.
7425
7441
  * 更新图层 - 重写以添加矢量特定逻辑。
@@ -7432,9 +7448,29 @@ export declare class VectorTileLayer extends BaseTileLayer {
7432
7448
  * 重写dispose方法,清理矢量数据。
7433
7449
  */
7434
7450
  dispose(): void;
7451
+ /**
7452
+ * Enable or disable feature picking dynamically.
7453
+ * 动态开启或关闭要素拾取。
7454
+ * @param enabled Whether to enable feature picking. 是否开启要素拾取。
7455
+ */
7456
+ setFeaturePickingEnabled(enabled: boolean): void;
7457
+ private _bindRendererEvents;
7435
7458
  _setRenderer(renderer: VectorTileRenderLayer): void;
7436
7459
  _getRenderer(): VectorTileRenderLayer;
7437
7460
  getStyle(): any;
7461
+ /**
7462
+ * Update layer style configuration dynamically.
7463
+ * 动态更新图层样式配置。
7464
+ *
7465
+ * @param style New style configuration (StyleRule[]). 新的样式配置 (StyleRule[])。
7466
+ * @returns {this}
7467
+ */
7468
+ setStyle(style: any): this;
7469
+ /**
7470
+ *
7471
+ * setStyle
7472
+ */
7473
+ setSymbol(style: any): this;
7438
7474
  }
7439
7475
 
7440
7476
  /**
@@ -7463,6 +7499,12 @@ export declare interface VectorTileLayerOptions extends BaseTileLayerOptions {
7463
7499
  * @default false
7464
7500
  */
7465
7501
  collision?: boolean;
7502
+ /**
7503
+ * Whether to enable feature picking (Optional).
7504
+ * 是否开启要素拾取(可选)。
7505
+ * @default false
7506
+ */
7507
+ enableFeaturePicking?: boolean;
7466
7508
  }
7467
7509
 
7468
7510
  /**
@@ -7499,6 +7541,7 @@ declare class VectorTileRenderLayer extends OverlayLayer<Feature> {
7499
7541
  private readonly TILE_SIZE;
7500
7542
  private readonly EXTENT;
7501
7543
  style: StyleRule[];
7544
+ interactive: boolean;
7502
7545
  /**
7503
7546
  * Store Features corresponding to each tile for lifecycle management and updates.
7504
7547
  * 存储每个瓦片对应的 Features,用于管理生命周期和更新。
@@ -7571,6 +7614,33 @@ declare class VectorTileRenderLayer extends OverlayLayer<Feature> {
7571
7614
  * 地图更新回调:强制所有已加载的 Features 重新计算其局部世界坐标。
7572
7615
  */
7573
7616
  private _onMapUpdate;
7617
+ /**
7618
+ * Update style configuration and re-apply to all existing features.
7619
+ * 更新样式配置并重新应用到所有现有要素。
7620
+ *
7621
+ * @param newStyleRules New style rules array. 新的样式规则数组。
7622
+ * @param tileDataMap Tile data map from VectorTileLayer (for re-matching). 来自 VectorTileLayer 的瓦片数据映射(用于重新匹配)。
7623
+ * @description
7624
+ * This method enables dynamic style switching by:
7625
+ * 1. Updating the global style rules
7626
+ * 2. Re-evaluating each cached feature against the new rules
7627
+ * 3. Directly updating feature styles without removing/recreating them
7628
+ *
7629
+ * 此方法通过以下方式实现动态样式切换:
7630
+ * 1. 更新全局样式规则
7631
+ * 2. 根据新规则重新评估每个缓存的要素
7632
+ * 3. 直接更新要素样式而不删除/重新创建它们
7633
+ */
7634
+ updateStyle(newStyleRules: any, tileDataMap: Map<string, any>): void;
7635
+ /**
7636
+ * Apply style configuration to an existing feature.
7637
+ * 将样式配置应用到现有要素。
7638
+ *
7639
+ * @param feature The feature to update. 要更新的要素。
7640
+ * @param styleConfig The new style configuration. 新的样式配置。
7641
+ * @private
7642
+ */
7643
+ private _applyStyleToFeature;
7574
7644
  /**
7575
7645
  * OverlayLayer abstract method implementation.
7576
7646
  * OverlayLayer 抽象方法实现