@teeechina/teee-map 0.0.23 → 0.0.24
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/index.d.ts +35 -10
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -8,7 +8,10 @@ import type { FeatureCollection } from 'geojson';
|
|
|
8
8
|
|
|
9
9
|
export type MapType = 'graph' | 'geom' | 'ctc' | 'raster';
|
|
10
10
|
|
|
11
|
-
export type LayerType = 'background' | 'signal' | 'track' | 'track_circuit' | 'bumper' | 'switch' | 'switch_loc' | 'insulation' | 'label' | 'prevention';
|
|
11
|
+
export type LayerType = 'background' | 'signal' | 'track' | 'track_circuit' | 'bumper' | 'switch' | 'switch_loc' | 'insulation' | 'label' | 'prevention' | 'sgfhqy' | 'region';
|
|
12
|
+
|
|
13
|
+
// 股道 | 桥梁 | 隧道 | 信号机 | 曲线 | 防洪 | 坡道 | 接触网分相 | 通话柱
|
|
14
|
+
export type RegionLayerType = 'background' | 'track' | 'bridge' | 'tunnel' | 'region_signal' | 'curve' | 'floodcontrol' | 'ramp' | 'contactseparation' | 'callpost';
|
|
12
15
|
|
|
13
16
|
// ─────────────────────────────────────────────
|
|
14
17
|
// 联锁枚举
|
|
@@ -119,17 +122,17 @@ export enum PreventionTypes {
|
|
|
119
122
|
|
|
120
123
|
/** MapForge 生成的地图初始化配置 */
|
|
121
124
|
export interface MapForgeConfig {
|
|
122
|
-
id: string;
|
|
123
|
-
sourceUrl?: string;
|
|
125
|
+
id: string; // 地图主源名
|
|
126
|
+
sourceUrl?: string; // 用于 Vector/Raster 的 URL
|
|
127
|
+
|
|
124
128
|
subSourceId?: string;
|
|
125
129
|
subSourceUrl?: string;
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
zoom?: number;
|
|
130
|
+
|
|
131
|
+
layers?: (LayerType | RegionLayerType)[]; // 加载的图层类型
|
|
132
|
+
sourceLayers?: string[]; // 矢量瓦片内部的图层名
|
|
133
|
+
type?: 'region' | 'station';
|
|
134
|
+
|
|
135
|
+
zoom?: number; // 初始缩放级别
|
|
133
136
|
}
|
|
134
137
|
|
|
135
138
|
/** 传递给 initMap 的参数结构 */
|
|
@@ -401,6 +404,7 @@ export declare class TeeeMap {
|
|
|
401
404
|
initGraphFeatureState(f: GeoJSONFeature): void;
|
|
402
405
|
initGeoJsonFeatureState(f: GeoJSONFeature, layerType: string): void;
|
|
403
406
|
initGeoJsonState(): void;
|
|
407
|
+
initMixGeoJsonMapState(): void;
|
|
404
408
|
stashAllFeature(): void;
|
|
405
409
|
updateFeatureState(code: string | number, state: any): void;
|
|
406
410
|
|
|
@@ -415,6 +419,27 @@ export declare class TeeeMap {
|
|
|
415
419
|
createGeomEncryptedMap(stcode: string, url: string, layers: LayerType[]): void;
|
|
416
420
|
createCTCEncryptedMap(stcode: string, url: string, layers: LayerType[]): void;
|
|
417
421
|
createGeoJsonStationMap(stationDatas: GeojsonStationDatas[]): Promise<void>;
|
|
422
|
+
createMixGeoJsonMap(
|
|
423
|
+
stationDatas: {
|
|
424
|
+
code: string;
|
|
425
|
+
type: 'region' | 'station';
|
|
426
|
+
geojsonData: {
|
|
427
|
+
name: string;
|
|
428
|
+
data: GeoJSON.FeatureCollection | string;
|
|
429
|
+
}[];
|
|
430
|
+
deltaInfo?: {
|
|
431
|
+
deltax: number;
|
|
432
|
+
deltay: number;
|
|
433
|
+
};
|
|
434
|
+
}[],
|
|
435
|
+
): Promise<void>;
|
|
436
|
+
createGeoJsonRegionMap(
|
|
437
|
+
regionCode: string,
|
|
438
|
+
regionDatas: {
|
|
439
|
+
name: string;
|
|
440
|
+
data: GeoJSON.FeatureCollection | string;
|
|
441
|
+
}[],
|
|
442
|
+
): Promise<void>;
|
|
418
443
|
|
|
419
444
|
// ── 其他工具方法 ──
|
|
420
445
|
getMap(): MaplibreMap;
|