@gis_victory/gismap 2.0.98 → 2.0.100
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/gismap.css +1 -1
- package/dist/index.d.ts +161 -36
- package/dist/index.es.js +3 -3
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -7,7 +7,6 @@ import { CheckboxGroupValueType } from 'element-plus';
|
|
|
7
7
|
import { CheckboxProps } from 'element-plus';
|
|
8
8
|
import { CheckboxValueType } from 'element-plus';
|
|
9
9
|
import { CheckedInfo } from 'element-plus';
|
|
10
|
-
import { default as ComparePage } from './pages/ComparePage.vue';
|
|
11
10
|
import { Component } from 'vue';
|
|
12
11
|
import { ComponentCustomProps } from 'vue';
|
|
13
12
|
import { ComponentInternalInstance } from 'vue';
|
|
@@ -638,7 +637,38 @@ declare interface ClassProvider<T> {
|
|
|
638
637
|
singleton?: boolean;
|
|
639
638
|
}
|
|
640
639
|
|
|
641
|
-
export {
|
|
640
|
+
export declare const CompareDragPage: DefineComponent<Props_2, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
641
|
+
ready: (...args: any[]) => void;
|
|
642
|
+
}, string, PublicProps, Readonly<Props_2> & Readonly<{
|
|
643
|
+
onReady?: ((...args: any[]) => any) | undefined;
|
|
644
|
+
}>, {
|
|
645
|
+
defaultDirection: "vertical" | "horizontal";
|
|
646
|
+
layerVisible: boolean;
|
|
647
|
+
leftData: any;
|
|
648
|
+
rightData: any;
|
|
649
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
650
|
+
comparePageContainer: HTMLDivElement;
|
|
651
|
+
}, HTMLDivElement>;
|
|
652
|
+
|
|
653
|
+
declare type CompareEventType = 'slideend';
|
|
654
|
+
|
|
655
|
+
declare interface CompareOptions {
|
|
656
|
+
orientation?: 'vertical' | 'horizontal';
|
|
657
|
+
mousemove?: boolean;
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
export declare const CompareSplitPage: DefineComponent<Props_3, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
661
|
+
ready: (...args: any[]) => void;
|
|
662
|
+
}, string, PublicProps, Readonly<Props_3> & Readonly<{
|
|
663
|
+
onReady?: ((...args: any[]) => any) | undefined;
|
|
664
|
+
}>, {
|
|
665
|
+
defaultDirection: "vertical" | "horizontal";
|
|
666
|
+
layerVisible: boolean;
|
|
667
|
+
leftData: any;
|
|
668
|
+
rightData: any;
|
|
669
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
670
|
+
comparePageContainer: HTMLDivElement;
|
|
671
|
+
}, HTMLDivElement>;
|
|
642
672
|
|
|
643
673
|
/**
|
|
644
674
|
* 配置管理器
|
|
@@ -999,7 +1029,6 @@ declare class DrawManager {
|
|
|
999
1029
|
private createTooltip;
|
|
1000
1030
|
private showTooltip;
|
|
1001
1031
|
private hideTooltip;
|
|
1002
|
-
private _updateTooltipPosition;
|
|
1003
1032
|
private removeTooltip;
|
|
1004
1033
|
private finishDraw;
|
|
1005
1034
|
private updateDrawFeature;
|
|
@@ -5432,11 +5461,11 @@ export declare interface IEventSystem {
|
|
|
5432
5461
|
/**
|
|
5433
5462
|
* 订阅事件
|
|
5434
5463
|
*/
|
|
5435
|
-
on<K extends GISMapEventName>(event: K, callback: EventCallback<GISMapEventData
|
|
5464
|
+
on<K extends GISMapEventName>(event: K, callback: EventCallback<GISMapEventData>): () => void;
|
|
5436
5465
|
/**
|
|
5437
5466
|
* 订阅事件(仅触发一次)
|
|
5438
5467
|
*/
|
|
5439
|
-
once<K extends GISMapEventName>(event: K, callback: EventCallback<GISMapEventData
|
|
5468
|
+
once<K extends GISMapEventName>(event: K, callback: EventCallback<GISMapEventData>): () => void;
|
|
5440
5469
|
/**
|
|
5441
5470
|
* 取消订阅
|
|
5442
5471
|
*/
|
|
@@ -5444,7 +5473,7 @@ export declare interface IEventSystem {
|
|
|
5444
5473
|
/**
|
|
5445
5474
|
* 发射事件
|
|
5446
5475
|
*/
|
|
5447
|
-
emit<K extends GISMapEventName>(event: K, data?: GISMapEventData
|
|
5476
|
+
emit<K extends GISMapEventName>(event: K, data?: GISMapEventData): void;
|
|
5448
5477
|
/**
|
|
5449
5478
|
* 订阅命名空间下的所有事件
|
|
5450
5479
|
*/
|
|
@@ -6400,6 +6429,67 @@ declare interface MapAdapter {
|
|
|
6400
6429
|
queryRenderedFeatures(geometry: [number, number] | [[number, number], [number, number]], options?: QueryOptions): any[];
|
|
6401
6430
|
}
|
|
6402
6431
|
|
|
6432
|
+
export declare class MapboxCompare {
|
|
6433
|
+
private options;
|
|
6434
|
+
private _mapA;
|
|
6435
|
+
private _mapB;
|
|
6436
|
+
private _horizontal;
|
|
6437
|
+
private _ev;
|
|
6438
|
+
private _swiper;
|
|
6439
|
+
private _controlContainer;
|
|
6440
|
+
private _leftContainer;
|
|
6441
|
+
private _rightContainer;
|
|
6442
|
+
private _bounds;
|
|
6443
|
+
private _clearSync;
|
|
6444
|
+
private _onResize;
|
|
6445
|
+
private _onDown;
|
|
6446
|
+
private _onMove;
|
|
6447
|
+
private _onMouseUp;
|
|
6448
|
+
private _onTouchEnd;
|
|
6449
|
+
currentPosition: number;
|
|
6450
|
+
constructor(a: mapboxgl.Map, b: mapboxgl.Map, container: string | HTMLElement, options?: CompareOptions);
|
|
6451
|
+
private _appendControlContainer;
|
|
6452
|
+
private _setPointerEvents;
|
|
6453
|
+
private _handleOnDown;
|
|
6454
|
+
private _setPosition;
|
|
6455
|
+
private _handleOnMove;
|
|
6456
|
+
private _handleOnMouseUp;
|
|
6457
|
+
private _handleOnTouchEnd;
|
|
6458
|
+
private _getX;
|
|
6459
|
+
private _getY;
|
|
6460
|
+
setSlider(x: number): void;
|
|
6461
|
+
on(type: CompareEventType, fn: (data: SlideEndEvent) => void): this;
|
|
6462
|
+
fire(type: CompareEventType, data: SlideEndEvent): this;
|
|
6463
|
+
off(type: CompareEventType, fn: (data: SlideEndEvent) => void): this;
|
|
6464
|
+
remove(): void;
|
|
6465
|
+
}
|
|
6466
|
+
|
|
6467
|
+
export declare class MapboxSplitCompare {
|
|
6468
|
+
private _mapA;
|
|
6469
|
+
private _mapB;
|
|
6470
|
+
private _containerA;
|
|
6471
|
+
private _containerB;
|
|
6472
|
+
private _ev;
|
|
6473
|
+
private _clearSync;
|
|
6474
|
+
private _horizontal;
|
|
6475
|
+
private _divider;
|
|
6476
|
+
private _crosshairA;
|
|
6477
|
+
private _crosshairB;
|
|
6478
|
+
constructor(mapA: mapboxgl.Map, mapB: mapboxgl.Map, options?: SplitCompareOptions);
|
|
6479
|
+
private _setupLayout;
|
|
6480
|
+
private _createDivider;
|
|
6481
|
+
private _createCrosshair;
|
|
6482
|
+
private _createCrosshairElement;
|
|
6483
|
+
private _setupMouseEvents;
|
|
6484
|
+
private _updateCrosshairB;
|
|
6485
|
+
private _updateCrosshairA;
|
|
6486
|
+
setOrientation(orientation: 'horizontal' | 'vertical'): void;
|
|
6487
|
+
setSyncEnabled(enabled: boolean): void;
|
|
6488
|
+
on(type: 'orientationChange' | 'syncChange', fn: (data: any) => void): this;
|
|
6489
|
+
off(type: 'orientationChange' | 'syncChange', fn: (data: any) => void): this;
|
|
6490
|
+
remove(): void;
|
|
6491
|
+
}
|
|
6492
|
+
|
|
6403
6493
|
/** 地图点击事件 */
|
|
6404
6494
|
declare interface MapClickEvent {
|
|
6405
6495
|
coordinates: [number, number];
|
|
@@ -7281,9 +7371,7 @@ declare class MeasureManager {
|
|
|
7281
7371
|
private boundHandleMapDoubleClick;
|
|
7282
7372
|
private boundHandleTouchEnd;
|
|
7283
7373
|
private boundHandleTouchStart;
|
|
7284
|
-
private lastTouchTime;
|
|
7285
7374
|
private lastTouchCoords;
|
|
7286
|
-
private doubleTapThreshold;
|
|
7287
7375
|
private tooltipElement;
|
|
7288
7376
|
constructor(adapter: MapAdapter, options?: MeasureManagerOptions);
|
|
7289
7377
|
private initMeasureSource;
|
|
@@ -7592,6 +7680,34 @@ declare interface Props {
|
|
|
7592
7680
|
theme?: 'light' | 'dark';
|
|
7593
7681
|
}
|
|
7594
7682
|
|
|
7683
|
+
declare interface Props_2 {
|
|
7684
|
+
/** 分割方向 */
|
|
7685
|
+
defaultDirection?: 'vertical' | 'horizontal';
|
|
7686
|
+
layerVisible?: boolean;
|
|
7687
|
+
mapOptions?: any;
|
|
7688
|
+
initIcons?: Array<{
|
|
7689
|
+
name: string;
|
|
7690
|
+
url: string;
|
|
7691
|
+
}>;
|
|
7692
|
+
initData?: any;
|
|
7693
|
+
leftData?: any;
|
|
7694
|
+
rightData?: any;
|
|
7695
|
+
}
|
|
7696
|
+
|
|
7697
|
+
declare interface Props_3 {
|
|
7698
|
+
/** 分割方向 */
|
|
7699
|
+
defaultDirection?: 'vertical' | 'horizontal';
|
|
7700
|
+
layerVisible?: boolean;
|
|
7701
|
+
mapOptions?: any;
|
|
7702
|
+
initIcons?: Array<{
|
|
7703
|
+
name: string;
|
|
7704
|
+
url: string;
|
|
7705
|
+
}>;
|
|
7706
|
+
initData?: any;
|
|
7707
|
+
leftData?: any;
|
|
7708
|
+
rightData?: any;
|
|
7709
|
+
}
|
|
7710
|
+
|
|
7595
7711
|
/** 地图提供者
|
|
7596
7712
|
* 在应用或组件树的顶层使用
|
|
7597
7713
|
*/
|
|
@@ -7727,6 +7843,10 @@ export declare const setBaseURL: (url: string) => void;
|
|
|
7727
7843
|
*/
|
|
7728
7844
|
export declare const setEndpoint: (key: string, path: string) => void;
|
|
7729
7845
|
|
|
7846
|
+
declare interface SlideEndEvent {
|
|
7847
|
+
currentPosition: number;
|
|
7848
|
+
}
|
|
7849
|
+
|
|
7730
7850
|
/** 数据源配置 */
|
|
7731
7851
|
declare interface SourceConfig {
|
|
7732
7852
|
id?: EntityId;
|
|
@@ -7752,6 +7872,11 @@ declare interface SourceState {
|
|
|
7752
7872
|
/** 数据源类型 */
|
|
7753
7873
|
declare type SourceType = 'geojson' | 'vector' | 'raster' | 'raster-dem' | 'image' | 'video';
|
|
7754
7874
|
|
|
7875
|
+
declare interface SplitCompareOptions {
|
|
7876
|
+
orientation?: 'horizontal' | 'vertical';
|
|
7877
|
+
syncEnabled?: boolean;
|
|
7878
|
+
}
|
|
7879
|
+
|
|
7755
7880
|
/**
|
|
7756
7881
|
* 状态历史记录
|
|
7757
7882
|
*/
|
|
@@ -8131,11 +8256,11 @@ export declare class TypedEventEmitter {
|
|
|
8131
8256
|
/**
|
|
8132
8257
|
* 订阅事件
|
|
8133
8258
|
*/
|
|
8134
|
-
on<K extends GISMapEventName>(event: K, callback: EventCallback<GISMapEventData
|
|
8259
|
+
on<K extends GISMapEventName>(event: K, callback: EventCallback<GISMapEventData>): () => void;
|
|
8135
8260
|
/**
|
|
8136
8261
|
* 订阅事件(仅触发一次)
|
|
8137
8262
|
*/
|
|
8138
|
-
once<K extends GISMapEventName>(event: K, callback: EventCallback<GISMapEventData
|
|
8263
|
+
once<K extends GISMapEventName>(event: K, callback: EventCallback<GISMapEventData>): () => void;
|
|
8139
8264
|
/**
|
|
8140
8265
|
* 取消订阅
|
|
8141
8266
|
*/
|
|
@@ -8143,7 +8268,7 @@ export declare class TypedEventEmitter {
|
|
|
8143
8268
|
/**
|
|
8144
8269
|
* 发射事件
|
|
8145
8270
|
*/
|
|
8146
|
-
emit<K extends GISMapEventName>(event: K, data?: GISMapEventData
|
|
8271
|
+
emit<K extends GISMapEventName>(event: K, data?: GISMapEventData): void;
|
|
8147
8272
|
/**
|
|
8148
8273
|
* 订阅命名空间下的所有事件
|
|
8149
8274
|
*/
|
|
@@ -8275,17 +8400,17 @@ export declare function useLayer(layerId: MaybeRefOrGetter<EntityId>): {
|
|
|
8275
8400
|
exists: ComputedRef<boolean>;
|
|
8276
8401
|
show: () => void;
|
|
8277
8402
|
hide: () => void;
|
|
8278
|
-
toggle: () =>
|
|
8279
|
-
remove: () =>
|
|
8403
|
+
toggle: () => boolean | undefined;
|
|
8404
|
+
remove: () => boolean | undefined;
|
|
8280
8405
|
setOpacity: (value: number) => void;
|
|
8281
8406
|
};
|
|
8282
8407
|
|
|
8283
8408
|
/** 使用图层组 */
|
|
8284
8409
|
export declare function useLayerGroup(groupId: MaybeRefOrGetter<EntityId>): {
|
|
8285
|
-
group: ComputedRef<
|
|
8286
|
-
layers: ComputedRef<
|
|
8287
|
-
visible: WritableComputedRef<
|
|
8288
|
-
expanded: WritableComputedRef<
|
|
8410
|
+
group: ComputedRef<LayerGroup | undefined>;
|
|
8411
|
+
layers: ComputedRef<LayerEntity[]>;
|
|
8412
|
+
visible: WritableComputedRef<boolean, boolean>;
|
|
8413
|
+
expanded: WritableComputedRef<boolean, boolean>;
|
|
8289
8414
|
exists: ComputedRef<boolean>;
|
|
8290
8415
|
};
|
|
8291
8416
|
|
|
@@ -8311,17 +8436,17 @@ export declare interface UseLayerOptions {
|
|
|
8311
8436
|
|
|
8312
8437
|
/** 使用图层列表 */
|
|
8313
8438
|
export declare function useLayers(): {
|
|
8314
|
-
layers: ComputedRef<
|
|
8315
|
-
layerStates: any
|
|
8316
|
-
visibleLayers: ComputedRef<
|
|
8317
|
-
count: ComputedRef<
|
|
8318
|
-
addLayer: (config: LayerConfig_2, beforeId?: string) =>
|
|
8319
|
-
removeLayer: (layerId: EntityId) =>
|
|
8439
|
+
layers: ComputedRef<LayerEntity[] | undefined>;
|
|
8440
|
+
layerStates: ComputedRef<Readonly<Ref<ReadonlyMap<string, any>, ReadonlyMap<string, any>>> | undefined>;
|
|
8441
|
+
visibleLayers: ComputedRef<LayerEntity[] | undefined>;
|
|
8442
|
+
count: ComputedRef<number>;
|
|
8443
|
+
addLayer: (config: LayerConfig_2, beforeId?: string) => LayerEntity | undefined;
|
|
8444
|
+
removeLayer: (layerId: EntityId) => boolean | undefined;
|
|
8320
8445
|
removeAll: () => void;
|
|
8321
8446
|
showAll: () => void;
|
|
8322
8447
|
hideAll: () => void;
|
|
8323
|
-
getLayer: (layerId: EntityId) =>
|
|
8324
|
-
getLayersByType: (type: string) =>
|
|
8448
|
+
getLayer: (layerId: EntityId) => LayerEntity | undefined;
|
|
8449
|
+
getLayersByType: (type: string) => LayerEntity[] | undefined;
|
|
8325
8450
|
};
|
|
8326
8451
|
|
|
8327
8452
|
/** 使用地图上下文 - 返回 Ref */
|
|
@@ -8348,13 +8473,13 @@ export declare function useMarker(markerId: MaybeRefOrGetter<EntityId>): {
|
|
|
8348
8473
|
exists: ComputedRef<boolean>;
|
|
8349
8474
|
show: () => void;
|
|
8350
8475
|
hide: () => void;
|
|
8351
|
-
toggle: () =>
|
|
8352
|
-
remove: () =>
|
|
8476
|
+
toggle: () => boolean | undefined;
|
|
8477
|
+
remove: () => boolean | undefined;
|
|
8353
8478
|
setPosition: (lng: number, lat: number) => void;
|
|
8354
8479
|
moveTo: (lng: number, lat: number, animate?: boolean) => void;
|
|
8355
8480
|
openPopup: () => void;
|
|
8356
8481
|
closePopup: () => void;
|
|
8357
|
-
togglePopup: () =>
|
|
8482
|
+
togglePopup: () => boolean | undefined;
|
|
8358
8483
|
};
|
|
8359
8484
|
|
|
8360
8485
|
/** 创建并管理标记 */
|
|
@@ -8380,17 +8505,17 @@ export declare interface UseMarkerOptions {
|
|
|
8380
8505
|
|
|
8381
8506
|
/** 使用标记列表 */
|
|
8382
8507
|
export declare function useMarkers(): {
|
|
8383
|
-
markers: ComputedRef<
|
|
8384
|
-
markerStates: any
|
|
8385
|
-
visibleMarkers: ComputedRef<
|
|
8386
|
-
count: ComputedRef<
|
|
8387
|
-
addMarker: (config: MarkerConfig_2) =>
|
|
8388
|
-
removeMarker: (markerId: EntityId) =>
|
|
8508
|
+
markers: ComputedRef<MarkerEntity[]>;
|
|
8509
|
+
markerStates: ComputedRef<Readonly<Ref<ReadonlyMap<string, any>, ReadonlyMap<string, any>>> | undefined>;
|
|
8510
|
+
visibleMarkers: ComputedRef<MarkerEntity[]>;
|
|
8511
|
+
count: ComputedRef<number>;
|
|
8512
|
+
addMarker: (config: MarkerConfig_2) => MarkerEntity | undefined;
|
|
8513
|
+
removeMarker: (markerId: EntityId) => boolean | undefined;
|
|
8389
8514
|
removeAll: () => void;
|
|
8390
8515
|
showAll: () => void;
|
|
8391
8516
|
hideAll: () => void;
|
|
8392
|
-
getMarker: (markerId: EntityId) =>
|
|
8393
|
-
getMarkersInBounds: (bounds: [[number, number], [number, number]]) =>
|
|
8517
|
+
getMarker: (markerId: EntityId) => MarkerEntity | undefined;
|
|
8518
|
+
getMarkersInBounds: (bounds: [[number, number], [number, number]]) => MarkerEntity[] | undefined;
|
|
8394
8519
|
};
|
|
8395
8520
|
|
|
8396
8521
|
/** 使用视图状态 */
|