@gis_victory/gismap 2.0.17 → 2.0.19

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
@@ -112,6 +112,18 @@ readonly initIcons?: {
112
112
  name: string;
113
113
  url: string;
114
114
  }[] | undefined;
115
+ readonly measureOptions?: {
116
+ sourceId?: string | undefined;
117
+ pointColor?: string | undefined;
118
+ lineColor?: string | undefined;
119
+ polygonColor?: string | undefined;
120
+ textColor?: string | undefined;
121
+ coordinateType?: CoordinateType | undefined;
122
+ lnglatDecimal?: number | undefined;
123
+ mercatorDecimal?: number | undefined;
124
+ distanceUnit?: DistanceUnit | undefined;
125
+ areaUnit?: AreaUnit | undefined;
126
+ } | undefined;
115
127
  readonly layers: {
116
128
  initialize: () => void;
117
129
  dispose: () => void;
@@ -249,6 +261,7 @@ clearAllResults: () => void;
249
261
  getResultCount: () => number;
250
262
  getIsMeasuring: () => boolean;
251
263
  getMeasureType: () => MeasureType;
264
+ updateOptions: (options: Partial<MeasureManagerOptions>) => void;
252
265
  destroy: () => void;
253
266
  } | undefined;
254
267
  readonly layerManager: {
@@ -451,6 +464,9 @@ declare interface ApiEndpoint {
451
464
  description?: string;
452
465
  }
453
466
 
467
+ /** 面积单位 */
468
+ declare type AreaUnit = 'squareMeter' | 'squareKilometer' | 'mu';
469
+
454
470
  /**
455
471
  * Manager 抽象基类
456
472
  * 提供通用的 Manager 实现
@@ -591,6 +607,9 @@ export declare interface ControlConfig {
591
607
  options?: Record<string, any>;
592
608
  }
593
609
 
610
+ /** 坐标类型 */
611
+ declare type CoordinateType = 'lnglat' | 'mercator';
612
+
594
613
  /** 地图核心事件 */
595
614
  declare interface CoreMapEvents extends EventMap {
596
615
  'map:load': {
@@ -730,6 +749,9 @@ export declare function createStateStore(initialState?: Partial<MapState>): ISta
730
749
  */
731
750
  export declare function createTimeTravelStore(initialState?: Partial<MapState>): ITimeTravelStore;
732
751
 
752
+ /** 距离单位 */
753
+ declare type DistanceUnit = 'meter' | 'kilometer';
754
+
733
755
  /** 绘制完成回调 */
734
756
  declare type DrawCallback = (type: DrawType, geoJson: GeoJSON.Feature, wkt: string, feature: DrawFeature) => void;
735
757
 
@@ -3486,7 +3508,9 @@ default: string;
3486
3508
  };
3487
3509
  }>> & Readonly<{}>, {
3488
3510
  title: string;
3489
- }, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
3511
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
3512
+
3513
+ export declare const GisMapMeasure: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
3490
3514
 
3491
3515
  /**
3492
3516
  * 地图配置选项
@@ -3563,6 +3587,10 @@ width: {
3563
3587
  type: NumberConstructor;
3564
3588
  default: number;
3565
3589
  };
3590
+ index: {
3591
+ type: NumberConstructor;
3592
+ required: true;
3593
+ };
3566
3594
  }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
3567
3595
  text: {
3568
3596
  type: StringConstructor;
@@ -3588,6 +3616,10 @@ width: {
3588
3616
  type: NumberConstructor;
3589
3617
  default: number;
3590
3618
  };
3619
+ index: {
3620
+ type: NumberConstructor;
3621
+ required: true;
3622
+ };
3591
3623
  }>> & Readonly<{}>, {
3592
3624
  visible: boolean;
3593
3625
  iconName: string;
@@ -3620,7 +3652,7 @@ export declare const GisMapQueryResult: __VLS_WithTemplateSlots_5<typeof __VLS_c
3620
3652
 
3621
3653
  export declare const GisMapSearch: DefineComponent<ExtractPropTypes< {
3622
3654
  data: {
3623
- type: ArrayConstructor;
3655
+ type: () => MapSearchItem[];
3624
3656
  default: () => never[];
3625
3657
  };
3626
3658
  round: {
@@ -3631,9 +3663,20 @@ func: {
3631
3663
  type: FunctionConstructor;
3632
3664
  default: undefined;
3633
3665
  };
3666
+ tianditu: {
3667
+ type: () => TiandituQuery;
3668
+ default: () => {
3669
+ specify: string;
3670
+ queryType: string;
3671
+ start: string;
3672
+ count: string;
3673
+ dataTypes: string;
3674
+ show: string;
3675
+ };
3676
+ };
3634
3677
  }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
3635
3678
  data: {
3636
- type: ArrayConstructor;
3679
+ type: () => MapSearchItem[];
3637
3680
  default: () => never[];
3638
3681
  };
3639
3682
  round: {
@@ -3644,10 +3687,22 @@ func: {
3644
3687
  type: FunctionConstructor;
3645
3688
  default: undefined;
3646
3689
  };
3690
+ tianditu: {
3691
+ type: () => TiandituQuery;
3692
+ default: () => {
3693
+ specify: string;
3694
+ queryType: string;
3695
+ start: string;
3696
+ count: string;
3697
+ dataTypes: string;
3698
+ show: string;
3699
+ };
3700
+ };
3647
3701
  }>> & Readonly<{}>, {
3648
- data: unknown[];
3702
+ data: MapSearchItem[];
3649
3703
  round: boolean;
3650
3704
  func: Function;
3705
+ tianditu: TiandituQuery;
3651
3706
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
3652
3707
 
3653
3708
  /**
@@ -4380,9 +4435,8 @@ export declare interface LayerQueryClickPayload {
4380
4435
  feature?: any;
4381
4436
  features?: any[];
4382
4437
  dataExtension?: any;
4383
- legendData?: any;
4438
+ isShowTooltip?: boolean;
4384
4439
  isCommonPopup?: boolean;
4385
- isShow?: boolean;
4386
4440
  }
4387
4441
 
4388
4442
  export declare interface LayerRemoveEvent extends LayerEvent {
@@ -4753,6 +4807,7 @@ export declare class MapContext {
4753
4807
  name: string;
4754
4808
  url: string;
4755
4809
  }>;
4810
+ readonly measureOptions?: MeasureManagerOptions;
4756
4811
  private _layerService?;
4757
4812
  private _markerService?;
4758
4813
  private _tdtManager?;
@@ -4894,6 +4949,8 @@ export declare interface MapContextConfig {
4894
4949
  name: string;
4895
4950
  url: string;
4896
4951
  }>;
4952
+ /** 测量管理器配置 */
4953
+ measureOptions?: MeasureManagerOptions;
4897
4954
  }
