@gis_victory/gismap 2.0.12 → 2.0.14

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
@@ -16,7 +16,6 @@ import { ComponentProvideOptions } from 'vue';
16
16
  import { ComponentSize } from 'element-plus';
17
17
  import { ComputedRef } from 'vue';
18
18
  import { CreateComponentPublicInstanceWithMixins } from 'vue';
19
- import { default as default_2 } from '@gis_victory/mapbox-gl';
20
19
  import { DefineComponent } from 'vue';
21
20
  import { EpPropFinalized } from 'element-plus/es/utils/index.mjs';
22
21
  import { EpPropMergeType } from 'element-plus/es/utils/index.mjs';
@@ -270,6 +269,17 @@ enable: () => void;
270
269
  disable: () => void;
271
270
  reset: () => void;
272
271
  } | undefined;
272
+ readonly templateManager: {
273
+ initialize: (templateItems: TemplateItem[]) => void;
274
+ getTemplate: (templateId: string) => TemplateItem | undefined;
275
+ addTemplate: (templateId: string, template: TemplateItem) => void;
276
+ removeTemplate: (templateId: string) => void;
277
+ updateTemplate: (templateId: string, template: TemplateItem) => void;
278
+ getAllTemplates: () => Map<string, TemplateItem>;
279
+ getTemplateIds: () => string[];
280
+ hasTemplate: (templateId: string) => boolean;
281
+ clear: () => void;
282
+ } | undefined;
273
283
  initialize: (services: {
274
284
  layerService: LayerService;
275
285
  markerService: MarkerService;
@@ -338,6 +348,20 @@ containerRef: HTMLDivElement;
338
348
  mapContainerRef: HTMLDivElement;
339
349
  }, HTMLDivElement>;
340
350
 
351
+ declare const __VLS_component_2: DefineComponent<ExtractPropTypes< {
352
+ downloadUrl: {
353
+ type: FunctionConstructor;
354
+ default: undefined;
355
+ };
356
+ }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
357
+ downloadUrl: {
358
+ type: FunctionConstructor;
359
+ default: undefined;
360
+ };
361
+ }>> & Readonly<{}>, {
362
+ downloadUrl: Function;
363
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
364
+
341
365
  declare function __VLS_template(): {
342
366
  attrs: Partial<{}>;
343
367
  slots: {
@@ -354,8 +378,19 @@ declare function __VLS_template(): {
354
378
  rootEl: HTMLDivElement;
355
379
  };
356
380
 
381
+ declare function __VLS_template_2(): {
382
+ attrs: Partial<{}>;
383
+ slots: {
384
+ actions?(_: {}): any;
385
+ };
386
+ refs: {};
387
+ rootEl: any;
388
+ };
389
+
357
390
  declare type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
358
391
 
392
+ declare type __VLS_TemplateResult_2 = ReturnType<typeof __VLS_template_2>;
393
+
359
394
  declare type __VLS_WithTemplateSlots<T, S> = T & {
360
395
  new (): {
361
396
  $slots: S;
@@ -392,6 +427,12 @@ declare type __VLS_WithTemplateSlots_6<T, S> = T & {
392
427
  };
393
428
  };
394
429
 
430
+ declare type __VLS_WithTemplateSlots_7<T, S> = T & {
431
+ new (): {
432
+ $slots: S;
433
+ };
434
+ };
435
+
395
436
  export declare const API_CONFIG: ApiConfig;
396
437
 
397
438
  declare interface ApiConfig {
@@ -3556,6 +3597,24 @@ trigger: string;
3556
3597
  default?(_: {}): any;
3557
3598
  }>;
3558
3599
 
3600
+ export declare const GisMapQueryPopup: DefineComponent<ExtractPropTypes< {
3601
+ downloadUrl: {
3602
+ type: FunctionConstructor;
3603
+ default: undefined;
3604
+ };
3605
+ }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
3606
+ downloadUrl: {
3607
+ type: FunctionConstructor;
3608
+ default: undefined;
3609
+ };
3610
+ }>> & Readonly<{}>, {
3611
+ downloadUrl: Function;
3612
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {
3613
+ popupRef: HTMLDivElement;
3614
+ }, HTMLDivElement>;
3615
+
3616
+ export declare const GisMapQueryResult: __VLS_WithTemplateSlots_5<typeof __VLS_component_2, __VLS_TemplateResult_2["slots"]>;
3617
+
3559
3618
  export declare const GisMapSearch: DefineComponent<ExtractPropTypes< {
3560
3619
  data: {
3561
3620
  type: ArrayConstructor;
@@ -3680,21 +3739,6 @@ default: () => never[];
3680
3739
  data: any[];
3681
3740
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
3682
3741
 
3683
- /**
3684
- * GSMap — mapboxgl.Map 的扩展类型
3685
- * @deprecated 新代码请使用 MapContext + Composables,不要再扩展此类型
3686
- */
3687
- export declare class GSMap extends default_2.Map {
3688
- manager?: any;
3689
- }
3690
-
3691
- export declare class GSMarker extends default_2.Marker {
3692
- private data;
3693
- constructor(options: any);
3694
- setData(data: any): void;
3695
- getData(): any;
3696
- }
3697
-
3698
3742
  /**
3699
3743
  * 图标配置
3700
3744
  */
@@ -3872,11 +3916,11 @@ export declare interface IGISMap extends mapboxgl.Map {
3872
3916
  /**
3873
3917
  * 缩放到指定级别
3874
3918
  */
3875
- zoomTo(zoom: number, options?: mapboxgl.CameraOptions & mapboxgl.AnimationOptions): void;
3919
+ zoomTo(zoom: number, options?: mapboxgl.CameraOptions & mapboxgl.AnimationOptions): this;
3876
3920
  /**
3877
3921
  * 适应边界
3878
3922
  */
3879
- fitBounds(bounds: [number, number, number, number], options?: mapboxgl.FitBoundsOptions): void;
3923
+ fitBounds(bounds: [number, number, number, number], options?: mapboxgl.FitBoundsOptions): this;
3880
3924
  /**
3881
3925
  * 获取视图范围
3882
3926
  */
@@ -3905,7 +3949,7 @@ export declare interface IGISMap extends mapboxgl.Map {
3905
3949
  /**
3906
3950
  * 移除控件
3907
3951
  */
3908
- removeControl(control: mapboxgl.IControl): void;
3952
+ removeControl(control: mapboxgl.IControl): this;
3909
3953
  }
3910
3954
 
3911
3955
  /**
@@ -4328,11 +4372,14 @@ export declare interface LayerPaint {
4328
4372
  /** 图层查询点击载荷 */
4329
4373
  export declare interface LayerQueryClickPayload {
4330
4374
  layerId: string;
4331
- templateId: string;
4332
- center: [number, number];
4333
- feature: any;
4334
- features: any[];
4335
- dataExtension: any;
4375
+ templateId?: string;
4376
+ center?: [number, number];
4377
+ feature?: any;
4378
+ features?: any[];
4379
+ dataExtension?: any;
4380
+ legendData?: any;
4381
+ isCommonPopup?: boolean;
4382
+ isShow?: boolean;
4336
4383
  }
4337
4384
 
4338
4385
  export declare interface LayerRemoveEvent extends LayerEvent {
@@ -4711,6 +4758,7 @@ export declare class MapContext {
4711
4758
  private _layerManager?;
4712
4759
  private _radarManager?;
4713
4760
  private _iconManager?;
4761
+ private _templateManager?;
4714
4762
  private _drawManager?;
4715
4763
  private _measureManager?;
4716
4764
  constructor(config: MapContextConfig);
@@ -4754,6 +4802,10 @@ export declare class MapContext {
4754
4802
  * 获取图层管理器
4755
4803
  */
4756
4804
  get layerManager(): LayerManager | undefined;
4805
+ /**
4806
+ * 获取模板管理器
4807
+ */
4808
+ get templateManager(): TemplateManager | undefined;
4757
4809
  /**
4758
4810
  * 初始化上下文
4759
4811
  */
@@ -4868,7 +4920,7 @@ export declare interface MapLoadEvent {
4868
4920
  map: any;
4869
4921
  }
4870
4922
 
4871
- export declare const MapPage: __VLS_WithTemplateSlots_5<DefineComponent<ExtractPropTypes< {
4923
+ export declare const MapPage: __VLS_WithTemplateSlots_6<DefineComponent<ExtractPropTypes< {
4872
4924
  mapViewData: {
4873
4925
  type: ObjectConstructor;
4874
4926
  default: () => {
@@ -5485,7 +5537,7 @@ default: () => never[];
5485
5537
  data: SwitchLayerPayload[];
5486
5538
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
5487
5539
 
5488
- export declare const MobileMapLayer: __VLS_WithTemplateSlots_6<DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>, {
5540
+ export declare const MobileMapLayer: __VLS_WithTemplateSlots_7<DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>, {
5489
5541
  default?(_: {}): any;
5490
5542
  }>;
5491
5543
 
@@ -5673,28 +5725,7 @@ declare interface QueryOptions {
5673
5725
  }
5674
5726
 
5675
5727
  declare class QuickSearchManager {
5676
- private map;
5677
- private markers;
5678
- private selectMarker;
5679
- private popup;
5680
- private callback;
5681
- private templateManager;
5682
- private popupManager;
5683
- constructor(map: GSMap);
5684
- addFunction(callback: any): void;
5685
- add(options: {
5686
- uuid: string;
5687
- templateId: string;
5688
- geometry: any;
5689
- index: number;
5690
- properties: any;
5691
- }): void;
5692
- addGroup(options: {
5693
- data: any[];
5694
- }): void;
5695
- flyTo(uuid: string): void;
5696
- addPopup(): void;
5697
- clear(): void;
5728
+ constructor();
5698
5729
  }
5699
5730
 
5700
5731
  export declare class RadarManager {
@@ -5937,6 +5968,15 @@ declare class TDTManager {
5937
5968
  hide(layerId: string): void;
5938
5969
  }
5939
5970
 
5971
+ /**
5972
+ * 模板按钮配置
5973
+ */
5974
+ declare interface TemplateButton {
5975
+ label: string;
5976
+ type: string;
5977
+ event?: string;
5978
+ }
5979
+
5940
5980
  /**
5941
5981
  * 模板配置
5942
5982
  */
@@ -5949,6 +5989,23 @@ export declare interface TemplateConfig {
5949
5989
  style?: Record<string, any>;
5950
5990
  }
5951
5991
 
5992
+ /**
5993
+ * 模板字段配置
5994
+ */
5995
+ declare interface TemplateField {
5996
+ fieldType: string;
5997
+ fieldName: string;
5998
+ fieldLabel: string;
5999
+ format: string;
6000
+ unit: string;
6001
+ style: {
6002
+ span: number;
6003
+ };
6004
+ isShowList?: boolean;
6005
+ isShowInfo?: boolean;
6006
+ isShowMore?: boolean;
6007
+ }
6008
+
5952
6009
  /** 模板查询载荷(MapSearch 触发,业务层监听后调用 callback 回填配置) */
5953
6010
  export declare interface TemplateGetPayload {
5954
6011
  /** 模板 ID */
@@ -5957,6 +6014,70 @@ export declare interface TemplateGetPayload {
5957
6014
  callback: (config: any) => void;
5958
6015
  }
5959
6016
 
6017
+ /**
6018
+ * 模板配置
6019
+ */
6020
+ declare interface TemplateItem {
6021
+ id: string;
6022
+ width?: number;
6023
+ labelWidth?: number;
6024
+ header: string;
6025
+ body: TemplateField[];
6026
+ footer: TemplateButton[];
6027
+ }
6028
+
6029
+ declare class TemplateManager {
6030
+ private templates;
6031
+ /**
6032
+ * 初始化模板数据
6033
+ * @param templateItems 模板数据数组
6034
+ */
6035
+ initialize(templateItems: TemplateItem[]): void;
6036
+ /**
6037
+ * 根据模板id查询配置
6038
+ * @param templateId 模板id
6039
+ * @returns 模板配置,如果不存在则返回 undefined
6040
+ */
6041
+ getTemplate(templateId: string): TemplateItem | undefined;
6042
+ /**
6043
+ * 添加模板
6044
+ * @param templateId 模板id
6045
+ * @param template 模板配置
6046
+ */
6047
+ addTemplate(templateId: string, template: TemplateItem): void;
6048
+ /**
6049
+ * 删除模板
6050
+ * @param templateId 模板id
6051
+ */
6052
+ removeTemplate(templateId: string): void;
6053
+ /**
6054
+ * 更新模板
6055
+ * @param templateId 模板id
6056
+ * @param template 模板配置
6057
+ */
6058
+ updateTemplate(templateId: string, template: TemplateItem): void;
6059
+ /**
6060
+ * 获取所有模板
6061
+ * @returns 所有模板的映射
6062
+ */
6063
+ getAllTemplates(): Map<string, TemplateItem>;
6064
+ /**
6065
+ * 获取所有模板id
6066
+ * @returns 所有模板id的数组
6067
+ */
6068
+ getTemplateIds(): string[];
6069
+ /**
6070
+ * 检查模板是否存在
6071
+ * @param templateId 模板id
6072
+ * @returns 是否存在
6073
+ */
6074
+ hasTemplate(templateId: string): boolean;
6075
+ /**
6076
+ * 清除所有模板
6077
+ */
6078
+ clear(): void;
6079
+ }
6080
+
5960
6081
  declare class TerrainManager {
5961
6082
  private adapter;
5962
6083
  constructor(adapter: VectorTileAdapter);