@gis_victory/gismap 2.0.102 → 2.0.105
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 +80 -55
- package/dist/index.es.js +3 -3
- package/dist/index.umd.js +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ 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 CompareDragPage } from './pages/CompareDragPage.vue';
|
|
11
|
+
import { default as CompareSplitPage } from './pages/CompareSplitPage.vue';
|
|
10
12
|
import { Component } from 'vue';
|
|
11
13
|
import { ComponentCustomProps } from 'vue';
|
|
12
14
|
import { ComponentInternalInstance } from 'vue';
|
|
@@ -130,6 +132,10 @@ lnglatDecimal?: number | undefined;
|
|
|
130
132
|
mercatorDecimal?: number | undefined;
|
|
131
133
|
distanceUnit?: DistanceUnit | undefined;
|
|
132
134
|
areaUnit?: AreaUnit | undefined;
|
|
135
|
+
hoverController?: {
|
|
136
|
+
blockHover: () => void;
|
|
137
|
+
unblockHover: () => void;
|
|
138
|
+
} | undefined;
|
|
133
139
|
} | undefined;
|
|
134
140
|
readonly isMobile: boolean;
|
|
135
141
|
readonly layers: {
|
|
@@ -270,6 +276,7 @@ destroy: () => void;
|
|
|
270
276
|
} | undefined;
|
|
271
277
|
readonly layerManager: {
|
|
272
278
|
queryLayerIds: string[];
|
|
279
|
+
setHoverEnabledChecker: (checker: () => boolean) => void;
|
|
273
280
|
addSource: (source: any, layerConfig?: any) => void;
|
|
274
281
|
addLayer: (layerConfig: any, beforeLayerId?: string) => LayerManager;
|
|
275
282
|
addGroupLayer: (layer: any) => void;
|
|
@@ -380,6 +387,10 @@ getInitialViewState: () => ViewState_2 | null;
|
|
|
380
387
|
getSourceBounds: () => [number, number, number, number] | null;
|
|
381
388
|
setSourceBounds: (bounds: [number, number, number, number] | null) => void;
|
|
382
389
|
readonly isReady: boolean;
|
|
390
|
+
setHoverEnabled: (enabled: boolean) => void;
|
|
391
|
+
isHoverEnabled: () => boolean;
|
|
392
|
+
blockHover: () => void;
|
|
393
|
+
unblockHover: () => void;
|
|
383
394
|
on: <K extends keyof CoreMapEvents>(event: K, handler: (payload: CoreMapEvents[K]) => void) => () => void;
|
|
384
395
|
once: <K extends keyof CoreMapEvents>(event: K, handler: (payload: CoreMapEvents[K]) => void) => () => void;
|
|
385
396
|
} | null;
|
|
@@ -431,16 +442,16 @@ mapContainerRef: HTMLDivElement;
|
|
|
431
442
|
|
|
432
443
|
declare const __VLS_component_2: DefineComponent<ExtractPropTypes< {
|
|
433
444
|
downloadUrl: {
|
|
434
|
-
type:
|
|
445
|
+
type: PropType<(param: any) => string>;
|
|
435
446
|
default: undefined;
|
|
436
447
|
};
|
|
437
448
|
}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
|
|
438
449
|
downloadUrl: {
|
|
439
|
-
type:
|
|
450
|
+
type: PropType<(param: any) => string>;
|
|
440
451
|
default: undefined;
|
|
441
452
|
};
|
|
442
453
|
}>> & Readonly<{}>, {
|
|
443
|
-
downloadUrl:
|
|
454
|
+
downloadUrl: (param: any) => string;
|
|
444
455
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
445
456
|
|
|
446
457
|
declare type __VLS_Props = {
|
|
@@ -637,18 +648,7 @@ declare interface ClassProvider<T> {
|
|
|
637
648
|
singleton?: boolean;
|
|
638
649
|
}
|
|
639
650
|
|
|
640
|
-
export
|
|
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>;
|
|
651
|
+
export { CompareDragPage }
|
|
652
652
|
|
|
653
653
|
declare type CompareEventType = 'slideend';
|
|
654
654
|
|
|
@@ -657,18 +657,7 @@ declare interface CompareOptions {
|
|
|
657
657
|
mousemove?: boolean;
|
|
658
658
|
}
|
|
659
659
|
|
|
660
|
-
export
|
|
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>;
|
|
660
|
+
export { CompareSplitPage }
|
|
672
661
|
|
|
673
662
|
/**
|
|
674
663
|
* 配置管理器
|
|
@@ -941,6 +930,7 @@ declare class DrawManager {
|
|
|
941
930
|
private boundHandleFeatureClick;
|
|
942
931
|
private boundHandleMapRightClick;
|
|
943
932
|
private tooltipElement;
|
|
933
|
+
private hoverBlocked;
|
|
944
934
|
constructor(map: any, options?: DrawManagerOptions);
|
|
945
935
|
private initDrawSource;
|
|
946
936
|
private setupDrawLayers;
|
|
@@ -1019,6 +1009,10 @@ declare class DrawManager {
|
|
|
1019
1009
|
* 设置选中回调
|
|
1020
1010
|
*/
|
|
1021
1011
|
onSelect(callback: SelectCallback): void;
|
|
1012
|
+
/** 仅在未屏蔽时调用一次 blockHover,保证与 unblock 成对 */
|
|
1013
|
+
private blockHoverIfNeeded;
|
|
1014
|
+
/** 仅在已屏蔽时调用一次 unblockHover */
|
|
1015
|
+
private unblockHoverIfNeeded;
|
|
1022
1016
|
private bindDrawEvents;
|
|
1023
1017
|
private unbindDrawEvents;
|
|
1024
1018
|
private handleMapClick;
|
|
@@ -1050,6 +1044,11 @@ declare interface DrawManagerOptions {
|
|
|
1050
1044
|
polygonColor?: string;
|
|
1051
1045
|
/** 选中高亮颜色 */
|
|
1052
1046
|
selectedColor?: string;
|
|
1047
|
+
/** hover 控制器:绘制激活时临时屏蔽图层属性提示,避免冲突 */
|
|
1048
|
+
hoverController?: {
|
|
1049
|
+
blockHover: () => void;
|
|
1050
|
+
unblockHover: () => void;
|
|
1051
|
+
};
|
|
1053
1052
|
}
|
|
1054
1053
|
|
|
1055
1054
|
/** 绘制类型 */
|
|
@@ -5936,11 +5935,17 @@ export declare class LayerManager extends BaseManager {
|
|
|
5936
5935
|
private pointLayerIds;
|
|
5937
5936
|
private lineLayerIds;
|
|
5938
5937
|
private polygonLayerIds;
|
|
5938
|
+
/** hover(图层属性提示)是否启用检查器,由 MapContext 注入 */
|
|
5939
|
+
private isHoverEnabledChecker;
|
|
5939
5940
|
constructor(adapter: VectorTileAdapter, eventBus?: IEventBus<CoreMapEvents>);
|
|
5940
5941
|
/**
|
|
5941
5942
|
* 初始化管理器
|
|
5942
5943
|
*/
|
|
5943
5944
|
protected onInitialize(): void;
|
|
5945
|
+
/**
|
|
5946
|
+
* 注入 hover(图层属性提示)开关检查器,新建的图层将继承该检查器
|
|
5947
|
+
*/
|
|
5948
|
+
setHoverEnabledChecker(checker: () => boolean): void;
|
|
5944
5949
|
/**
|
|
5945
5950
|
* 销毁管理器
|
|
5946
5951
|
*/
|
|
@@ -6517,6 +6522,10 @@ export declare class MapContext {
|
|
|
6517
6522
|
readonly isMobile: boolean;
|
|
6518
6523
|
/** 全局 sourceBounds */
|
|
6519
6524
|
private _sourceBounds;
|
|
6525
|
+
/** hover(图层属性提示)主开关 */
|
|
6526
|
+
private _hoverEnabled;
|
|
6527
|
+
/** hover 临时屏蔽引用计数(测量/绘制等场景下 +1,结束后 -1) */
|
|
6528
|
+
private _hoverBlockCount;
|
|
6520
6529
|
private initialViewState;
|
|
6521
6530
|
private _layerService?;
|
|
6522
6531
|
private _markerService?;
|
|
@@ -6684,6 +6693,23 @@ export declare class MapContext {
|
|
|
6684
6693
|
* 获取地图是否就绪
|
|
6685
6694
|
*/
|
|
6686
6695
|
get isReady(): boolean;
|
|
6696
|
+
/**
|
|
6697
|
+
* 动态设置是否启用地图 hover(图层属性提示)事件。
|
|
6698
|
+
* 这是全局主开关,仅影响由本开关与临时屏蔽共同决定的最终状态。
|
|
6699
|
+
*/
|
|
6700
|
+
setHoverEnabled(enabled: boolean): void;
|
|
6701
|
+
/**
|
|
6702
|
+
* 当前 hover 事件是否生效:主开关开启且没有被临时屏蔽时返回 true。
|
|
6703
|
+
*/
|
|
6704
|
+
isHoverEnabled(): boolean;
|
|
6705
|
+
/**
|
|
6706
|
+
* 临时屏蔽 hover(如测量/绘制激活时调用),采用引用计数,可重复调用。
|
|
6707
|
+
*/
|
|
6708
|
+
blockHover(): void;
|
|
6709
|
+
/**
|
|
6710
|
+
* 取消一次临时屏蔽(测量/绘制结束时调用)。
|
|
6711
|
+
*/
|
|
6712
|
+
unblockHover(): void;
|
|
6687
6713
|
/**
|
|
6688
6714
|
* 订阅事件
|
|
6689
6715
|
*/
|
|
@@ -6718,6 +6744,8 @@ export declare interface MapContextConfig {
|
|
|
6718
6744
|
isMobile?: boolean;
|
|
6719
6745
|
/** 全局 sourceBounds [minLng, minLat, maxLng, maxLat] */
|
|
6720
6746
|
sourceBounds?: [number, number, number, number] | null;
|
|
6747
|
+
/** 是否启用地图 hover(图层属性提示)事件,默认 true */
|
|
6748
|
+
enableHover?: boolean;
|
|
6721
6749
|
}
|
|
6722
6750
|
|
|
6723
6751
|
/** 地图上下文注入键 - 现在注入的是 Ref */
|
|
@@ -6745,6 +6773,8 @@ declare interface MapInitOptions {
|
|
|
6745
6773
|
isMobile?: boolean;
|
|
6746
6774
|
/** 全局 sourceBounds [minLng, minLat, maxLng, maxLat] */
|
|
6747
6775
|
sourceBounds?: [number, number, number, number];
|
|
6776
|
+
/** 是否启用地图 hover(图层属性提示)事件,默认 true。可在运行时通过 MapContext.setHoverEnabled 动态开关 */
|
|
6777
|
+
enableHover?: boolean;
|
|
6748
6778
|
}
|
|
6749
6779
|
|
|
6750
6780
|
export declare interface MapLoadEvent {
|
|
@@ -6822,6 +6852,8 @@ declare interface MapState_2 {
|
|
|
6822
6852
|
style: Style | null;
|
|
6823
6853
|
/** 容器元素 */
|
|
6824
6854
|
container: HTMLElement | null;
|
|
6855
|
+
/** 是否启用地图 hover(图层属性提示)事件,可被临时屏蔽(测量/绘制时) */
|
|
6856
|
+
hoverEnabled: boolean;
|
|
6825
6857
|
/** 交互状态 */
|
|
6826
6858
|
interaction: {
|
|
6827
6859
|
isDragging: boolean;
|
|
@@ -7373,6 +7405,7 @@ declare class MeasureManager {
|
|
|
7373
7405
|
private boundHandleTouchStart;
|
|
7374
7406
|
private lastTouchCoords;
|
|
7375
7407
|
private tooltipElement;
|
|
7408
|
+
private hoverBlocked;
|
|
7376
7409
|
constructor(adapter: MapAdapter, options?: MeasureManagerOptions);
|
|
7377
7410
|
private initMeasureSource;
|
|
7378
7411
|
private setupMeasureLayers;
|
|
@@ -7422,6 +7455,10 @@ declare class MeasureManager {
|
|
|
7422
7455
|
* 更新配置
|
|
7423
7456
|
*/
|
|
7424
7457
|
updateOptions(options: Partial<MeasureManagerOptions>): void;
|
|
7458
|
+
/** 仅在未屏蔽时调用一次 blockHover,保证与 unblock 成对 */
|
|
7459
|
+
private blockHoverIfNeeded;
|
|
7460
|
+
/** 仅在已屏蔽时调用一次 unblockHover */
|
|
7461
|
+
private unblockHoverIfNeeded;
|
|
7425
7462
|
private bindMeasureEvents;
|
|
7426
7463
|
private unbindMeasureEvents;
|
|
7427
7464
|
private handleMapClick;
|
|
@@ -7495,6 +7532,11 @@ declare interface MeasureManagerOptions {
|
|
|
7495
7532
|
distanceUnit?: DistanceUnit;
|
|
7496
7533
|
/** 面积单位,默认自动 */
|
|
7497
7534
|
areaUnit?: AreaUnit;
|
|
7535
|
+
/** hover 控制器:测量激活时临时屏蔽图层属性提示,避免冲突 */
|
|
7536
|
+
hoverController?: {
|
|
7537
|
+
blockHover: () => void;
|
|
7538
|
+
unblockHover: () => void;
|
|
7539
|
+
};
|
|
7498
7540
|
}
|
|
7499
7541
|
|
|
7500
7542
|
/** 测量结果 */
|
|
@@ -7680,34 +7722,6 @@ declare interface Props {
|
|
|
7680
7722
|
theme?: 'light' | 'dark';
|
|
7681
7723
|
}
|
|
7682
7724
|
|
|
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
|
-
|
|
7711
7725
|
/** 地图提供者
|
|
7712
7726
|
* 在应用或组件树的顶层使用
|
|
7713
7727
|
*/
|
|
@@ -8455,6 +8469,17 @@ export declare function useMap(): Ref<MapContext | null>;
|
|
|
8455
8469
|
/** 使用地图事件 */
|
|
8456
8470
|
export declare function useMapEvent<K extends keyof CoreMapEvents>(event: K, handler: (payload: CoreMapEvents[K]) => void): () => void;
|
|
8457
8471
|
|
|
8472
|
+
/**
|
|
8473
|
+
* 使用地图 hover(图层属性提示)开关
|
|
8474
|
+
* 返回响应式状态与动态设置方法,可在运行时开启/关闭图层提示,
|
|
8475
|
+
* 例如测量/绘制激活时关闭,避免与交互冲突。
|
|
8476
|
+
*/
|
|
8477
|
+
export declare function useMapHover(): {
|
|
8478
|
+
/** 当前 hover 是否生效(响应式) */
|
|
8479
|
+
hoverEnabled: Readonly<Ref<boolean, boolean>>;
|
|
8480
|
+
setHoverEnabled: (enabled: boolean) => void;
|
|
8481
|
+
};
|
|
8482
|
+
|
|
8458
8483
|
/** 使用地图就绪事件 */
|
|
8459
8484
|
export declare function useMapReady(callback: (context: MapContext) => void): void;
|
|
8460
8485
|
|