4898
4955
 
4899
4956
  /** 地图上下文注入键 - 现在注入的是 Ref */
@@ -4991,6 +5048,27 @@ searchData: unknown[];
4991
5048
  default?(_: {}): any;
4992
5049
  }>;
4993
5050
 
5051
+ /**
5052
+ * {
5053
+ "id": "xzq",
5054
+ "name": "xzq",
5055
+ "label": "行政村名称",
5056
+ "placeholder": "请输入行政村名称",
5057
+ "defaultValue": "",
5058
+ "serviceUrl": "commonServer/query/quick_xzc",
5059
+ "templateId": "quick_xzc"
5060
+ }
5061
+ */
5062
+ declare interface MapSearchItem {
5063
+ id: string;
5064
+ name: string;
5065
+ label: string;
5066
+ placeholder?: string;
5067
+ defaultValue?: string;
5068
+ serviceUrl?: string;
5069
+ templateId: string;
5070
+ }
5071
+
4994
5072
  /**
4995
5073
  * 地图状态
4996
5074
  */
@@ -5457,6 +5535,10 @@ declare class MeasureManager {
5457
5535
  * 获取当前测量类型
5458
5536
  */
5459
5537
  getMeasureType(): MeasureType;
5538
+ /**
5539
+ * 更新配置
5540
+ */
5541
+ updateOptions(options: Partial<MeasureManagerOptions>): void;
5460
5542
  private bindMeasureEvents;
5461
5543
  private unbindMeasureEvents;
5462
5544
  private handleMapClick;
@@ -5476,6 +5558,13 @@ declare class MeasureManager {
5476
5558
  */
5477
5559
  private haversineDistance;
5478
5560
  private toRadians;
5561
+ /**
5562
+ * 将经纬度坐标转换为平面坐标(墨卡托投影)
5563
+ * @param lng 经度
5564
+ * @param lat 纬度
5565
+ * @returns [x, y] 平面坐标(单位:米)
5566
+ */
5567
+ private lonLatToMercator;
5479
5568
  /**
5480
5569
  * 格式化距离显示
5481
5570
  */
@@ -5508,6 +5597,16 @@ declare interface MeasureManagerOptions {
5508
5597
  polygonColor?: string;
5509
5598
  /** 文字标签颜色 */
5510
5599
  textColor?: string;
5600
+ /** 坐标类型:经纬度或墨卡托投影 */
5601
+ coordinateType?: CoordinateType;
5602
+ /** 经纬度小数位数,默认6位 */
5603
+ lnglatDecimal?: number;
5604
+ /** 墨卡托投影小数位数,默认2位 */
5605
+ mercatorDecimal?: number;
5606
+ /** 距离单位,默认自动 */
5607
+ distanceUnit?: DistanceUnit;
5608
+ /** 面积单位,默认自动 */
5609
+ areaUnit?: AreaUnit;
5511
5610
  }
5512
5611
 
5513
5612
  /** 测量结果 */
@@ -5728,7 +5827,28 @@ declare interface QueryOptions {
5728
5827
  }
5729
5828
 
5730
5829
  declare class QuickSearchManager {
5731
- constructor();
5830
+ private map;
5831
+ private markers;
5832
+ private selectMarker;
5833
+ private popup;
5834
+ private callback;
5835
+ private templateManager;
5836
+ private popupManager;
5837
+ constructor(map: any);
5838
+ addFunction(callback: any): void;
5839
+ add(options: {
5840
+ uuid: string;
5841
+ templateId: string;
5842
+ geometry: any;
5843
+ index: number;
5844
+ properties: any;
5845
+ }): void;
5846
+ addGroup(options: {
5847
+ data: any[];
5848
+ }): void;
5849
+ flyTo(uuid: string): void;
5850
+ addPopup(): void;
5851
+ clear(): void;
5732
5852
  }
5733
5853
 
5734
5854
  export declare class RadarManager {
@@ -6120,6 +6240,15 @@ declare class TerrainManager {
6120
6240
  hide(): this;
6121
6241
  }
6122
6242
 
6243
+ declare interface TiandituQuery {
6244
+ specify?: string;
6245
+ queryType?: string;
6246
+ start?: string;
6247
+ count?: string;
6248
+ dataTypes?: string;
6249
+ show?: string;
6250
+ }
6251
+
6123
6252
  /**
6124
6253
  * 支持时间旅行的状态存储
6125
6254
  */