@xingm/vmap-cesium-toolbar 0.0.2-alpha.15 → 0.0.2-alpha.17

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.
Files changed (34) hide show
  1. package/README.md +22 -22
  2. package/dist/hooks/toolBarConfig.d.ts +4 -0
  3. package/dist/hooks/useOverlayHelper.d.ts +1 -0
  4. package/dist/i18n/en-US.d.ts +135 -0
  5. package/dist/i18n/index.d.ts +3 -0
  6. package/dist/i18n/zh-CN.d.ts +135 -0
  7. package/dist/index.d.ts +70 -3
  8. package/dist/index.js +1236 -773
  9. package/dist/index.js.map +1 -1
  10. package/dist/index.umd.js +52 -41
  11. package/dist/index.umd.js.map +1 -1
  12. package/dist/libs/CesiumHeatmapLayer.d.ts +5 -0
  13. package/dist/libs/CesiumMapLoader.d.ts +1 -0
  14. package/dist/libs/CesiumMapModel.d.ts +6 -0
  15. package/dist/libs/CesiumMapToolbar.d.ts +47 -5
  16. package/dist/libs/i18n/en-US.d.ts +66 -0
  17. package/dist/libs/i18n/index.d.ts +24 -0
  18. package/dist/libs/i18n/zh-CN.d.ts +66 -0
  19. package/dist/libs/overlay/MapCircle.d.ts +11 -0
  20. package/dist/libs/overlay/MapPolygon.d.ts +11 -0
  21. package/dist/libs/overlay/MapRectangle.d.ts +11 -0
  22. package/dist/libs/overlay/primitives/CirclePrimitiveBatch.d.ts +8 -2
  23. package/dist/libs/overlay/primitives/CirclePrimitiveLayerStack.d.ts +24 -0
  24. package/dist/libs/overlay/primitives/PolygonPrimitiveBatch.d.ts +8 -2
  25. package/dist/libs/overlay/primitives/PolygonPrimitiveLayerStack.d.ts +24 -0
  26. package/dist/libs/overlay/primitives/RectanglePrimitiveBatch.d.ts +8 -2
  27. package/dist/libs/overlay/primitives/RectanglePrimitiveLayerStack.d.ts +24 -0
  28. package/dist/libs/overlay/types.d.ts +2 -0
  29. package/dist/libs/toolBar/CesiumMapController.d.ts +6 -0
  30. package/dist/libs/toolBar/MapLayersService.d.ts +5 -0
  31. package/dist/libs/toolBar/MapSearchService.d.ts +7 -1
  32. package/dist/libs/toolBar/NotFlyZonesService.d.ts +5 -0
  33. package/dist/package.json +1 -1
  34. package/package.json +5 -1
