@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
package/README.md CHANGED
@@ -28,12 +28,14 @@ import { CesiumMapToolbar, initCesium } from '@xingm/vmap-cesium-toolbar';
28
28
  import '@xingm/vmap-cesium-toolbar/style';
29
29
 
30
30
  // 初始化Cesium
31
- const viewer = initCesium('cesiumContainer', {
32
- terrainProvider: Cesium.createWorldTerrain()
33
- });
31
+ (async () => {
32
+ const { viewer } = await initCesium('cesiumContainer', {
33
+ terrainProvider: Cesium.createWorldTerrain(),
34
+ });
34
35
 
35
- // 创建工具栏
36
- const toolbar = new CesiumMapToolbar(viewer, document.getElementById('toolbar'));
36
+ // 创建工具栏
37
+ const toolbar = new CesiumMapToolbar(viewer, document.getElementById('toolbar'));
38
+ })();
37
39
  ```
38
40
 
39
41
  ### Vue 3 项目中使用
@@ -52,11 +54,12 @@ import '@xingm/vmap-cesium-toolbar/style';
52
54
  let viewer;
53
55
  let toolbar;
54
56
 
55
- onMounted(() => {
57
+ onMounted(async () => {
56
58
  // 初始化Cesium
57
- viewer = initCesium('cesiumContainer', {
58
- terrainProvider: Cesium.createWorldTerrain()
59
+ const result = await initCesium('cesiumContainer', {
60
+ terrainProvider: Cesium.createWorldTerrain(),
59
61
  });
62
+ viewer = result.viewer;
60
63
 
61
64
  // 创建工具栏
62
65
  toolbar = new CesiumMapToolbar(viewer, document.getElementById('toolbar'));
@@ -80,30 +83,26 @@ const toolbar = new CesiumMapToolbar(
80
83
  );
81
84
  ```
82
85
 
83
- ### CesiumMapHelper
86
+ ### DrawHelper
84
87
 
85
- 地图辅助工具类,提供绘制和测量功能。
88
+ 绘制工具类(包的默认导出),提供线/面/矩形/圆等交互绘制能力。
86
89
 
87
90
  ```typescript
88
- import { CesiumMapHelper } from '@xingm/vmap-cesium-toolbar';
91
+ import DrawHelper from '@xingm/vmap-cesium-toolbar';
89
92
 
90
- const helper = new CesiumMapHelper(viewer);
91
- helper.startDrawing('line'); // 开始绘制线条
92
- helper.startMeasurement('distance'); // 开始距离测量
93
+ const drawHelper = new DrawHelper(viewer);
94
+ drawHelper.startDrawingPolygon();
93
95
  ```
94
96
 
95
- ### CesiumMapLoader
97
+ ### initCesium
96
98
 
97
- Cesium初始化工具,简化Cesium的配置和初始化。
99
+ Cesium 初始化函数,简化 Viewer 创建、底图/地形与初始视角配置。
98
100
 
99
101
  ```typescript
100
- import { CesiumMapLoader } from '@xingm/vmap-cesium-toolbar';
102
+ import { initCesium } from '@xingm/vmap-cesium-toolbar';
101
103
 
102
- const viewer = CesiumMapLoader.init('container', {
103
- terrainProvider: Cesium.createWorldTerrain(),
104
- imageryProvider: new Cesium.OpenStreetMapImageryProvider({
105
- url: 'https://a.tile.openstreetmap.org/'
106
- })
104
+ const { viewer } = await initCesium('cesiumContainer', {
105
+ cesiumToken: 'your_cesium_ion_token',
107
106
  });
108
107
  ```
109
108
 
@@ -231,6 +230,7 @@ npm run dev
231
230
  - [CesiumMapToolbar API](./doc/CesiumMapToolbar_API.md)
232
231
  - [CesiumMapHelper API](./doc/CesiumMapHelper_API.md)
233
232
  - [CesiumMapLoader API](./doc/CesiumMapLoader_API.md)
