@gis_victory/gismap 2.0.97 → 2.0.99
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 +134 -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,25 @@ declare interface ClassProvider<T> {
|
|
|
638
637
|
singleton?: boolean;
|
|
639
638
|
}
|
|
640
639
|
|
|
641
|
-
|
|
640
|
+
declare type CompareEventType = 'slideend';
|
|
641
|
+
|
|
642
|
+
declare interface CompareOptions {
|
|
643
|
+
orientation?: 'vertical' | 'horizontal';
|
|
644
|
+
mousemove?: boolean;
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
export declare const ComparePage: DefineComponent<Props_2, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
648
|
+
ready: (...args: any[]) => void;
|
|
649
|
+
}, string, PublicProps, Readonly<Props_2> & Readonly<{
|
|
650
|
+
onReady?: ((...args: any[]) => any) | undefined;
|
|
651
|
+
}>, {
|
|
652
|
+
defaultDirection: "vertical" | "horizontal";
|
|
653
|
+
layerVisible: boolean;
|
|
654
|
+
leftData: any;
|
|
655
|
+
rightData: any;
|
|
656
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
657
|
+
comparePageContainer: HTMLDivElement;
|
|
658
|
+
}, HTMLDivElement>;
|
|
642
659
|
|
|
643
660
|
/**
|
|
644
661
|
* 配置管理器
|
|
@@ -999,7 +1016,6 @@ declare class DrawManager {
|
|
|
999
1016
|
private createTooltip;
|
|
1000
1017
|
private showTooltip;
|
|
1001
1018
|
private hideTooltip;
|
|
1002
|
-
private _updateTooltipPosition;
|
|
1003
1019
|
private removeTooltip;
|
|
1004
1020
|
private finishDraw;
|
|
1005
1021
|
private updateDrawFeature;
|
|
@@ -5432,11 +5448,11 @@ export declare interface IEventSystem {
|
|
|
5432
5448
|
/**
|
|
5433
5449
|
* 订阅事件
|
|
5434
5450
|
*/
|
|
5435
|
-
on<K extends GISMapEventName>(event: K, callback: EventCallback<GISMapEventData
|
|
5451
|
+
on<K extends GISMapEventName>(event: K, callback: EventCallback<GISMapEventData>): () => void;
|
|
5436
5452
|
/**
|
|
5437
5453
|
* 订阅事件(仅触发一次)
|
|
5438
5454
|
*/
|
|
5439
|
-
once<K extends GISMapEventName>(event: K, callback: EventCallback<GISMapEventData
|
|
5455
|
+
once<K extends GISMapEventName>(event: K, callback: EventCallback<GISMapEventData>): () => void;
|
|
5440
5456
|
/**
|
|
5441
5457
|
* 取消订阅
|
|
5442
5458
|
*/
|
|
@@ -5444,7 +5460,7 @@ export declare interface IEventSystem {
|
|
|
5444
5460
|
/**
|
|
5445
5461
|
* 发射事件
|
|
5446
5462
|
*/
|
|
5447
|
-
emit<K extends GISMapEventName>(event: K, data?: GISMapEventData
|
|
5463
|
+
emit<K extends GISMapEventName>(event: K, data?: GISMapEventData): void;
|
|
5448
5464
|
/**
|
|
5449
5465
|
* 订阅命名空间下的所有事件
|
|
5450
5466
|
*/
|
|
@@ -6400,6 +6416,67 @@ declare interface MapAdapter {
|
|
|
6400
6416
|
queryRenderedFeatures(geometry: [number, number] | [[number, number], [number, number]], options?: QueryOptions): any[];
|
|
6401
6417
|
}
|
|
6402
6418
|
|
|
6419
|
+
export declare class MapboxCompare {
|
|
6420
|
+
private options;
|
|
6421
|
+
private _mapA;
|
|
6422
|
+
private _mapB;
|
|
6423
|
+
private _horizontal;
|
|
6424
|
+
private _ev;
|
|
6425
|
+
private _swiper;
|
|
6426
|
+
private _controlContainer;
|
|
6427
|
+
private _leftContainer;
|
|
6428
|
+
private _rightContainer;
|
|
6429
|
+
private _bounds;
|
|
6430
|
+
private _clearSync;
|
|
6431
|
+
private _onResize;
|
|
6432
|
+
private _onDown;
|
|
6433
|
+
private _onMove;
|
|
6434
|
+
private _onMouseUp;
|
|
6435
|
+
private _onTouchEnd;
|
|
6436
|
+
currentPosition: number;
|
|
6437
|
+
constructor(a: mapboxgl.Map, b: mapboxgl.Map, container: string | HTMLElement, options?: CompareOptions);
|
|
6438
|
+
private _appendControlContainer;
|
|
6439
|
+
private _setPointerEvents;
|
|
6440
|
+
private _handleOnDown;
|
|
6441
|
+
private _setPosition;
|
|
6442
|
+
private _handleOnMove;
|
|
6443
|
+
private _handleOnMouseUp;
|
|
6444
|
+
private _handleOnTouchEnd;
|
|
6445
|
+
private _getX;
|
|
6446
|
+
private _getY;
|
|
6447
|
+
setSlider(x: number): void;
|
|
6448
|
+
on(type: CompareEventType, fn: (data: SlideEndEvent) => void): this;
|
|
6449
|
+
fire(type: CompareEventType, data: SlideEndEvent): this;
|
|
6450
|
+
off(type: CompareEventType, fn: (data: SlideEndEvent) => void): this;
|
|
6451
|
+
remove(): void;
|
|
6452
|
+
}
|
|
6453
|
+
|
|
6454
|
+
export declare class MapboxSplitCompare {
|
|
6455
|
+
private _mapA;
|
|
6456
|
+
private _mapB;
|
|
6457
|
+
private _containerA;
|
|
6458
|
+
private _containerB;
|
|
6459
|
+
private _ev;
|
|
6460
|
+
private _clearSync;
|
|
6461
|
+
private _horizontal;
|
|
6462
|
+
private _divider;
|
|
6463
|
+
private _crosshairA;
|
|
6464
|
+
private _crosshairB;
|
|
6465
|
+
constructor(mapA: mapboxgl.Map, mapB: mapboxgl.Map, options?: SplitCompareOptions);
|
|
6466
|
+
private _setupLayout;
|
|
6467
|
+
private _createDivider;
|
|
6468
|
+
private _createCrosshair;
|
|
6469
|
+
private _createCrosshairElement;
|
|
6470
|
+
private _setupMouseEvents;
|
|
6471
|
+
private _updateCrosshairB;
|
|
6472
|
+
private _updateCrosshairA;
|
|
6473
|
+
setOrientation(orientation: 'horizontal' | 'vertical'): void;
|
|
6474
|
+
setSyncEnabled(enabled: boolean): void;
|
|
6475
|
+
on(type: 'orientationChange' | 'syncChange', fn: (data: any) => void): this;
|
|
6476
|
+
off(type: 'orientationChange' | 'syncChange', fn: (data: any) => void): this;
|
|
6477
|
+
remove(): void;
|
|
6478
|
+
}
|
|
6479
|
+
|
|
6403
6480
|
/** 地图点击事件 */
|
|
6404
6481
|
declare interface MapClickEvent {
|
|
6405
6482
|
coordinates: [number, number];
|
|
@@ -7281,9 +7358,7 @@ declare class MeasureManager {
|
|
|
7281
7358
|
private boundHandleMapDoubleClick;
|
|
7282
7359
|
private boundHandleTouchEnd;
|
|
7283
7360
|
private boundHandleTouchStart;
|
|
7284
|
-
private lastTouchTime;
|
|
7285
7361
|
private lastTouchCoords;
|
|
7286
|
-
private doubleTapThreshold;
|
|
7287
7362
|
private tooltipElement;
|
|
7288
7363
|
constructor(adapter: MapAdapter, options?: MeasureManagerOptions);
|
|
7289
7364
|
private initMeasureSource;
|
|
@@ -7592,6 +7667,20 @@ declare interface Props {
|
|
|
7592
7667
|
theme?: 'light' | 'dark';
|
|
7593
7668
|
}
|
|
7594
7669
|
|
|
7670
|
+
declare interface Props_2 {
|
|
7671
|
+
/** 分割方向 */
|
|
7672
|
+
defaultDirection?: 'vertical' | 'horizontal';
|
|
7673
|
+
layerVisible?: boolean;
|
|
7674
|
+
mapOptions?: any;
|
|
7675
|
+
initIcons?: Array<{
|
|
7676
|
+
name: string;
|
|
7677
|
+
url: string;
|
|
7678
|
+
}>;
|
|
7679
|
+
initData?: any;
|
|
7680
|
+
leftData?: any;
|
|
7681
|
+
rightData?: any;
|
|
7682
|
+
}
|
|
7683
|
+
|
|
7595
7684
|
/** 地图提供者
|
|
7596
7685
|
* 在应用或组件树的顶层使用
|
|
7597
7686
|
*/
|
|
@@ -7727,6 +7816,10 @@ export declare const setBaseURL: (url: string) => void;
|
|
|
7727
7816
|
*/
|
|
7728
7817
|
export declare const setEndpoint: (key: string, path: string) => void;
|
|
7729
7818
|
|
|
7819
|
+
declare interface SlideEndEvent {
|
|
7820
|
+
currentPosition: number;
|
|
7821
|
+
}
|
|
7822
|
+
|
|
7730
7823
|
/** 数据源配置 */
|
|
7731
7824
|
declare interface SourceConfig {
|
|
7732
7825
|
id?: EntityId;
|
|
@@ -7752,6 +7845,11 @@ declare interface SourceState {
|
|
|
7752
7845
|
/** 数据源类型 */
|
|
7753
7846
|
declare type SourceType = 'geojson' | 'vector' | 'raster' | 'raster-dem' | 'image' | 'video';
|
|
7754
7847
|
|
|
7848
|
+
declare interface SplitCompareOptions {
|
|
7849
|
+
orientation?: 'horizontal' | 'vertical';
|
|
7850
|
+
syncEnabled?: boolean;
|
|
7851
|
+
}
|
|
7852
|
+
|
|
7755
7853
|
/**
|
|
7756
7854
|
* 状态历史记录
|
|
7757
7855
|
*/
|
|
@@ -8131,11 +8229,11 @@ export declare class TypedEventEmitter {
|
|
|
8131
8229
|
/**
|
|
8132
8230
|
* 订阅事件
|
|
8133
8231
|
*/
|
|
8134
|
-
on<K extends GISMapEventName>(event: K, callback: EventCallback<GISMapEventData
|
|
8232
|
+
on<K extends GISMapEventName>(event: K, callback: EventCallback<GISMapEventData>): () => void;
|
|
8135
8233
|
/**
|
|
8136
8234
|
* 订阅事件(仅触发一次)
|
|
8137
8235
|
*/
|
|
8138
|
-
once<K extends GISMapEventName>(event: K, callback: EventCallback<GISMapEventData
|
|
8236
|
+
once<K extends GISMapEventName>(event: K, callback: EventCallback<GISMapEventData>): () => void;
|
|
8139
8237
|
/**
|
|
8140
8238
|
* 取消订阅
|
|
8141
8239
|
*/
|
|
@@ -8143,7 +8241,7 @@ export declare class TypedEventEmitter {
|
|
|
8143
8241
|
/**
|
|
8144
8242
|
* 发射事件
|
|
8145
8243
|
*/
|
|
8146
|
-
emit<K extends GISMapEventName>(event: K, data?: GISMapEventData
|
|
8244
|
+
emit<K extends GISMapEventName>(event: K, data?: GISMapEventData): void;
|
|
8147
8245
|
/**
|
|
8148
8246
|
* 订阅命名空间下的所有事件
|
|
8149
8247
|
*/
|
|
@@ -8275,17 +8373,17 @@ export declare function useLayer(layerId: MaybeRefOrGetter<EntityId>): {
|
|
|
8275
8373
|
exists: ComputedRef<boolean>;
|
|
8276
8374
|
show: () => void;
|
|
8277
8375
|
hide: () => void;
|
|
8278
|
-
toggle: () =>
|
|
8279
|
-
remove: () =>
|
|
8376
|
+
toggle: () => boolean | undefined;
|
|
8377
|
+
remove: () => boolean | undefined;
|
|
8280
8378
|
setOpacity: (value: number) => void;
|
|
8281
8379
|
};
|
|
8282
8380
|
|
|
8283
8381
|
/** 使用图层组 */
|
|
8284
8382
|
export declare function useLayerGroup(groupId: MaybeRefOrGetter<EntityId>): {
|
|
8285
|
-
group: ComputedRef<
|
|
8286
|
-
layers: ComputedRef<
|
|
8287
|
-
visible: WritableComputedRef<
|
|
8288
|
-
expanded: WritableComputedRef<
|
|
8383
|
+
group: ComputedRef<LayerGroup | undefined>;
|
|
8384
|
+
layers: ComputedRef<LayerEntity[]>;
|
|
8385
|
+
visible: WritableComputedRef<boolean, boolean>;
|
|
8386
|
+
expanded: WritableComputedRef<boolean, boolean>;
|
|
8289
8387
|
exists: ComputedRef<boolean>;
|
|
8290
8388
|
};
|
|
8291
8389
|
|
|
@@ -8311,17 +8409,17 @@ export declare interface UseLayerOptions {
|
|
|
8311
8409
|
|
|
8312
8410
|
/** 使用图层列表 */
|
|
8313
8411
|
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) =>
|
|
8412
|
+
layers: ComputedRef<LayerEntity[] | undefined>;
|
|
8413
|
+
layerStates: ComputedRef<Readonly<Ref<ReadonlyMap<string, any>, ReadonlyMap<string, any>>> | undefined>;
|
|
8414
|
+
visibleLayers: ComputedRef<LayerEntity[] | undefined>;
|
|
8415
|
+
count: ComputedRef<number>;
|
|
8416
|
+
addLayer: (config: LayerConfig_2, beforeId?: string) => LayerEntity | undefined;
|
|
8417
|
+
removeLayer: (layerId: EntityId) => boolean | undefined;
|
|
8320
8418
|
removeAll: () => void;
|
|
8321
8419
|
showAll: () => void;
|
|
8322
8420
|
hideAll: () => void;
|
|
8323
|
-
getLayer: (layerId: EntityId) =>
|
|
8324
|
-
getLayersByType: (type: string) =>
|
|
8421
|
+
getLayer: (layerId: EntityId) => LayerEntity | undefined;
|
|
8422
|
+
getLayersByType: (type: string) => LayerEntity[] | undefined;
|
|
8325
8423
|
};
|
|
8326
8424
|
|
|
8327
8425
|
/** 使用地图上下文 - 返回 Ref */
|
|
@@ -8348,13 +8446,13 @@ export declare function useMarker(markerId: MaybeRefOrGetter<EntityId>): {
|
|
|
8348
8446
|
exists: ComputedRef<boolean>;
|
|
8349
8447
|
show: () => void;
|
|
8350
8448
|
hide: () => void;
|
|
8351
|
-
toggle: () =>
|
|
8352
|
-
remove: () =>
|
|
8449
|
+
toggle: () => boolean | undefined;
|
|
8450
|
+
remove: () => boolean | undefined;
|
|
8353
8451
|
setPosition: (lng: number, lat: number) => void;
|
|
8354
8452
|
moveTo: (lng: number, lat: number, animate?: boolean) => void;
|
|
8355
8453
|
openPopup: () => void;
|
|
8356
8454
|
closePopup: () => void;
|
|
8357
|
-
togglePopup: () =>
|
|
8455
|
+
togglePopup: () => boolean | undefined;
|
|
8358
8456
|
};
|
|
8359
8457
|
|
|
8360
8458
|
/** 创建并管理标记 */
|
|
@@ -8380,17 +8478,17 @@ export declare interface UseMarkerOptions {
|
|
|
8380
8478
|
|
|
8381
8479
|
/** 使用标记列表 */
|
|
8382
8480
|
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) =>
|
|
8481
|
+
markers: ComputedRef<MarkerEntity[]>;
|
|
8482
|
+
markerStates: ComputedRef<Readonly<Ref<ReadonlyMap<string, any>, ReadonlyMap<string, any>>> | undefined>;
|
|
8483
|
+
visibleMarkers: ComputedRef<MarkerEntity[]>;
|
|
8484
|
+
count: ComputedRef<number>;
|
|
8485
|
+
addMarker: (config: MarkerConfig_2) => MarkerEntity | undefined;
|
|
8486
|
+
removeMarker: (markerId: EntityId) => boolean | undefined;
|
|
8389
8487
|
removeAll: () => void;
|
|
8390
8488
|
showAll: () => void;
|
|
8391
8489
|
hideAll: () => void;
|
|
8392
|
-
getMarker: (markerId: EntityId) =>
|
|
8393
|
-
getMarkersInBounds: (bounds: [[number, number], [number, number]]) =>
|
|
8490
|
+
getMarker: (markerId: EntityId) => MarkerEntity | undefined;
|
|
8491
|
+
getMarkersInBounds: (bounds: [[number, number], [number, number]]) => MarkerEntity[] | undefined;
|
|
8394
8492
|
};
|
|
8395
8493
|
|
|
8396
8494
|
/** 使用视图状态 */
|