@@ -20,6 +20,10 @@ export interface HeatmapOptions {
20
20
  height?: number;
21
21
  /** 单个点的影响半径(像素) */
22
22
  radius?: number;
23
+ /** 低强度提升(伽马矫正),< 1 可增强边缘,默认 0.7 */
24
+ gamma?: number;
25
+ /** 最小可见 alpha(0~1),用于避免外圈完全消失,默认 0.03 */
26
+ minAlpha?: number;
23
27
  /** 最小/最大值,用于归一化 value,如果不传则自动根据数据计算 */
24
28
  minValue?: number;
25
29
  maxValue?: number;
@@ -47,6 +51,7 @@ export default class CesiumHeatmapLayer {
47
51
  private viewer;
48
52
  private imageryLayer;
49
53
  private rectangle;
54
+ private fullDataRectangle;
50
55
  private canvas;
51
56
  private ctx;
52
57
  private options;
@@ -44,6 +44,7 @@ interface InitOptions {
44
44
  maximumScreenSpaceError?: number;
45
45
  maximumNumberOfLoadedTiles?: number;
46
46
  requestRenderMode?: boolean;
47
+ maximumRenderTimeChange?: number;
47
48
  token?: string;
48
49
  cesiumToken?: string;
49
50
  success?: () => void;
@@ -1,4 +1,5 @@
1
1
  import { Cartesian3, Cartographic, Color } from '../../node_modules/cesium';
2
+ import { I18nLike } from '../libs/i18n';
2
3
  import * as Cesium from 'cesium';
3
4
  export interface ToolbarConfig {
4
5
  position?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left';
@@ -11,12 +12,15 @@ export interface ToolbarConfig {
11
12
  boxShadow?: string;
12
13
  zIndex?: number;
13
14
  buttons?: CustomButtonConfig[];
15
+ useI18n?: boolean;
16
+ i18n?: I18nLike;
14
17
  }
15
18
  export interface ButtonConfig {
16
19
  sort?: number;
17
20
  id: string;
18
21
  icon: string;
19
22
  title: string;
23
+ titleKey?: string;
20
24
  size?: number;
21
25
  color?: string;
22
26
  borderColor?: string;
@@ -32,6 +36,7 @@ export interface CustomButtonConfig {
32
36
  id: string;
33
37
  icon: string | HTMLElement | false;
34
38
  title: string;
39
+ titleKey?: string;
35
40
  enabled?: boolean;
36
41
  visible?: boolean;
37
42
  size?: number;
@@ -74,6 +79,7 @@ export interface ZoomCallback {
74
79
  export interface MapType {
75
80
  id: string;
76
81
  name: string;
82
+ nameKey?: string;
77
83
  thumbnail: string;
78
84
  provider: (token: string) => Cesium.ImageryProvider[];
79
85
  terrainProvider?: (token: string) => Cesium.TerrainProvider | null;
@@ -1,4 +1,9 @@
1
1
  import { Viewer } from '../../node_modules/cesium';
2
+ import { CesiumMapController } from './toolBar/CesiumMapController';
3
+ import { MeasurementService } from './toolBar/MeasurementService';
4
+ import { SearchService } from './toolBar/MapSearchService';
5
+ import { MapLayersService } from './toolBar/MapLayersService';
6
+ import { NotFlyZonesService } from './toolBar/NotFlyZonesService';
2
7
  import { MapType, ToolbarConfig, SearchCallback, MeasurementCallback, ZoomCallback, CustomButtonConfig } from './CesiumMapModel';
3
8
  /**
4
9
  * Cesium地图工具栏类
@@ -15,6 +20,8 @@ export declare class CesiumMapToolbar {
15
20
  private notFlyZonesService;
16
21
  private measurementCallback?;
17
22
  private zoomCallback?;
23
+ private fullscreenCallback?;
24
+ private resetLocationCallback?;
18
25
  private initialCenter?;
19
26
  private currentMapType;
20
27
  TD_Token: string;
@@ -22,6 +29,9 @@ export declare class CesiumMapToolbar {
22
29
  private isNoFlyZoneChecked;
23
30
  private currentGeoWTFS;
24
31
  private measurementService;
32
+ private unsubscribeI18n?;
33
+ private i18n;
34
+ private useI18n;
25
35
  readonly measurement: {
26
36
  getMeasureMode: () => "none" | "distance" | "area";
27
37
  };
@@ -30,12 +40,42 @@ export declare class CesiumMapToolbar {
30
40
  search?: SearchCallback;
31
41
  measurement?: MeasurementCallback;
32
42
  zoom?: ZoomCallback;
43
+ fullscreen?: (isFullscreen: boolean) => void;
44
+ resetLocation?: () => void;
33
45
  }, initialCenter?: {
34
46
  longitude: number;
35
47
  latitude: number;
36
48
  height: number;
37
49
  });
50
+ /**
51
+ * searchService 对外暴露的获取搜索服务方法
52
+ */
53
+ getSearchService(): SearchService;
54
+ /**
55
+ * notFlyZonesService 对外暴露的获取禁飞区服务方法
56
+ */
57
+ getNotFlyZonesService(): NotFlyZonesService;
58
+ /**
59
+ * measurementService 对外暴露的获取测量服务方法
60
+ */
61
+ getMeasurementService(): MeasurementService;
62
+ /**
63
+ * cesmapController 对外暴露的获取地图控制器方法
64
+ */
65
+ getCesiumMapCtrl(): CesiumMapController;
66
+ /**
67
+ * mapLayersService 对外暴露的获取图层服务方法
68
+ */
69
+ getMapLayersService(): MapLayersService;
70
+ /**
71
+ * 设置地图类型配置
72
+ * @param mapTypes
73
+ */
38
74
  setMapTypes(mapTypes: MapType[]): void;
75
+ /**
76
+ * 设置天地图密钥
77
+ * @param TD_Token
78
+ */
39
79
  setTDToken(TD_Token: string): void;
40
80
  /**
41
81
  * 设置初始中心点
@@ -69,7 +109,13 @@ export declare class CesiumMapToolbar {
69
109
  /**
70
110
  * 获取所有按钮配置(包括默认按钮和自定义按钮),并添加 sort 值
71
111
  */
72
- private getAllButtonsWithSort;
112
+ private resolveIcon;
113
+ /**
114
+ * 获取按钮配置(已排序,包含默认按钮兜底)
115
+ * - 未传 buttons:使用默认按钮
116
+ * - 传了 buttons:按传入按钮列表渲染,并用默认按钮补齐缺省字段
117
+ */
118
+ private getButtonConfigs;
73
119
  /**
74
120
  * 重新构建工具栏按钮
75
121
  */
@@ -86,10 +132,6 @@ export declare class CesiumMapToolbar {
86
132
  * 创建工具栏
87
133
  */
88
134
  private createToolbar;
89
- /**
90
- * 获取按钮配置(已排序)
91
- */
92
- private getButtonConfigs;
93
135
  /**
94
136
  * 创建按钮
95
137
  */
@@ -0,0 +1,66 @@
1
+ declare const enUS: {
2
+ locale: string;
3
+ toolbar: {
4
+ search: string;
5
+ measure: string;
6
+ view2d3d: string;
7
+ layers: string;
8
+ location: string;
9
+ zoom_in: string;
10
+ zoom_out: string;
11
+ fullscreen: string;
12
+ };
13
+ measurement: {
14
+ start: string;
15
+ distance_done: string;
16
+ area_done: string;
17
+ cleared: string;
18
+ menu: {
19
+ area: string;
20
+ distance: string;
21
+ clear: string;
22
+ };
23
+ };
24
+ search: {
25
+ placeholder: string;
26
+ failed: string;
27
+ no_results: string;
28
+ };
29
+ layers: {
30
+ title: string;
31
+ overlay_title: string;
32
+ overlay: {
33
+ airport: string;
34
+ };
35
+ };
36
+ map_type: {
37
+ normal: string;
38
+ "3d": string;
39
+ imagery: string;
40
+ terrain: string;
41
+ };
42
+ no_fly: {
43
+ description: string;
44
+ };
45
+ draw: {
46
+ hint: {
47
+ circle_start: string;
48
+ circle_radius: string;
49
+ rectangle_start: string;
50
+ rectangle_end: string;
51
+ finish_or_undo: string;
52
+ polygon_start: string;
53
+ polygon_add: string;
54
+ polygon_continue: string;
55
+ line_start: string;
56
+ line_add: string;
57
+ line_continue: string;
58
+ polygon_no_intersection: string;
59
+ };
60
+ label: {
61
+ total_length: string;
62
+ area: string;
63
+ };
64
+ };
65
+ };
66
+ export default enUS;
@@ -0,0 +1,24 @@
1
+ type Locale = "zh-CN" | "en-US" | (string & {});
2
+ type I18nDict = Record<string, any>;
3
+ interface I18nLike {
4
+ getLocale(): Locale;
5
+ setLocale(locale: Locale, options?: {
6
+ persist?: boolean;
7
+ }): void;
8
+ t(key: string, params?: Record<string, any>, localeOverride?: Locale): string;
9
+ onLocaleChange(cb: (locale: Locale) => void): () => void;
10
+ bindElement(el: HTMLElement, key: string, attr?: "text" | "title" | "placeholder", params?: Record<string, any>): void;
11
+ updateTree(root: HTMLElement): void;
12
+ addMessages?(locale: Locale, dict: I18nDict, options?: {
13
+ merge?: boolean;
14
+ }): void;
15
+ setFallbackLocale?(locale: Locale): void;
16
+ configure?(options: {
17
+ persist?: boolean;
18
+ useStoredLocale?: boolean;
19
+ fallbackLocale?: Locale;
20
+ locale?: Locale;
21
+ }): void;
22
+ }
23
+ export declare const i18n: I18nLike;
24
+ export type { Locale, I18nLike };
@@ -0,0 +1,66 @@
1
+ declare const zhCN: {
2
+ locale: string;
3
+ toolbar: {
4
+ search: string;
5
+ measure: string;
6
+ view2d3d: string;
7
+ layers: string;
8
+ location: string;
9
+ zoom_in: string;
10
+ zoom_out: string;
11
+ fullscreen: string;
12
+ };
13
+ measurement: {
14
+ start: string;
15
+ distance_done: string;
16
+ area_done: string;
17
+ cleared: string;
18
+ menu: {
19
+ area: string;
20
+ distance: string;
21
+ clear: string;
22
+ };
23
+ };
24
+ search: {
25
+ placeholder: string;
26
+ failed: string;
27
+ no_results: string;
28
+ };
29
+ layers: {
30
+ title: string;
31
+ overlay_title: string;
32
+ overlay: {
33
+ airport: string;
34
+ };
35
+ };
36
+ map_type: {
37
+ normal: string;
38
+ "3d": string;
39
+ imagery: string;
40
+ terrain: string;
41
+ };
42
+ no_fly: {
43
+ description: string;
44
+ };
45
+ draw: {
46
+ hint: {
47
+ circle_start: string;
48
+ circle_radius: string;
49
+ rectangle_start: string;
50
+ rectangle_end: string;
51
+ finish_or_undo: string;
52
+ polygon_start: string;
53
+ polygon_add: string;
54
+ polygon_continue: string;
55
+ line_start: string;
56
+ line_add: string;
57
+ line_continue: string;
58
+ polygon_no_intersection: string;
59
+ };
60
+ label: {
61
+ total_length: string;
62
+ area: string;
63
+ };
64
+ };
65
+ };
66
+ export default zhCN;
@@ -43,6 +43,13 @@ export interface CircleOptions {
43
43
  fillAlpha?: number;
44
44
  };
45
45
  onClick?: (entity: Entity) => void;
46
+ /**
47
+ * Primitive 模式分层渲染 key。
48
+ * - 相同 layerKey 的 circle 会被合并到同一个批次中(更高性能)
49
+ * - 不同 layerKey 会进入不同的“图层空间”,并按首次出现顺序确定上下层
50
+ * - 只对 primitive 生效;entity 模式忽略
51
+ */
52
+ layerKey?: string;
46
53
  id?: string;
47
54
  }
48
55
  /**
@@ -52,9 +59,13 @@ export declare class MapCircle {
52
59
  private viewer;
53
60
  private entities;
54
61
  private primitiveBatch;
62
+ private primitiveLayerStack;
63
+ private primitiveBatchesByLayer;
55
64
  private static bearingTableCache;
56
65
  constructor(viewer: Viewer);
57
66
  private getPrimitiveBatch;
67
+ private getLayeredPrimitiveBatch;
68
+ private getPrimitiveBatchForOverlay;
58
69
  private resolveMaterialColor;
59
70
  private canUsePrimitive;
60
71
  private addPrimitiveCircle;
@@ -36,6 +36,13 @@ export interface PolygonOptions {
36
36
  fillAlpha?: number;
37
37
  };
38
38
  onClick?: (entity: Entity) => void;
39
+ /**
40
+ * Primitive 模式分层渲染 key。
41
+ * - 相同 layerKey 的 polygon 会被合并到同一个批次中(更高性能)
42
+ * - 不同 layerKey 会进入不同的“图层空间”,并按首次出现顺序确定上下层
43
+ * - 只对 primitive 生效;entity 模式忽略
44
+ */
45
+ layerKey?: string;
39
46
  id?: string;
40
47
  }
41
48
  /**
@@ -45,8 +52,12 @@ export declare class MapPolygon {
45
52
  private viewer;
46
53
  private entities;
47
54
  private primitiveBatch;
55
+ private primitiveLayerStack;
56
+ private primitiveBatchesByLayer;
48
57
  constructor(viewer: Viewer);
49
58
  private getPrimitiveBatch;
59
+ private getLayeredPrimitiveBatch;
60
+ private getPrimitiveBatchForOverlay;
50
61
  private resolveMaterialColor;
51
62
  private canUsePrimitive;
52
63
  private addPrimitivePolygon;
@@ -36,6 +36,13 @@ export interface RectangleOptions {
36
36
  fillAlpha?: number;
37
37
  };
38
38
  onClick?: (entity: Entity) => void;
39
+ /**
40
+ * Primitive 模式分层渲染 key。
41
+ * - 相同 layerKey 的 rectangle 会被合并到同一个批次中(更高性能)
42
+ * - 不同 layerKey 会进入不同的“图层空间”,并按首次出现顺序确定上下层
43
+ * - 只对 primitive 生效;entity 模式忽略
44
+ */
45
+ layerKey?: string;
39
46
  id?: string;
40
47
  }
41
48
  /**
@@ -45,8 +52,12 @@ export declare class MapRectangle {
45
52
  private viewer;
46
53
  private entities;
47
54
  private primitiveBatch;
55
+ private primitiveLayerStack;
56
+ private primitiveBatchesByLayer;
48
57
  constructor(viewer: Viewer);
49
58
  private getPrimitiveBatch;
59
+ private getLayeredPrimitiveBatch;
60
+ private getPrimitiveBatchForOverlay;
50
61
  private resolveMaterialColor;
51
62
  private canUsePrimitive;
52
63
  private addPrimitiveRectangle;
@@ -6,14 +6,20 @@ export interface CirclePrimitiveParts {
6
6
  }
7
7
  export declare class CirclePrimitiveBatch {
8
8
  private viewer;
9
- private collection;
9
+ private ringCollection;
10
+ private fillCollection;
11
+ private ownsCollections;
12
+ private ownedRootCollection;
10
13
  private ringPrimitive;
11
14
  private fillPrimitive;
12
15
  private records;
13
16
  private rebuildScheduled;
14
17
  private colorApplyScheduled;
15
18
  private pendingColorApplyIds;
16
- constructor(viewer: Viewer);
19
+ constructor(viewer: Viewer, options?: {
20
+ ringCollection?: Cesium.PrimitiveCollection;
21
+ fillCollection?: Cesium.PrimitiveCollection;
22
+ });
17
23
  destroy(): void;
18
24
  has(circleId: string): boolean;
19
25
  upsertGeometry(args: {
@@ -0,0 +1,24 @@
1
+ import { Viewer } from '../../../../node_modules/cesium';
2
+ import * as Cesium from 'cesium';
3
+ export interface CirclePrimitiveLayerCollections {
4
+ fillCollection: Cesium.PrimitiveCollection;
5
+ ringCollection: Cesium.PrimitiveCollection;
6
+ }
7
+ /**
8
+ * Maintains a stable, ordered layer stack for Circle primitive rendering.
9
+ *
10
+ * Rendering order:
11
+ * - all fill layers (bottom -> top)
12
+ * - all ring layers (bottom -> top)
13
+ *
14
+ * This ensures boundaries (rings) remain visible even when multiple translucent fills overlap.
15
+ */
16
+ export declare class CirclePrimitiveLayerStack {
17
+ private viewer;
18
+ private fillsRoot;
19
+ private ringsRoot;
20
+ private layers;
21
+ constructor(viewer: Viewer);
22
+ getLayerCollections(layerKey: string): CirclePrimitiveLayerCollections;
23
+ destroy(): void;
24
+ }
@@ -6,14 +6,20 @@ export interface PolygonPrimitiveParts {
6
6
  }
7
7
  export declare class PolygonPrimitiveBatch {
8
8
  private viewer;
9
- private collection;
9
+ private fillCollection;
10
+ private borderCollection;
11
+ private ownsCollections;
12
+ private ownedRootCollection;
10
13
  private fillPrimitive;
11
14
  private borderPrimitive;
12
15
  private records;
13
16
  private rebuildScheduled;
14
17
  private colorApplyScheduled;
15
18
  private pendingColorApplyIds;
16
- constructor(viewer: Viewer);
19
+ constructor(viewer: Viewer, options?: {
20
+ fillCollection?: Cesium.PrimitiveCollection;
21
+ borderCollection?: Cesium.PrimitiveCollection;
22
+ });
17
23
  destroy(): void;
18
24
  upsertGeometry(args: {
19
25
  polygonId: string;
@@ -0,0 +1,24 @@
1
+ import { Viewer } from '../../../../node_modules/cesium';
2
+ import * as Cesium from 'cesium';
3
+ export interface PolygonPrimitiveLayerCollections {
4
+ fillCollection: Cesium.PrimitiveCollection;
5
+ borderCollection: Cesium.PrimitiveCollection;
6
+ }
7
+ /**
8
+ * Maintains a stable, ordered layer stack for Polygon primitive rendering.
9
+ *
10
+ * Rendering order:
11
+ * - all fill layers (bottom -> top)
12
+ * - all border layers (bottom -> top)
13
+ *
14
+ * This ensures borders remain visible even when multiple translucent fills overlap.
15
+ */
16
+ export declare class PolygonPrimitiveLayerStack {
17
+ private viewer;
18
+ private fillsRoot;
19
+ private bordersRoot;
20
+ private layers;
21
+ constructor(viewer: Viewer);
22
+ getLayerCollections(layerKey: string): PolygonPrimitiveLayerCollections;
23
+ destroy(): void;
24
+ }
@@ -6,14 +6,20 @@ export interface RectanglePrimitiveParts {
6
6
  }
7
7
  export declare class RectanglePrimitiveBatch {
8
8
  private viewer;
9
- private collection;
9
+ private ringCollection;
10
+ private fillCollection;
11
+ private ownsCollections;
12
+ private ownedRootCollection;
10
13
  private ringPrimitive;
11
14
  private fillPrimitive;
12
15
  private records;
13
16
  private rebuildScheduled;
14
17
  private colorApplyScheduled;
15
18
  private pendingColorApplyIds;
16
- constructor(viewer: Viewer);
19
+ constructor(viewer: Viewer, options?: {
20
+ ringCollection?: Cesium.PrimitiveCollection;
21
+ fillCollection?: Cesium.PrimitiveCollection;
22
+ });
17
23
  destroy(): void;
18
24
  upsertGeometry(args: {
19
25
  rectangleId: string;
@@ -0,0 +1,24 @@
1
+ import { Viewer } from '../../../../node_modules/cesium';
2
+ import * as Cesium from 'cesium';
3
+ export interface RectanglePrimitiveLayerCollections {
4
+ fillCollection: Cesium.PrimitiveCollection;
5
+ ringCollection: Cesium.PrimitiveCollection;
6
+ }
7
+ /**
8
+ * 为矩形 Primitive 渲染维护一个稳定的有序图层栈。
9
+ *
10
+ * 渲染顺序:
11
+ * - 所有填充图层(从下到上)
12
+ * - 所有描边图层(从下到上)
13
+ *
14
+ * 这样可以确保在存在多个半透明填充重叠时,描边仍然清晰可见。
15
+ */
16
+ export declare class RectanglePrimitiveLayerStack {
17
+ private viewer;
18
+ private fillsRoot;
19
+ private ringsRoot;
20
+ private layers;
21
+ constructor(viewer: Viewer);
22
+ getLayerCollections(layerKey: string): RectanglePrimitiveLayerCollections;
23
+ destroy(): void;
24
+ }
@@ -106,6 +106,8 @@ export interface OverlayEntity extends Entity {
106
106
  _innerRadius?: number;
107
107
  _outerRectangle?: Rectangle;
108
108
  /** primitive circle: 内部使用的纯色缓存(用于高亮恢复) */
109
+ /** primitive layer key: 用于分层批处理路由 */
110
+ _primitiveLayerKey?: string;
109
111
  _primitiveRingBaseColor?: Color;
110
112
  _primitiveFillBaseColor?: Color;
111
113
  /** primitive polygon/rectangle: 边框纯色缓存(用于高亮恢复) */
@@ -17,6 +17,10 @@ interface CesiumMapControllerOptions {
17
17
  zoomCallback?: ZoomCallback;
18
18
  /** 场景模式切换后回调(例如通知 DrawHelper 重新计算偏移) */
19
19
  onSceneModeChanged?: () => void;
20
+ /** 全屏切换回调 */
21
+ fullscreenCallback?: (isFullscreen: boolean) => void;
22
+ /** 复位位置回调 */
23
+ resetLocationCallback?: () => void;
20
24
  }
21
25
  /**
22
26
  * 负责地图相机控制、缩放层级和 2D/3D 切换等逻辑的控制器
@@ -30,6 +34,8 @@ export declare class CesiumMapController {
30
34
  private getToken?;
31
35
  private zoomCallback?;
32
36
  private onSceneModeChanged?;
37
+ private fullscreenCallback?;
38
+ private resetLocationCallback?;
33
39
  constructor(viewer: Viewer, options?: CesiumMapControllerOptions);
34
40
  /**
35
41
  * 监听相机缩放,限制层级范围到 [1, 18],并参考当前底图的 maximumLevel
@@ -1,5 +1,6 @@
1
1
  import { Viewer } from '../../../node_modules/cesium';
2
2
  import { MapType } from '../CesiumMapModel';
3
+ import { I18nLike } from '../../libs/i18n';
3
4
  /**
4
5
  * 图层服务配置接口
5
6
  */
@@ -9,6 +10,8 @@ export interface MapLayersServiceConfig {
9
10
  token: string;
10
11
  isNoFlyZoneChecked: boolean;
11
12
  isNoFlyZoneVisible: boolean;
13
+ i18n?: I18nLike;
14
+ useI18n?: boolean;
12
15
  onMapTypeChange?: (mapTypeId: string) => void;
13
16
  onNoFlyZoneToggle?: (isChecked: boolean) => void;
14
17
  onShowNoFlyZones?: () => Promise<void> | void;
@@ -22,6 +25,8 @@ export declare class MapLayersService {
22
25
  private toolbarElement;
23
26
  private config;
24
27
  private currentGeoWTFS;
28
+ private i18n;
29
+ private useI18n;
25
30
  constructor(viewer: Viewer, toolbarElement: HTMLElement, config: MapLayersServiceConfig);
26
31
  /**
27
32
  * 更新配置
@@ -1,5 +1,6 @@
1
1
  import { Viewer } from '../../../node_modules/cesium';
2
2
  import { SearchResult, SearchCallback } from '../CesiumMapModel';
3
+ import { I18nLike } from '../../libs/i18n';
3
4
  /**
4
5
  * 搜索服务类
5
6
  * 负责处理地图搜索相关的所有逻辑
@@ -9,7 +10,12 @@ export declare class SearchService {
9
10
  private toolbarElement;
10
11
  private searchCallback?;
11
12
  private searchContainer;
12
- constructor(viewer: Viewer, toolbarElement: HTMLElement, searchCallback?: SearchCallback);
13
+ private i18n;
14
+ private useI18n;
15
+ constructor(viewer: Viewer, toolbarElement: HTMLElement, searchCallback?: SearchCallback, options?: {
16
+ i18n?: I18nLike;
17
+ useI18n?: boolean;
18
+ });
13
19
  /**
14
20
  * 设置搜索回调
15
21
  */
@@ -1,10 +1,13 @@
1
1
  import { Viewer } from '../../../node_modules/cesium';
2
+ import { I18nLike } from '../../libs/i18n';
2
3
  /**
3
4
  * 禁飞区服务配置接口
4
5
  */
5
6
  export interface NotFlyZonesServiceConfig {
6
7
  extrudedHeight?: number;
7
8
  autoLoad?: boolean;
9
+ i18n?: I18nLike;
10
+ useI18n?: boolean;
8
11
  }
9
12
  /**
10
13
  * 禁飞区服务类
@@ -16,6 +19,8 @@ export declare class NotFlyZonesService {
16
19
  private isNoFlyZoneVisible;
17
20
  private isNoFlyZoneLoading;
18
21
  private readonly extrudedHeight;
22
+ private i18n;
23
+ private useI18n;
19
24
  constructor(viewer: Viewer, config?: NotFlyZonesServiceConfig);
20
25
  /**
21
26
  * 加载并显示机场禁飞区
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xingm/vmap-cesium-toolbar",
3
- "version": "0.0.2-alpha.15",
3
+ "version": "0.0.2-alpha.17",
4
4
  "description": "A powerful Cesium map toolbar plugin with drawing, measurement, and interaction features",
5
5
  "type": "module",
6
6
  "main": "index.js",