233
+ - [CesiumOverlayService API](./doc/CesiumOverlayService_API.md)
234
234
 
235
235
  ## 依赖要求
236
236
 
@@ -15,6 +15,7 @@ export declare const useToolBarConfig: (viewer: Viewer | undefined, message: Ref
15
15
  id: string;
16
16
  icon: string;
17
17
  title: string;
18
+ titleKey: string;
18
19
  color: string;
19
20
  borderColor: string;
20
21
  backgroundColor: string;
@@ -25,6 +26,7 @@ export declare const useToolBarConfig: (viewer: Viewer | undefined, message: Ref
25
26
  id: string;
26
27
  icon: string;
27
28
  title: string;
29
+ titleKey: string;
28
30
  color: string;
29
31
  backgroundColor: string;
30
32
  borderColor?: undefined;
@@ -36,6 +38,7 @@ export declare const useToolBarConfig: (viewer: Viewer | undefined, message: Ref
36
38
  icon: boolean;
37
39
  activeIcon: boolean;
38
40
  title: string;
41
+ titleKey: string;
39
42
  color: string;
40
43
  backgroundColor: string;
41
44
  borderColor?: undefined;
@@ -45,6 +48,7 @@ export declare const useToolBarConfig: (viewer: Viewer | undefined, message: Ref
45
48
  id: string;
46
49
  icon: string;
47
50
  title: string;
51
+ titleKey: string;
48
52
  color: string;
49
53
  borderColor: string;
50
54
  backgroundColor: string;
@@ -232,6 +232,7 @@ export declare function useOverlayHelper(viewer: Ref<Cesium.Viewer | undefined>,
232
232
  addLine: () => void;
233
233
  addArea: () => void;
234
234
  addCircle: () => void;
235
+ addCircle123: () => void;
235
236
  addRing: (i?: number) => Cesium.Entity | undefined;
236
237
  addPolygon: () => void;
237
238
  addRectangle: () => void;
@@ -0,0 +1,135 @@
1
+ declare const enUS: {
2
+ locale: string;
3
+ app: {
4
+ lang: {
5
+ zh: string;
6
+ en: string;
7
+ };
8
+ located: string;
9
+ init_success: string;
10
+ heatmap_empty: string;
11
+ heatmap_need_add: string;
12
+ heatmap_added: string;
13
+ heatmap_auto_on: string;
14
+ heatmap_auto_off: string;
15
+ heatmap_lod_coarse: string;
16
+ heatmap_lod_medium: string;
17
+ heatmap_lod_fine: string;
18
+ ring_test_added: string;
19
+ custom_alert: string;
20
+ custom_stats: string;
21
+ custom_visibility: string;
22
+ custom_alert_title: string;
23
+ custom_stats_title: string;
24
+ custom_visibility_title: string;
25
+ };
26
+ ui: {
27
+ draw: {
28
+ line: string;
29
+ area: string;
30
+ area_no_label: string;
31
+ circle: string;
32
+ circle_no_label: string;
33
+ polygon: string;
34
+ polygon_point_intercept: string;
35
+ polygon_finish_fallback: string;
36
+ polygon_no_label: string;
37
+ };
38
+ add: {
39
+ marker: string;
40
+ line: string;
41
+ area: string;
42
+ circle: string;
43
+ circle123: string;
44
+ polygon: string;
45
+ polyline: string;
46
+ icon: string;
47
+ svg: string;
48
+ marker_with_label: string;
49
+ label: string;
50
+ rectangle: string;
51
+ info_window: string;
52
+ ring: string;
53
+ ring_test: string;
54
+ heatmap: string;
55
+ };
56
+ test: {
57
+ set_highlight: string;
58
+ toggle_highlight: string;
59
+ };
60
+ heatmap: {
61
+ auto_on: string;
62
+ auto_off: string;
63
+ lod_coarse: string;
64
+ lod_medium: string;
65
+ lod_fine: string;
66
+ };
67
+ };
68
+ draw: {
69
+ start: {
70
+ line: string;
71
+ rectangle: string;
72
+ rectangle_no_label: string;
73
+ circle: string;
74
+ circle_no_label: string;
75
+ polygon: string;
76
+ polygon_no_label: string;
77
+ polygon_point_intercept: string;
78
+ polygon_finish_fallback: string;
79
+ };
80
+ done: {
81
+ line: string;
82
+ rectangle: string;
83
+ rectangle_no_label: string;
84
+ circle: string;
85
+ circle_no_label: string;
86
+ polygon: string;
87
+ polygon_no_label: string;
88
+ polygon_point_intercept_ok: string;
89
+ polygon_point_intercept_end: string;
90
+ polygon_finish_fallback_ok: string;
91
+ polygon_finish_fallback_blocked: string;
92
+ };
93
+ };
94
+ overlay: {
95
+ marker_mode: string;
96
+ marker_added: string;
97
+ marker_position: string;
98
+ sample_marker_label: string;
99
+ sample_marker_added: string;
100
+ icon_added: string;
101
+ icon_clicked: string;
102
+ svg_added: string;
103
+ svg_clicked: string;
104
+ polyline_added: string;
105
+ polyline_clicked: string;
106
+ line_added: string;
107
+ line_clicked: string;
108
+ area_added: string;
109
+ area_a_clicked: string;
110
+ area_b_clicked: string;
111
+ circle_added: string;
112
+ circle_a_clicked: string;
113
+ circle_b_clicked: string;
114
+ circle_c_clicked: string;
115
+ circle_d_clicked: string;
116
+ circle_e_clicked: string;
117
+ circle_alarm_clicked: string;
118
+ circle_detect_clicked: string;
119
+ rectangle_added: string;
120
+ rectangle_a_clicked: string;
121
+ rectangle_b_clicked: string;
122
+ rectangle_c_clicked: string;
123
+ rectangle_d_clicked: string;
124
+ rectangle_e_clicked: string;
125
+ highlight_need_rect_b: string;
126
+ highlight_need_rect_e: string;
127
+ info_window_added: string;
128
+ info_clicked: string;
129
+ info_window_title: string;
130
+ info_window_desc: string;
131
+ ring_added: string;
132
+ ring_clicked: string;
133
+ };
134
+ };
135
+ export default enUS;
@@ -0,0 +1,3 @@
1
+ import { I18nLike } from '../libs/i18n';
2
+ export declare const i18n: I18nLike;
3
+ export type { I18nLike };
@@ -0,0 +1,135 @@
1
+ declare const zhCN: {
2
+ locale: string;
3
+ app: {
4
+ lang: {
5
+ zh: string;
6
+ en: string;
7
+ };
8
+ located: string;
9
+ init_success: string;
10
+ heatmap_empty: string;
11
+ heatmap_need_add: string;
12
+ heatmap_added: string;
13
+ heatmap_auto_on: string;
14
+ heatmap_auto_off: string;
15
+ heatmap_lod_coarse: string;
16
+ heatmap_lod_medium: string;
17
+ heatmap_lod_fine: string;
18
+ ring_test_added: string;
19
+ custom_alert: string;
20
+ custom_stats: string;
21
+ custom_visibility: string;
22
+ custom_alert_title: string;
23
+ custom_stats_title: string;
24
+ custom_visibility_title: string;
25
+ };
26
+ ui: {
27
+ draw: {
28
+ line: string;
29
+ area: string;
30
+ area_no_label: string;
31
+ circle: string;
32
+ circle_no_label: string;
33
+ polygon: string;
34
+ polygon_point_intercept: string;
35
+ polygon_finish_fallback: string;
36
+ polygon_no_label: string;
37
+ };
38
+ add: {
39
+ marker: string;
40
+ line: string;
41
+ area: string;
42
+ circle: string;
43
+ circle123: string;
44
+ polygon: string;
45
+ polyline: string;
46
+ icon: string;
47
+ svg: string;
48
+ marker_with_label: string;
49
+ label: string;
50
+ rectangle: string;
51
+ info_window: string;
52
+ ring: string;
53
+ ring_test: string;
54
+ heatmap: string;
55
+ };
56
+ test: {
57
+ set_highlight: string;
58
+ toggle_highlight: string;
59
+ };
60
+ heatmap: {
61
+ auto_on: string;
62
+ auto_off: string;
63
+ lod_coarse: string;
64
+ lod_medium: string;
65
+ lod_fine: string;
66
+ };
67
+ };
68
+ draw: {
69
+ start: {
70
+ line: string;
71
+ rectangle: string;
72
+ rectangle_no_label: string;
73
+ circle: string;
74
+ circle_no_label: string;
75
+ polygon: string;
76
+ polygon_no_label: string;
77
+ polygon_point_intercept: string;
78
+ polygon_finish_fallback: string;
79
+ };
80
+ done: {
81
+ line: string;
82
+ rectangle: string;
83
+ rectangle_no_label: string;
84
+ circle: string;
85
+ circle_no_label: string;
86
+ polygon: string;
87
+ polygon_no_label: string;
88
+ polygon_point_intercept_ok: string;
89
+ polygon_point_intercept_end: string;
90
+ polygon_finish_fallback_ok: string;
91
+ polygon_finish_fallback_blocked: string;
92
+ };
93
+ };
94
+ overlay: {
95
+ marker_mode: string;
96
+ marker_added: string;
97
+ marker_position: string;
98
+ sample_marker_label: string;
99
+ sample_marker_added: string;
100
+ icon_added: string;
101
+ icon_clicked: string;
102
+ svg_added: string;
103
+ svg_clicked: string;
104
+ polyline_added: string;
105
+ polyline_clicked: string;
106
+ line_added: string;
107
+ line_clicked: string;
108
+ area_added: string;
109
+ area_a_clicked: string;
110
+ area_b_clicked: string;
111
+ circle_added: string;
112
+ circle_a_clicked: string;
113
+ circle_b_clicked: string;
114
+ circle_c_clicked: string;
115
+ circle_d_clicked: string;
116
+ circle_e_clicked: string;
117
+ circle_alarm_clicked: string;
118
+ circle_detect_clicked: string;
119
+ rectangle_added: string;
120
+ rectangle_a_clicked: string;
121
+ rectangle_b_clicked: string;
122
+ rectangle_c_clicked: string;
123
+ rectangle_d_clicked: string;
124
+ rectangle_e_clicked: string;
125
+ highlight_need_rect_b: string;
126
+ highlight_need_rect_e: string;
127
+ info_window_added: string;
128
+ info_clicked: string;
129
+ info_window_title: string;
130
+ info_window_desc: string;
131
+ ring_added: string;
132
+ ring_clicked: string;
133
+ };
134
+ };
135
+ export default zhCN;
package/dist/index.d.ts CHANGED
@@ -3,6 +3,20 @@
3
3
  import type * as Cesium from 'cesium';
4
4
  import type { Viewer, Cartesian3, Entity, Color } from 'cesium';
5
5
 
6
+ export type Locale = 'zh-CN' | 'en-US' | (string & {});
7
+
8
+ export interface I18nLike {
9
+ getLocale(): Locale;
10
+ setLocale(locale: Locale, options?: { persist?: boolean }): void;
11
+ t(key: string, params?: Record<string, any>, localeOverride?: Locale): string;
12
+ onLocaleChange(cb: (locale: Locale) => void): () => void;
13
+ bindElement(el: HTMLElement, key: string, attr?: 'text' | 'title' | 'placeholder', params?: Record<string, any>): void;
14
+ updateTree(root: HTMLElement): void;
15
+ addMessages?(locale: Locale, dict: Record<string, any>, options?: { merge?: boolean }): void;
16
+ setFallbackLocale?(locale: Locale): void;
17
+ configure?(options: { persist?: boolean; useStoredLocale?: boolean; fallbackLocale?: Locale; locale?: Locale }): void;
18
+ }
19
+
6
20
  // 工具栏配置接口(与 CesiumMapModel.ts 保持一致)
7
21
  export interface ToolbarConfig {
8
22
  position?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left';
@@ -15,6 +29,8 @@ export interface ToolbarConfig {
15
29
  boxShadow?: string;
16
30
  zIndex?: number;
17
31
  buttons?: CustomButtonConfig[];
32
+ useI18n?: boolean;
33
+ i18n?: I18nLike;
18
34
  }
19
35
 
20
36
  // 按钮配置接口(内部默认按钮配置使用)
@@ -23,6 +39,7 @@ export interface ButtonConfig {
23
39
  id: string;
24
40
  icon: string;
25
41
  title: string;
42
+ titleKey?: string;
26
43
  size?: number;
27
44
  color?: string;
28
45
  borderColor?: string;
@@ -40,6 +57,7 @@ export interface CustomButtonConfig {
40
57
  id: string;
41
58
  icon: string | HTMLElement | false;
42
59
  title: string;
60
+ titleKey?: string;
43
61
  enabled?: boolean;
44
62
  visible?: boolean;
45
63
  size?: number;
@@ -92,12 +110,15 @@ export interface ZoomCallback {
92
110
  export interface MapType {
93
111
  id: string;
94
112
  name: string;
113
+ nameKey?: string;
95
114
  thumbnail: string;
96
115
  provider: (token: string) => Cesium.ImageryProvider[];
97
116
  terrainProvider?: (token: string) => Cesium.TerrainProvider | null;
98
117
  geoWTFS?: (token: string, viewer: Cesium.Viewer) => any | null;
99
118
  }
100
119
 
120
+ export const i18n: I18nLike;
121
+
101
122
  // 视锥体选项接口
102
123
  export interface FrustumOptions {
103
124
  position?: Cartesian3;
@@ -198,9 +219,10 @@ export interface InitOptions {
198
219
  requestRenderMode?: boolean;
199
220
  token?: string;
200
221
  cesiumToken?: string;
201
- orderIndependentTranslucency?: boolean // 无序半透明度,
202
- fxaa?: boolean, // 启用FXAA后处理抗锯齿
203
- msaaSamples?: number, // MSAA采样数(推荐4或8),
222
+ maximumRenderTimeChange?: number; // 最大渲染时间变化
223
+ orderIndependentTranslucency?: boolean; // 无序半透明度,
224
+ fxaa?: boolean; // 启用FXAA后处理抗锯齿
225
+ msaaSamples?: number; // MSAA采样数(推荐4或8)
204
226
  success?: () => void;
205
227
  cancel?: () => void;
206
228
  mapCenter?: MapCenter;
@@ -216,9 +238,33 @@ export declare class CesiumMapToolbar {
216
238
  search?: SearchCallback;
217
239
  measurement?: MeasurementCallback;
218
240
  zoom?: ZoomCallback;
241
+ fullscreen?: (isFullscreen: boolean) => void;
242
+ resetLocation?: () => void;
219
243
  },
220
244
  initialCenter?: { longitude: number; latitude: number; height: number }
221
245
  );
246
+
247
+ /** 天地图 Token(可直接修改或配合 setTDToken) */
248
+ TD_Token: string;
249
+
250
+ /** 当前可用的底图类型列表 */
251
+ mapTypes: MapType[];
252
+
253
+ /** 获取内部搜索服务实例 */
254
+ getSearchService(): SearchService;
255
+
256
+ /** 获取内部禁飞区服务实例 */
257
+ getNotFlyZonesService(): NotFlyZonesService;
258
+
259
+ /** 获取内部测量服务实例 */
260
+ getMeasurementService(): any; // MeasurementService (内部未在 d.ts 中单独暴露)
261
+
262
+ /** 获取内部地图控制器实例 */
263
+ getCesiumMapCtrl(): CesiumMapController;
264
+
265
+ /** 获取内部图层服务实例 */
266
+ getMapLayersService(): MapLayersService;
267
+
222
268
  setMapTypes(mapTypes: MapType[]): void;
223
269
  setTDToken(TD_Token: string): void;
224
270
  setInitialCenter(center: { longitude: number; latitude: number; height: number }): void;
@@ -298,6 +344,9 @@ export interface OverlayEntity extends Entity {
298
344
  _innerRadius?: number;
299
345
  _outerRectangle?: Cesium.Rectangle;
300
346
 
347
+ /** primitive layer key: 用于分层批处理路由 */
348
+ _primitiveLayerKey?: string;
349
+
301
350
  /** primitive circle: 内部使用的纯色缓存(用于高亮恢复) */
302
351
  _primitiveRingBaseColor?: any;
303
352
  _primitiveFillBaseColor?: any;
@@ -451,6 +500,8 @@ export interface PolygonOptions {
451
500
  clickHighlight?: boolean | { color?: any | string; fillAlpha?: number };
452
501
  hoverHighlight?: boolean | { color?: any | string; fillAlpha?: number };
453
502
  onClick?: (entity: Entity) => void;
503
+ /** primitive 分层渲染 key(不同 key 会进入不同批次并按创建顺序确定上下层) */
504
+ layerKey?: string;
454
505
  id?: string;
455
506
  }
456
507
 
@@ -469,6 +520,8 @@ export interface RectangleOptions {
469
520
  clickHighlight?: boolean | { color?: any | string; fillAlpha?: number };
470
521
  hoverHighlight?: boolean | { color?: any | string; fillAlpha?: number };
471
522
  onClick?: (entity: Entity) => void;
523
+ /** primitive 分层渲染 key(不同 key 会进入不同批次并按创建顺序确定上下层) */
524
+ layerKey?: string;
472
525
  id?: string;
473
526
  }
474
527
 
@@ -489,6 +542,8 @@ export interface CircleOptions {
489
542
  clickHighlight?: boolean | { color?: any | string; fillAlpha?: number };
490
543
  hoverHighlight?: boolean | { color?: any | string; fillAlpha?: number };
491
544
  onClick?: (entity: Entity) => void;
545
+ /** primitive 分层渲染 key(不同 key 会进入不同批次并按创建顺序确定上下层) */
546
+ layerKey?: string;
492
547
  id?: string;
493
548
  }
494
549
 
@@ -676,6 +731,10 @@ export interface CesiumMapControllerOptions {
676
731
  getToken?: () => string;
677
732
  zoomCallback?: ZoomCallback;
678
733
  onSceneModeChanged?: () => void;
734
+ /** 全屏切换回调 */
735
+ fullscreenCallback?: (isFullscreen: boolean) => void;
736
+ /** 复位位置回调 */
737
+ resetLocationCallback?: () => void;
679
738
  }
680
739
 
681
740
  export declare class CesiumMapController {
@@ -779,6 +838,14 @@ export interface DrawOptions {
779
838
  * 默认 true;设为 false 可禁用绘制完成后自动创建的面积标签。
780
839
  */
781
840
  showAreaLabel?: boolean;
841
+
842
+ /**
843
+ * 是否启用多边形自相交校验。
844
+ * - false/未设置:默认允许交叉(不做校验)
845
+ * - true:启用自相交校验(结合 selfIntersectionAllowTouch/AllowContinue 控制行为)
846
+ */
847
+ selfIntersectionEnabled?: boolean;
848
+
782
849
  /**
783
850
  * 多边形自相交校验:是否允许“擦边/顶点落在旧边上”等仅接触(touch)情况。
784
851
  * - false/未设置:touch 也视为不合法