@ywbgn/bgl-package 1.0.0 → 1.2.1
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/README.md +660 -24
- package/dist/index.css +1 -0
- package/dist/index.d.ts +1091 -0
- package/dist/vue-arcgis-map.js +14989 -157
- package/dist/vue-arcgis-map.umd.cjs +131 -1
- package/package.json +56 -29
- package/dist/vue-arcgis-map.css +0 -1
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,1091 @@
|
|
|
1
|
+
import { ComponentOptionsMixin } from 'vue';
|
|
2
|
+
import { ComponentProvideOptions } from 'vue';
|
|
3
|
+
import { ComputedRef } from 'vue';
|
|
4
|
+
import { CreateComponentPublicInstanceWithMixins } from 'vue';
|
|
5
|
+
import { default as default_2 } from '@arcgis/core/Map.js';
|
|
6
|
+
import { default as default_3 } from '@arcgis/core/views/MapView.js';
|
|
7
|
+
import { default as default_4 } from '@arcgis/core/layers/GraphicsLayer.js';
|
|
8
|
+
import { default as default_5 } from '@arcgis/core/layers/Layer.js';
|
|
9
|
+
import { default as default_6 } from '@arcgis/core/layers/support/LabelClass.js';
|
|
10
|
+
import { default as default_7 } from '@arcgis/core/layers/FeatureLayer.js';
|
|
11
|
+
import { DefineComponent } from 'vue';
|
|
12
|
+
import { ExtractPropTypes } from 'vue';
|
|
13
|
+
import { GlobalComponents } from 'vue';
|
|
14
|
+
import { GlobalDirectives } from 'vue';
|
|
15
|
+
import { InjectionKey } from 'vue';
|
|
16
|
+
import { MaybeRef } from 'vue';
|
|
17
|
+
import { MaybeRefOrGetter } from 'vue';
|
|
18
|
+
import { Plugin as Plugin_2 } from 'vue';
|
|
19
|
+
import { PropType } from 'vue';
|
|
20
|
+
import { PublicProps } from 'vue';
|
|
21
|
+
|
|
22
|
+
declare const __VLS_component: DefineComponent<ExtractPropTypes< {
|
|
23
|
+
/** MapView 实例 */
|
|
24
|
+
view: {
|
|
25
|
+
type: PropType<default_3>;
|
|
26
|
+
required: true;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* 绘图图层(由 ArcgisMap 注入);测量等工具自建图层,此处保留以兼容既有接入方式。
|
|
30
|
+
*/
|
|
31
|
+
sketchLayer: {
|
|
32
|
+
type: PropType<default_4>;
|
|
33
|
+
required: true;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* 图层管理 / 业务卷帘 / 地图标注 / 条件查询识别的业务图层 id 前缀,需与 loadBusinessLayers 的 idPrefix 一致。
|
|
37
|
+
*/
|
|
38
|
+
layerIdPrefix: {
|
|
39
|
+
type: StringConstructor;
|
|
40
|
+
default: string;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* 白名单:仅显示这些工具。不传则显示全部(再减去 hiddenTools)。
|
|
44
|
+
*/
|
|
45
|
+
tools: {
|
|
46
|
+
type: PropType<ToolbarToolId[]>;
|
|
47
|
+
default: undefined;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* 黑名单:从默认全量中隐藏。与 tools 同时传时以 tools 为准。
|
|
51
|
+
*/
|
|
52
|
+
hiddenTools: {
|
|
53
|
+
type: PropType<ToolbarToolId[]>;
|
|
54
|
+
default: () => never[];
|
|
55
|
+
};
|
|
56
|
+
/** 是否显示底部经纬度条,默认 true */
|
|
57
|
+
showCoordinate: {
|
|
58
|
+
type: BooleanConstructor;
|
|
59
|
+
default: boolean;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* 全图定位中心 [经度, 纬度]。传入后点击全图会同时回到该中心与 minZoom。
|
|
63
|
+
* 若同时传入 homeExtent,优先使用 homeExtent(与平移边界一致)。
|
|
64
|
+
*/
|
|
65
|
+
homeCenter: {
|
|
66
|
+
type: PropType<[number, number]>;
|
|
67
|
+
default: undefined;
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* 全图经纬度范围。传入后点击全图走 goToFullExtent(minZoom + 范围中心)。
|
|
71
|
+
*/
|
|
72
|
+
homeExtent: {
|
|
73
|
+
type: PropType<LonLatExtent | null>;
|
|
74
|
+
default: null;
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* 为 true 时全图点击只抛 fullExtent,由业务侧自行完成定位。
|
|
78
|
+
*/
|
|
79
|
+
delegateFullExtent: {
|
|
80
|
+
type: BooleanConstructor;
|
|
81
|
+
default: boolean;
|
|
82
|
+
};
|
|
83
|
+
/** 坐标定位面板的动态坐标系配置;不传则走内置默认项 */
|
|
84
|
+
coordinateSystemConfig: {
|
|
85
|
+
type: PropType<CoordinateSystemConfig | null>;
|
|
86
|
+
default: null;
|
|
87
|
+
};
|
|
88
|
+
}>, {
|
|
89
|
+
destroySwipe: () => void;
|
|
90
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
91
|
+
fullExtent: () => any;
|
|
92
|
+
layerManage: () => any;
|
|
93
|
+
conditionQuery: () => any;
|
|
94
|
+
swipeCompare: () => any;
|
|
95
|
+
}, string, PublicProps, Readonly<ExtractPropTypes< {
|
|
96
|
+
/** MapView 实例 */
|
|
97
|
+
view: {
|
|
98
|
+
type: PropType<default_3>;
|
|
99
|
+
required: true;
|
|
100
|
+
};
|
|
101
|
+
/**
|
|
102
|
+
* 绘图图层(由 ArcgisMap 注入);测量等工具自建图层,此处保留以兼容既有接入方式。
|
|
103
|
+
*/
|
|
104
|
+
sketchLayer: {
|
|
105
|
+
type: PropType<default_4>;
|
|
106
|
+
required: true;
|
|
107
|
+
};
|
|
108
|
+
/**
|
|
109
|
+
* 图层管理 / 业务卷帘 / 地图标注 / 条件查询识别的业务图层 id 前缀,需与 loadBusinessLayers 的 idPrefix 一致。
|
|
110
|
+
*/
|
|
111
|
+
layerIdPrefix: {
|
|
112
|
+
type: StringConstructor;
|
|
113
|
+
default: string;
|
|
114
|
+
};
|
|
115
|
+
/**
|
|
116
|
+
* 白名单:仅显示这些工具。不传则显示全部(再减去 hiddenTools)。
|
|
117
|
+
*/
|
|
118
|
+
tools: {
|
|
119
|
+
type: PropType<ToolbarToolId[]>;
|
|
120
|
+
default: undefined;
|
|
121
|
+
};
|
|
122
|
+
/**
|
|
123
|
+
* 黑名单:从默认全量中隐藏。与 tools 同时传时以 tools 为准。
|
|
124
|
+
*/
|
|
125
|
+
hiddenTools: {
|
|
126
|
+
type: PropType<ToolbarToolId[]>;
|
|
127
|
+
default: () => never[];
|
|
128
|
+
};
|
|
129
|
+
/** 是否显示底部经纬度条,默认 true */
|
|
130
|
+
showCoordinate: {
|
|
131
|
+
type: BooleanConstructor;
|
|
132
|
+
default: boolean;
|
|
133
|
+
};
|
|
134
|
+
/**
|
|
135
|
+
* 全图定位中心 [经度, 纬度]。传入后点击全图会同时回到该中心与 minZoom。
|
|
136
|
+
* 若同时传入 homeExtent,优先使用 homeExtent(与平移边界一致)。
|
|
137
|
+
*/
|
|
138
|
+
homeCenter: {
|
|
139
|
+
type: PropType<[number, number]>;
|
|
140
|
+
default: undefined;
|
|
141
|
+
};
|
|
142
|
+
/**
|
|
143
|
+
* 全图经纬度范围。传入后点击全图走 goToFullExtent(minZoom + 范围中心)。
|
|
144
|
+
*/
|
|
145
|
+
homeExtent: {
|
|
146
|
+
type: PropType<LonLatExtent | null>;
|
|
147
|
+
default: null;
|
|
148
|
+
};
|
|
149
|
+
/**
|
|
150
|
+
* 为 true 时全图点击只抛 fullExtent,由业务侧自行完成定位。
|
|
151
|
+
*/
|
|
152
|
+
delegateFullExtent: {
|
|
153
|
+
type: BooleanConstructor;
|
|
154
|
+
default: boolean;
|
|
155
|
+
};
|
|
156
|
+
/** 坐标定位面板的动态坐标系配置;不传则走内置默认项 */
|
|
157
|
+
coordinateSystemConfig: {
|
|
158
|
+
type: PropType<CoordinateSystemConfig | null>;
|
|
159
|
+
default: null;
|
|
160
|
+
};
|
|
161
|
+
}>> & Readonly<{
|
|
162
|
+
onFullExtent?: (() => any) | undefined;
|
|
163
|
+
onLayerManage?: (() => any) | undefined;
|
|
164
|
+
onConditionQuery?: (() => any) | undefined;
|
|
165
|
+
onSwipeCompare?: (() => any) | undefined;
|
|
166
|
+
}>, {
|
|
167
|
+
coordinateSystemConfig: CoordinateSystemConfig | null;
|
|
168
|
+
layerIdPrefix: string;
|
|
169
|
+
tools: ToolbarToolId[];
|
|
170
|
+
hiddenTools: ToolbarToolId[];
|
|
171
|
+
showCoordinate: boolean;
|
|
172
|
+
homeCenter: [number, number];
|
|
173
|
+
homeExtent: LonLatExtent | null;
|
|
174
|
+
delegateFullExtent: boolean;
|
|
175
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {
|
|
176
|
+
layerSwipeRef: CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
177
|
+
view: default_3;
|
|
178
|
+
visible?: boolean;
|
|
179
|
+
idPrefix?: string;
|
|
180
|
+
}> & Readonly<{
|
|
181
|
+
onClose?: (() => any) | undefined;
|
|
182
|
+
}>, {
|
|
183
|
+
destroySwipe: () => void;
|
|
184
|
+
isSwipeActive: () => boolean;
|
|
185
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
186
|
+
close: () => any;
|
|
187
|
+
}, PublicProps, {
|
|
188
|
+
idPrefix: string;
|
|
189
|
+
visible: boolean;
|
|
190
|
+
}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {
|
|
191
|
+
leftSelectRef: HTMLDivElement;
|
|
192
|
+
rightSelectRef: HTMLDivElement;
|
|
193
|
+
}, any, ComponentProvideOptions, {
|
|
194
|
+
P: {};
|
|
195
|
+
B: {};
|
|
196
|
+
D: {};
|
|
197
|
+
C: {};
|
|
198
|
+
M: {};
|
|
199
|
+
Defaults: {};
|
|
200
|
+
}, Readonly<{
|
|
201
|
+
view: default_3;
|
|
202
|
+
visible?: boolean;
|
|
203
|
+
idPrefix?: string;
|
|
204
|
+
}> & Readonly<{
|
|
205
|
+
onClose?: (() => any) | undefined;
|
|
206
|
+
}>, {
|
|
207
|
+
destroySwipe: () => void;
|
|
208
|
+
isSwipeActive: () => boolean;
|
|
209
|
+
}, {}, {}, {}, {
|
|
210
|
+
idPrefix: string;
|
|
211
|
+
visible: boolean;
|
|
212
|
+
}> | null;
|
|
213
|
+
}, HTMLDivElement>;
|
|
214
|
+
|
|
215
|
+
declare const __VLS_component_2: DefineComponent<__VLS_Props_4, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
216
|
+
close: () => any;
|
|
217
|
+
}, string, PublicProps, Readonly<__VLS_Props_4> & Readonly<{
|
|
218
|
+
onClose?: (() => any) | undefined;
|
|
219
|
+
}>, {
|
|
220
|
+
anchor: "center" | "start";
|
|
221
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
222
|
+
|
|
223
|
+
/** 外层容器尺寸,支持像素数字或 CSS 字符串(如 100%、70vh) */
|
|
224
|
+
declare type __VLS_Props = {
|
|
225
|
+
width?: string | number;
|
|
226
|
+
height?: string | number;
|
|
227
|
+
/** 初始/当前缩放级别,业务侧可绑定变量动态调整 */
|
|
228
|
+
zoom?: number;
|
|
229
|
+
/** 初始/当前中心 [经度, 纬度],与 MapView.center 一致 */
|
|
230
|
+
center?: [number, number];
|
|
231
|
+
/** 底图相关密钥;也可由上层 provide(BASEMAP_KEYS_KEY) */
|
|
232
|
+
keys?: BasemapKeys | null;
|
|
233
|
+
/** 缩放下限;传入后写入 view.constraints.minZoom */
|
|
234
|
+
minZoom?: number | null;
|
|
235
|
+
/** 缩放上限;传入后写入 view.constraints.maxZoom */
|
|
236
|
+
maxZoom?: number | null;
|
|
237
|
+
/**
|
|
238
|
+
* 经纬度平移边界(WGS84)。传入后自动限制拖动,并在程序化 goTo 期间临时放开约束。
|
|
239
|
+
*/
|
|
240
|
+
panBounds?: LonLatExtent | null;
|
|
241
|
+
};
|
|
242
|
+
|
|
243
|
+
declare type __VLS_Props_2 = {
|
|
244
|
+
/** MapView 实例 */
|
|
245
|
+
view: default_3;
|
|
246
|
+
/** 业务图层 id 前缀,与 loadBusinessLayers 一致 */
|
|
247
|
+
idPrefix?: string;
|
|
248
|
+
/**
|
|
249
|
+
* 停靠左右。右侧有业务抽屉(如空间分析)时用 left;
|
|
250
|
+
* 左侧有面板时用 right。
|
|
251
|
+
*/
|
|
252
|
+
position?: LegendDockPosition;
|
|
253
|
+
/** 水平边距(px) */
|
|
254
|
+
offsetX?: number;
|
|
255
|
+
/**
|
|
256
|
+
* 相对地图底边抬高(px)。
|
|
257
|
+
* 默认 14,停靠左下、位于底图/卷帘入口下方;底图/卷帘默认 bottom 已上移避开图例高度。
|
|
258
|
+
*/
|
|
259
|
+
offsetY?: number;
|
|
260
|
+
};
|
|
261
|
+
|
|
262
|
+
declare type __VLS_Props_3 = {
|
|
263
|
+
/** MapView 实例 */
|
|
264
|
+
view: default_3;
|
|
265
|
+
/**
|
|
266
|
+
* 停靠左右。右侧有业务抽屉时用 left;左侧有面板时用 right。
|
|
267
|
+
*/
|
|
268
|
+
position?: LegendDockPosition;
|
|
269
|
+
/** 水平边距(px) */
|
|
270
|
+
offsetX?: number;
|
|
271
|
+
/** 相对地图底边抬高(px) */
|
|
272
|
+
offsetY?: number;
|
|
273
|
+
/** 比例尺单位,默认公制 */
|
|
274
|
+
unit?: ScaleBarUnit;
|
|
275
|
+
/** 比例尺外观,默认线型 */
|
|
276
|
+
barStyle?: ScaleBarStyle;
|
|
277
|
+
/** 是否显示实时数字比例尺(如 1:40,000) */
|
|
278
|
+
showNumericScale?: boolean;
|
|
279
|
+
/** 数字比例尺是否显示千分位,默认 true */
|
|
280
|
+
numericScaleUseGrouping?: boolean;
|
|
281
|
+
/** 数字比例尺格式化函数;传入后优先使用 */
|
|
282
|
+
numericScaleFormatter?: NumericScaleFormatter;
|
|
283
|
+
/** 外层容器背景色 */
|
|
284
|
+
panelBackground?: string;
|
|
285
|
+
/** 外层容器边框色 */
|
|
286
|
+
panelBorderColor?: string;
|
|
287
|
+
/** 图形比例尺标题颜色 */
|
|
288
|
+
graphicLabelColor?: string;
|
|
289
|
+
/** 数字比例尺文字颜色 */
|
|
290
|
+
numericLabelColor?: string;
|
|
291
|
+
};
|
|
292
|
+
|
|
293
|
+
declare type __VLS_Props_4 = {
|
|
294
|
+
/** 弹框标题 */
|
|
295
|
+
title: string;
|
|
296
|
+
/** 弹框宽度,默认 300px */
|
|
297
|
+
width?: number | string;
|
|
298
|
+
/**
|
|
299
|
+
* 水平锚点:center 配合工具栏居中弹框;
|
|
300
|
+
* start 配合左对齐弹框(如底图切换),拖动不带 -50% 偏移。
|
|
301
|
+
*/
|
|
302
|
+
anchor?: 'center' | 'start';
|
|
303
|
+
};
|
|
304
|
+
|
|
305
|
+
declare type __VLS_Props_5 = {
|
|
306
|
+
map: default_2 | null;
|
|
307
|
+
view: default_3 | null;
|
|
308
|
+
systemCoordinateWkid?: number | null;
|
|
309
|
+
mapBounds?: MapBounds | null;
|
|
310
|
+
};
|
|
311
|
+
|
|
312
|
+
declare type __VLS_Props_6 = {
|
|
313
|
+
/** 双向绑定值 */
|
|
314
|
+
modelValue?: string | number;
|
|
315
|
+
/** 输入类型 */
|
|
316
|
+
type?: string;
|
|
317
|
+
/** 占位文案 */
|
|
318
|
+
placeholder?: string;
|
|
319
|
+
/** 是否禁用 */
|
|
320
|
+
disabled?: boolean;
|
|
321
|
+
/** 原生最小值 */
|
|
322
|
+
min?: string | number;
|
|
323
|
+
/** 原生最大值 */
|
|
324
|
+
max?: string | number;
|
|
325
|
+
};
|
|
326
|
+
|
|
327
|
+
declare type __VLS_Props_7 = {
|
|
328
|
+
/** 当前值 */
|
|
329
|
+
modelValue?: string;
|
|
330
|
+
/** 选项列表 */
|
|
331
|
+
options?: BglSelectOption[];
|
|
332
|
+
/** 无选中值时的占位文案 */
|
|
333
|
+
placeholder?: string;
|
|
334
|
+
/** 是否展开 */
|
|
335
|
+
open?: boolean;
|
|
336
|
+
/** 是否禁用 */
|
|
337
|
+
disabled?: boolean;
|
|
338
|
+
};
|
|
339
|
+
|
|
340
|
+
declare function __VLS_template(): {
|
|
341
|
+
attrs: Partial<{}>;
|
|
342
|
+
slots: {
|
|
343
|
+
extra?(_: {}): any;
|
|
344
|
+
};
|
|
345
|
+
refs: {
|
|
346
|
+
layerSwipeRef: CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
347
|
+
view: default_3;
|
|
348
|
+
visible?: boolean;
|
|
349
|
+
idPrefix?: string;
|
|
350
|
+
}> & Readonly<{
|
|
351
|
+
onClose?: (() => any) | undefined;
|
|
352
|
+
}>, {
|
|
353
|
+
destroySwipe: () => void;
|
|
354
|
+
isSwipeActive: () => boolean;
|
|
355
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
356
|
+
close: () => any;
|
|
357
|
+
}, PublicProps, {
|
|
358
|
+
idPrefix: string;
|
|
359
|
+
visible: boolean;
|
|
360
|
+
}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {
|
|
361
|
+
leftSelectRef: HTMLDivElement;
|
|
362
|
+
rightSelectRef: HTMLDivElement;
|
|
363
|
+
}, any, ComponentProvideOptions, {
|
|
364
|
+
P: {};
|
|
365
|
+
B: {};
|
|
366
|
+
D: {};
|
|
367
|
+
C: {};
|
|
368
|
+
M: {};
|
|
369
|
+
Defaults: {};
|
|
370
|
+
}, Readonly<{
|
|
371
|
+
view: default_3;
|
|
372
|
+
visible?: boolean;
|
|
373
|
+
idPrefix?: string;
|
|
374
|
+
}> & Readonly<{
|
|
375
|
+
onClose?: (() => any) | undefined;
|
|
376
|
+
}>, {
|
|
377
|
+
destroySwipe: () => void;
|
|
378
|
+
isSwipeActive: () => boolean;
|
|
379
|
+
}, {}, {}, {}, {
|
|
380
|
+
idPrefix: string;
|
|
381
|
+
visible: boolean;
|
|
382
|
+
}> | null;
|
|
383
|
+
};
|
|
384
|
+
rootEl: HTMLDivElement;
|
|
385
|
+
};
|
|
386
|
+
|
|
387
|
+
declare function __VLS_template_2(): {
|
|
388
|
+
attrs: Partial<{}>;
|
|
389
|
+
slots: {
|
|
390
|
+
default?(_: {}): any;
|
|
391
|
+
};
|
|
392
|
+
refs: {};
|
|
393
|
+
rootEl: any;
|
|
394
|
+
};
|
|
395
|
+
|
|
396
|
+
declare type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
397
|
+
|
|
398
|
+
declare type __VLS_TemplateResult_2 = ReturnType<typeof __VLS_template_2>;
|
|
399
|
+
|
|
400
|
+
declare type __VLS_WithTemplateSlots<T, S> = T & {
|
|
401
|
+
new (): {
|
|
402
|
+
$slots: S;
|
|
403
|
+
};
|
|
404
|
+
};
|
|
405
|
+
|
|
406
|
+
declare type __VLS_WithTemplateSlots_2<T, S> = T & {
|
|
407
|
+
new (): {
|
|
408
|
+
$slots: S;
|
|
409
|
+
};
|
|
410
|
+
};
|
|
411
|
+
|
|
412
|
+
/**
|
|
413
|
+
* 按配置给已上图的业务 FeatureLayer 设置 labelingInfo。
|
|
414
|
+
* 仅 FeatureLayer 生效;找不到图层时跳过。
|
|
415
|
+
*/
|
|
416
|
+
export declare const applyBusinessLayerLabels: (map: default_2, configs: BusinessLayerLabelConfig[], options?: ApplyBusinessLayerLabelsOptions) => void;
|
|
417
|
+
|
|
418
|
+
export declare type ApplyBusinessLayerLabelsOptions = {
|
|
419
|
+
idPrefix?: string;
|
|
420
|
+
};
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* 所有缩放级别都限制平移:
|
|
424
|
+
* ArcGIS 的 constraints.geometry 只约束「视图中心点」。
|
|
425
|
+
* 这里根据当前可视范围尺寸,反推中心点合法活动区域,
|
|
426
|
+
* 效果上等价于「矩形四条边始终不超出屏幕」。
|
|
427
|
+
* 拖到边缘直接停住,不做回弹;缩放、F11、窗口 resize 都会跟随重算。
|
|
428
|
+
*
|
|
429
|
+
* @returns 约束句柄,组件卸载时调用 remove() 释放
|
|
430
|
+
*/
|
|
431
|
+
export declare const applyPanBoundsConstraint: (view: default_3, lonLatExtent: LonLatExtent) => Promise<PanConstraintHandle>;
|
|
432
|
+
|
|
433
|
+
export declare const ArcgisMap: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
434
|
+
ready: (payload: MapReadyPayload) => any;
|
|
435
|
+
}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
436
|
+
onReady?: ((payload: MapReadyPayload) => any) | undefined;
|
|
437
|
+
}>, {
|
|
438
|
+
width: string | number;
|
|
439
|
+
height: string | number;
|
|
440
|
+
zoom: number;
|
|
441
|
+
center: [number, number];
|
|
442
|
+
keys: BasemapKeys | null;
|
|
443
|
+
minZoom: number | null;
|
|
444
|
+
maxZoom: number | null;
|
|
445
|
+
panBounds: LonLatExtent | null;
|
|
446
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
447
|
+
mapRef: HTMLDivElement;
|
|
448
|
+
}, HTMLDivElement>;
|
|
449
|
+
|
|
450
|
+
/** 底图密钥注入键;业务可在地图页 provide 一次,子组件按需 inject */
|
|
451
|
+
export declare const BASEMAP_KEYS_KEY: InjectionKey<MaybeRef<BasemapKeys>>;
|
|
452
|
+
|
|
453
|
+
export declare const BASEMAP_OPTIONS: Array<{
|
|
454
|
+
value: BasemapOptionId;
|
|
455
|
+
label: string;
|
|
456
|
+
}>;
|
|
457
|
+
|
|
458
|
+
/** 底图相关密钥(业务 props 传入) */
|
|
459
|
+
export declare type BasemapKeys = {
|
|
460
|
+
tiandituKey?: string;
|
|
461
|
+
geovisToken?: string;
|
|
462
|
+
jl1mallMk?: string;
|
|
463
|
+
jl1mallToken?: string;
|
|
464
|
+
};
|
|
465
|
+
|
|
466
|
+
/** 底图选项 id,与下拉列表顺序一致 */
|
|
467
|
+
export declare type BasemapOptionId = 'tianditu' | 'tiandituVec' | 'geovis' | 'jl1' | 'arcgis';
|
|
468
|
+
|
|
469
|
+
export declare const BasemapSwitch: DefineComponent<ExtractPropTypes< {
|
|
470
|
+
/** MapView 实例 */
|
|
471
|
+
view: {
|
|
472
|
+
type: PropType<default_3>;
|
|
473
|
+
required: true;
|
|
474
|
+
};
|
|
475
|
+
/** 底图密钥;未传时尝试 inject(BASEMAP_KEYS_KEY) */
|
|
476
|
+
keys: {
|
|
477
|
+
type: PropType<BasemapKeys | null>;
|
|
478
|
+
default: null;
|
|
479
|
+
};
|
|
480
|
+
}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
481
|
+
"before-change": () => any;
|
|
482
|
+
}, string, PublicProps, Readonly<ExtractPropTypes< {
|
|
483
|
+
/** MapView 实例 */
|
|
484
|
+
view: {
|
|
485
|
+
type: PropType<default_3>;
|
|
486
|
+
required: true;
|
|
487
|
+
};
|
|
488
|
+
/** 底图密钥;未传时尝试 inject(BASEMAP_KEYS_KEY) */
|
|
489
|
+
keys: {
|
|
490
|
+
type: PropType<BasemapKeys | null>;
|
|
491
|
+
default: null;
|
|
492
|
+
};
|
|
493
|
+
}>> & Readonly<{
|
|
494
|
+
"onBefore-change"?: (() => any) | undefined;
|
|
495
|
+
}>, {
|
|
496
|
+
keys: BasemapKeys | null;
|
|
497
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {
|
|
498
|
+
basemapSelectRef: HTMLDivElement;
|
|
499
|
+
}, HTMLDivElement>;
|
|
500
|
+
|
|
501
|
+
export declare const BglInput: DefineComponent<__VLS_Props_6, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
502
|
+
"update:modelValue": (value: string) => any;
|
|
503
|
+
}, string, PublicProps, Readonly<__VLS_Props_6> & Readonly<{
|
|
504
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
505
|
+
}>, {
|
|
506
|
+
type: string;
|
|
507
|
+
placeholder: string;
|
|
508
|
+
disabled: boolean;
|
|
509
|
+
modelValue: string | number;
|
|
510
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
511
|
+
|
|
512
|
+
export declare const BglSelect: DefineComponent<__VLS_Props_7, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
513
|
+
select: (value: string) => any;
|
|
514
|
+
"update:modelValue": (value: string) => any;
|
|
515
|
+
"update:open": (open: boolean) => any;
|
|
516
|
+
}, string, PublicProps, Readonly<__VLS_Props_7> & Readonly<{
|
|
517
|
+
onSelect?: ((value: string) => any) | undefined;
|
|
518
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
519
|
+
"onUpdate:open"?: ((open: boolean) => any) | undefined;
|
|
520
|
+
}>, {
|
|
521
|
+
placeholder: string;
|
|
522
|
+
disabled: boolean;
|
|
523
|
+
modelValue: string;
|
|
524
|
+
options: BglSelectOption[];
|
|
525
|
+
open: boolean;
|
|
526
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
527
|
+
rootRef: HTMLDivElement;
|
|
528
|
+
}, any>;
|
|
529
|
+
|
|
530
|
+
declare type BglSelectOption = {
|
|
531
|
+
/** 选项值 */
|
|
532
|
+
value: string;
|
|
533
|
+
/** 选项展示文案 */
|
|
534
|
+
label: string;
|
|
535
|
+
/** 是否禁用该选项 */
|
|
536
|
+
disabled?: boolean;
|
|
537
|
+
};
|
|
538
|
+
|
|
539
|
+
/**
|
|
540
|
+
* 由字段列表生成 Arcade 表达式(空格拼接)。
|
|
541
|
+
*/
|
|
542
|
+
export declare const buildLabelExpression: (fields: string[]) => string;
|
|
543
|
+
|
|
544
|
+
/**
|
|
545
|
+
* 由字段模板生成 Arcade。
|
|
546
|
+
* 模板 '({0} 亩)({1})' → "(" + Text($feature["a"]) + " 亩)(" + Text($feature["b"]) + ")"
|
|
547
|
+
*/
|
|
548
|
+
export declare const buildLabelExpressionFromTemplate: (fields: string[], fieldTemplate: string) => string;
|
|
549
|
+
|
|
550
|
+
/** 业务图层默认 id 前缀,与图层管理面板过滤规则一致 */
|
|
551
|
+
export declare const BUSINESS_LAYER_ID_PREFIX = "bgl-biz-";
|
|
552
|
+
|
|
553
|
+
/**
|
|
554
|
+
* 业务图层配置(字段对齐后台 mapServiceSettings)。
|
|
555
|
+
* 子系统特有的 popup / renderer 通过 resolveLayerProps 扩展。
|
|
556
|
+
*/
|
|
557
|
+
export declare type BusinessLayerConfig = {
|
|
558
|
+
id: string | number;
|
|
559
|
+
mapServiceUrl: string;
|
|
560
|
+
mapServiceName: string;
|
|
561
|
+
layerVisible?: boolean;
|
|
562
|
+
scaleConfig?: boolean | number | string;
|
|
563
|
+
minScale?: number | string;
|
|
564
|
+
maxScale?: number | string;
|
|
565
|
+
/** 1=MapServer,2=FeatureServer */
|
|
566
|
+
mapServiceType?: string | number;
|
|
567
|
+
layerOrder?: number | string;
|
|
568
|
+
};
|
|
569
|
+
|
|
570
|
+
/**
|
|
571
|
+
* 业务图层默认注记配置。
|
|
572
|
+
* 匹配优先 layerId,其次 title;表达式优先 expression,否则用 fields + fieldTemplate。
|
|
573
|
+
*/
|
|
574
|
+
export declare type BusinessLayerLabelConfig = {
|
|
575
|
+
/** 业务配置 id(不含前缀)或完整 layer.id */
|
|
576
|
+
layerId?: string | number;
|
|
577
|
+
/** 匹配 mapServiceName / layer.title */
|
|
578
|
+
title?: string;
|
|
579
|
+
/** 字段列表,库内拼 Arcade */
|
|
580
|
+
fields?: string[];
|
|
581
|
+
/**
|
|
582
|
+
* 字段模板,`{n}` 对应 fields[n]。
|
|
583
|
+
* 例:'({0} 亩)({1})' → "(" + Text($feature["f0"]) + " 亩)(" + Text($feature["f1"]) + ")"
|
|
584
|
+
* 不传则用空格拼接各 Text($feature["x"])
|
|
585
|
+
*/
|
|
586
|
+
fieldTemplate?: string;
|
|
587
|
+
/** 直接写 Arcade(优先于 fields) */
|
|
588
|
+
expression?: string;
|
|
589
|
+
style?: BusinessLayerLabelStyle;
|
|
590
|
+
};
|
|
591
|
+
|
|
592
|
+
/** 注记文字样式(对齐 forestpests 描边可读性) */
|
|
593
|
+
export declare type BusinessLayerLabelStyle = {
|
|
594
|
+
/** '#1A7F37' 或 [r,g,b] / [r,g,b,a](a 为 0~1 或 0~255) */
|
|
595
|
+
color?: string | number[];
|
|
596
|
+
fontSize?: number;
|
|
597
|
+
fontWeight?: 'normal' | 'bold';
|
|
598
|
+
haloColor?: string | number[];
|
|
599
|
+
haloSize?: number;
|
|
600
|
+
/** 默认 center-center,适合面要素 */
|
|
601
|
+
labelPlacement?: string;
|
|
602
|
+
};
|
|
603
|
+
|
|
604
|
+
/** 与参考项目 map.vue / SpatialAnalysis.js 一致的 Albers WKT */
|
|
605
|
+
export declare const CGCS2000_ALBERS_WKT = "PROJCS[\"CGCS2000_Albers\",GEOGCS[\"GCS_China_Geodetic_Coordinate_System_2000\",DATUM[\"D_China_2000\",SPHEROID[\"CGCS2000\",6378137.0,298.257222101]],PRIMEM[\"Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]],PROJECTION[\"Albers\"],PARAMETER[\"False_Easting\",0.0],PARAMETER[\"False_Northing\",0.0],PARAMETER[\"Longitude_Of_Origin\",105.0],PARAMETER[\"Latitude_Of_1st_Point\",25.0],PARAMETER[\"Latitude_Of_2nd_Point\",47.0],PARAMETER[\"Scale_Factor\",0.0],PARAMETER[\"Central_Parallel\",0.0],PARAMETER[\"Azimuth\",0.0],PARAMETER[\"Longitude_Of_1st_Point\",0.0],PARAMETER[\"Longitude_Of_2nd_Point\",0.0],PARAMETER[\"Longitude_Of_Center\",0.0],PARAMETER[\"Latitude_Of_Center\",0.0],UNIT[\"Meter\",1.0]]";
|
|
606
|
+
|
|
607
|
+
/**
|
|
608
|
+
* 比对两个坐标系:
|
|
609
|
+
* 1) 两边都有 wkid → 比 wkid
|
|
610
|
+
* 2) 否则两边都有 wkt → 比规范化 wkt
|
|
611
|
+
* 3) 否则无法可靠比较 → unreadable
|
|
612
|
+
*/
|
|
613
|
+
export declare const checkSpatialReferenceMatch: (expected: SpatialReferenceLike | null | undefined, actual: SpatialReferenceLike | null | undefined) => SpatialReferenceCheckStatus;
|
|
614
|
+
|
|
615
|
+
/** 清空待创建登记(页面卸载 / 重新上图前调用) */
|
|
616
|
+
export declare const clearPendingBusinessLayers: () => void;
|
|
617
|
+
|
|
618
|
+
/** 坐标定位配置:候选项 + 默认选中坐标系 */
|
|
619
|
+
export declare type CoordinateSystemConfig = {
|
|
620
|
+
defaultWkid: number;
|
|
621
|
+
options: CoordinateSystemOption[];
|
|
622
|
+
};
|
|
623
|
+
|
|
624
|
+
/** 坐标定位面板可切换的坐标系选项 */
|
|
625
|
+
export declare type CoordinateSystemOption = {
|
|
626
|
+
wkid: number;
|
|
627
|
+
label: string;
|
|
628
|
+
};
|
|
629
|
+
|
|
630
|
+
/** 根据配置创建 LabelClass(含描边) */
|
|
631
|
+
export declare const createBusinessLabelClass: (config: BusinessLayerLabelConfig) => default_6;
|
|
632
|
+
|
|
633
|
+
/** 默认全量工具顺序 */
|
|
634
|
+
export declare const DEFAULT_TOOLBAR_TOOLS: ToolbarToolId[];
|
|
635
|
+
|
|
636
|
+
/** 拆除两侧卷帘(切底图等场景可选调用) */
|
|
637
|
+
export declare const destroyAllSwipes: () => void;
|
|
638
|
+
|
|
639
|
+
/** 应用某一侧卷帘前,拆除另一侧已激活的 Swipe */
|
|
640
|
+
export declare const destroyOtherSwipe: (kind: SwipeKind) => void;
|
|
641
|
+
|
|
642
|
+
/** 由系统参数解析出的期望坐标系 */
|
|
643
|
+
export declare type ExpectedSpatialReference = {
|
|
644
|
+
/** 系统参数原始码(8848 仍保留为哨兵码) */
|
|
645
|
+
sourceCode: number;
|
|
646
|
+
wkid: number | null;
|
|
647
|
+
wkt: string | null;
|
|
648
|
+
/** 展示用名称 */
|
|
649
|
+
label: string;
|
|
650
|
+
};
|
|
651
|
+
|
|
652
|
+
/** 生成实际坐标系的简短展示文案 */
|
|
653
|
+
export declare const formatSpatialReferenceLabel: (spatialReference: SpatialReferenceLike | null | undefined) => string;
|
|
654
|
+
|
|
655
|
+
/** 读取当前创建参数(含 allConfigs,供面板排序) */
|
|
656
|
+
export declare const getPendingBusinessLayerOptions: () => PendingBusinessLayerCreateOptions | null;
|
|
657
|
+
|
|
658
|
+
/** 读取待创建列表;可按 id 前缀过滤 */
|
|
659
|
+
export declare const getPendingBusinessLayers: (idPrefix?: string) => PendingBusinessLayerItem[];
|
|
660
|
+
|
|
661
|
+
/** 读取单个图层的坐标系不一致信息 */
|
|
662
|
+
export declare const getSpatialReferenceMismatch: (layerId: string) => SpatialReferenceMismatchInfo | null;
|
|
663
|
+
|
|
664
|
+
/** 读取当前全部坐标系不一致记录 */
|
|
665
|
+
export declare const getSpatialReferenceMismatches: () => SpatialReferenceMismatchInfo[];
|
|
666
|
+
|
|
667
|
+
/**
|
|
668
|
+
* 定位到全图:与初始定位一致(minZoom + 范围中心)。
|
|
669
|
+
* 供工具栏「全图」等业务入口复用。
|
|
670
|
+
*/
|
|
671
|
+
export declare const goToFullExtent: (view: default_3, lonLatExtent: LonLatExtent) => Promise<void>;
|
|
672
|
+
|
|
673
|
+
/**
|
|
674
|
+
* 判断 goTo 是否被后续定位打断(可安全忽略,避免 Uncaught (in promise))。
|
|
675
|
+
*/
|
|
676
|
+
export declare const isViewGotoInterrupted: (error: unknown) => boolean;
|
|
677
|
+
|
|
678
|
+
declare type LayerProps = __esri.FeatureLayerProperties | __esri.MapImageLayerProperties;
|
|
679
|
+
|
|
680
|
+
/** 图例停靠左右(避让业务侧栏) */
|
|
681
|
+
export declare type LegendDockPosition = 'left' | 'right';
|
|
682
|
+
|
|
683
|
+
/**
|
|
684
|
+
* 通用业务图层加载器:配置 → Layer → map.addMany。
|
|
685
|
+
* - 按 mapServiceType/URL 区分 FeatureLayer / MapImageLayer
|
|
686
|
+
* - 同 id 重复加载会先移除旧层
|
|
687
|
+
* - resolveLayerProps 返回值与 base 浅合并
|
|
688
|
+
*/
|
|
689
|
+
export declare const loadBusinessLayers: (options: LoadBusinessLayersOptions) => default_5[];
|
|
690
|
+
|
|
691
|
+
export declare type LoadBusinessLayersOptions = {
|
|
692
|
+
map: default_2;
|
|
693
|
+
layers: BusinessLayerConfig[];
|
|
694
|
+
/**
|
|
695
|
+
* 业务扩展钩子:返回值会与基础 props 浅合并(后写覆盖先写)。
|
|
696
|
+
* 返回 void 则仅用基础配置。
|
|
697
|
+
*/
|
|
698
|
+
resolveLayerProps?: (item: BusinessLayerConfig, base: LayerProps) => LayerProps | void;
|
|
699
|
+
/**
|
|
700
|
+
* 为 true 时:layerOrder 升序后再反转 addMany(小 order 在上层,对齐参考项目)。
|
|
701
|
+
* 默认 false:小 order 先加在下层,大 order 在上层。
|
|
702
|
+
*/
|
|
703
|
+
reverse?: boolean;
|
|
704
|
+
/** 图层 id 前缀,避免与地图内其它图层冲突;默认 BUSINESS_LAYER_ID_PREFIX */
|
|
705
|
+
idPrefix?: string;
|
|
706
|
+
/** FeatureLayer 的 outFields;默认不传(由服务决定),避免 ['*'] 拖垮属性查询 */
|
|
707
|
+
outFields?: string[];
|
|
708
|
+
/**
|
|
709
|
+
* 指定图层的默认地图注记(labelingInfo)。
|
|
710
|
+
* 上图后按 layerId / title 匹配 FeatureLayer 并应用。
|
|
711
|
+
*/
|
|
712
|
+
labelConfigs?: BusinessLayerLabelConfig[];
|
|
713
|
+
/**
|
|
714
|
+
* 系统/业务图层期望坐标系(如 systemCoordinate)。
|
|
715
|
+
* 8848 会按业务约定解析为 CGCS2000_Albers WKT;其他值按 WKID。
|
|
716
|
+
* 传入后在图层 when() 成功时校验;不传则跳过校验。
|
|
717
|
+
*/
|
|
718
|
+
expectedSpatialReferenceWkid?: number | null;
|
|
719
|
+
/**
|
|
720
|
+
* 坐标系校验回调(提示型,默认不拦截上图)。
|
|
721
|
+
* reason=mismatch 会登记到图层管理;unreadable 只回调/打日志,不登记红标。
|
|
722
|
+
*/
|
|
723
|
+
onSpatialReferenceMismatch?: (info: SpatialReferenceMismatchInfo) => void;
|
|
724
|
+
/**
|
|
725
|
+
* Portal / Server 访问 token。
|
|
726
|
+
* 写入图层 customParameters,确保首轮元数据请求就带 token,避免 499 后再重试。
|
|
727
|
+
*/
|
|
728
|
+
accessToken?: string;
|
|
729
|
+
};
|
|
730
|
+
|
|
731
|
+
/** 经纬度矩形范围(WGS84) */
|
|
732
|
+
export declare type LonLatExtent = {
|
|
733
|
+
xmin: number;
|
|
734
|
+
ymin: number;
|
|
735
|
+
xmax: number;
|
|
736
|
+
ymax: number;
|
|
737
|
+
};
|
|
738
|
+
|
|
739
|
+
export declare type MapBounds = {
|
|
740
|
+
jwXMin: number;
|
|
741
|
+
jwXMax: number;
|
|
742
|
+
jwYMin: number;
|
|
743
|
+
jwYMax: number;
|
|
744
|
+
};
|
|
745
|
+
|
|
746
|
+
export declare const MapLegend: DefineComponent<__VLS_Props_2, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_2> & Readonly<{}>, {
|
|
747
|
+
idPrefix: string;
|
|
748
|
+
position: LegendDockPosition;
|
|
749
|
+
offsetX: number;
|
|
750
|
+
offsetY: number;
|
|
751
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
752
|
+
legendContainerRef: HTMLDivElement;
|
|
753
|
+
}, HTMLElement>;
|
|
754
|
+
|
|
755
|
+
/** ArcgisMap 在 view 就绪后通过 ready 事件抛出的载荷 */
|
|
756
|
+
export declare interface MapReadyPayload {
|
|
757
|
+
map: default_2;
|
|
758
|
+
view: default_3;
|
|
759
|
+
sketchLayer: default_4;
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
export declare const MapScaleBar: DefineComponent<__VLS_Props_3, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_3> & Readonly<{}>, {
|
|
763
|
+
position: LegendDockPosition;
|
|
764
|
+
offsetX: number;
|
|
765
|
+
offsetY: number;
|
|
766
|
+
unit: ScaleBarUnit;
|
|
767
|
+
barStyle: ScaleBarStyle;
|
|
768
|
+
showNumericScale: boolean;
|
|
769
|
+
numericScaleUseGrouping: boolean;
|
|
770
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
771
|
+
rootRef: HTMLDivElement;
|
|
772
|
+
}, HTMLDivElement>;
|
|
773
|
+
|
|
774
|
+
export declare const MapToolbar: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
775
|
+
|
|
776
|
+
export declare const MapToolPanel: __VLS_WithTemplateSlots_2<typeof __VLS_component_2, __VLS_TemplateResult_2["slots"]>;
|
|
777
|
+
|
|
778
|
+
/**
|
|
779
|
+
* 将待创建图层真正加入地图并重排 z 序。
|
|
780
|
+
* 成功后从登记表移除;失败返回 null。
|
|
781
|
+
*/
|
|
782
|
+
export declare const materializePendingBusinessLayer: (map: default_2, layerId: string) => default_5 | null;
|
|
783
|
+
|
|
784
|
+
/** 合并注记所需 outFields(默认注记与手动标注共用) */
|
|
785
|
+
export declare const mergeOutFields: (layer: default_7, fields: string[]) => void;
|
|
786
|
+
|
|
787
|
+
/**
|
|
788
|
+
* 将 FeatureLayer 服务自带 labelingInfo 中的不可用字体改为 Web 安全字体,
|
|
789
|
+
* 避免 GET .../fonts/simsun-regular/*.pbf 404。
|
|
790
|
+
*/
|
|
791
|
+
export declare const normalizeFeatureLayerLabelFonts: (layer: default_7) => void;
|
|
792
|
+
|
|
793
|
+
/** 去空白并大写,便于 WKT 文本比较 */
|
|
794
|
+
export declare const normalizeWkt: (wkt: string) => string;
|
|
795
|
+
|
|
796
|
+
/** 数字比例尺格式化函数 */
|
|
797
|
+
declare type NumericScaleFormatter = (scale: number) => string;
|
|
798
|
+
|
|
799
|
+
/** 平移约束句柄:组件卸载时调用 remove() 释放 */
|
|
800
|
+
export declare type PanConstraintHandle = {
|
|
801
|
+
remove(): void;
|
|
802
|
+
/** 包装 view.goTo,程序化定位期间临时放开边界约束 */
|
|
803
|
+
wrapViewGoTo(view: default_3): void;
|
|
804
|
+
/** 长期暂停约束(如 TXT 画图面板打开) */
|
|
805
|
+
suspend(): void;
|
|
806
|
+
/** 恢复约束 */
|
|
807
|
+
resume(): void;
|
|
808
|
+
};
|
|
809
|
+
|
|
810
|
+
/** 待创建业务图层的创建参数(勾选显示时使用) */
|
|
811
|
+
export declare type PendingBusinessLayerCreateOptions = {
|
|
812
|
+
accessToken?: string;
|
|
813
|
+
labelConfigs?: BusinessLayerLabelConfig[];
|
|
814
|
+
expectedSpatialReferenceWkid?: number | null;
|
|
815
|
+
onSpatialReferenceMismatch?: (info: SpatialReferenceMismatchInfo) => void;
|
|
816
|
+
reverse?: boolean;
|
|
817
|
+
idPrefix?: string;
|
|
818
|
+
/** 完整配置(已上图 + 待创建),创建后用于重排 z 序 */
|
|
819
|
+
allConfigs: BusinessLayerConfig[];
|
|
820
|
+
};
|
|
821
|
+
|
|
822
|
+
/** 面板展示用的待创建项 */
|
|
823
|
+
export declare type PendingBusinessLayerItem = {
|
|
824
|
+
id: string;
|
|
825
|
+
title: string;
|
|
826
|
+
layerOrder: number;
|
|
827
|
+
config: BusinessLayerConfig;
|
|
828
|
+
};
|
|
829
|
+
|
|
830
|
+
declare const plugin: Plugin_2;
|
|
831
|
+
export default plugin;
|
|
832
|
+
|
|
833
|
+
/** 后端代签 token 登记选项(不含账号密码) */
|
|
834
|
+
export declare type PortalAccessTokenOptions = {
|
|
835
|
+
/** Portal 根地址,如 https://map.baigeli.cn */
|
|
836
|
+
portalUrl: string;
|
|
837
|
+
/** 已签发的 Portal access token */
|
|
838
|
+
token: string;
|
|
839
|
+
/** 额外登记的 server 根路径(图层 host 与 portal 不一致时传入) */
|
|
840
|
+
extraServers?: string[];
|
|
841
|
+
};
|
|
842
|
+
|
|
843
|
+
export declare type PortalAuthOptions = {
|
|
844
|
+
/** Portal 根地址,如 https://map.baigeli.cn */
|
|
845
|
+
portalUrl: string;
|
|
846
|
+
username: string;
|
|
847
|
+
password: string;
|
|
848
|
+
/**
|
|
849
|
+
* 可选 token 服务地址。开发环境可走 Vite 代理,例如:
|
|
850
|
+
* `/gis-portal/portal/sharing/rest/generateToken`
|
|
851
|
+
*/
|
|
852
|
+
tokenServiceUrl?: string;
|
|
853
|
+
/** token 有效分钟数,默认 120 */
|
|
854
|
+
expirationMinutes?: number;
|
|
855
|
+
/** 额外登记的 server 根路径(图层 host 与 portal 不一致时传入) */
|
|
856
|
+
extraServers?: string[];
|
|
857
|
+
/** generateToken 的 referer;默认 window.location.origin */
|
|
858
|
+
referer?: string;
|
|
859
|
+
};
|
|
860
|
+
|
|
861
|
+
/** 通过 fetchToken 回调续期的选项(生产推荐) */
|
|
862
|
+
export declare type PortalTokenFetcherRenewalOptions = {
|
|
863
|
+
portalUrl: string;
|
|
864
|
+
/** 首次与续期均调用;返回 null 表示跳过鉴权 */
|
|
865
|
+
fetchToken: () => Promise<PortalTokenFetchResult | string | null>;
|
|
866
|
+
/** fetch 未返回 expires 时的有效分钟数,默认 60 */
|
|
867
|
+
expirationMinutes?: number;
|
|
868
|
+
renewBeforeMinutes?: number;
|
|
869
|
+
extraServers?: string[];
|
|
870
|
+
onRenewError?: (error: unknown) => void;
|
|
871
|
+
};
|
|
872
|
+
|
|
873
|
+
/** 后端代签 fetch 返回值 */
|
|
874
|
+
export declare type PortalTokenFetchResult = {
|
|
875
|
+
token: string;
|
|
876
|
+
/** 过期时间戳(毫秒);有则按此调度续期 */
|
|
877
|
+
expires?: number;
|
|
878
|
+
};
|
|
879
|
+
|
|
880
|
+
/** startPortalTokenRenewal 的返回值 */
|
|
881
|
+
export declare type PortalTokenRenewalHandle = {
|
|
882
|
+
/** 当前已登记的 token */
|
|
883
|
+
token: string;
|
|
884
|
+
/** 停止后续续期定时器 */
|
|
885
|
+
stop: () => void;
|
|
886
|
+
};
|
|
887
|
+
|
|
888
|
+
/** 自动续期额外选项 */
|
|
889
|
+
export declare type PortalTokenRenewalOptions = PortalAuthOptions & {
|
|
890
|
+
/**
|
|
891
|
+
* 过期前多少分钟刷新;默认取 expirationMinutes 的 1/6(至少 5 分钟,且不超过一半)。
|
|
892
|
+
* 例:120 分钟有效 → 默认约提前 20 分钟续期。
|
|
893
|
+
*/
|
|
894
|
+
renewBeforeMinutes?: number;
|
|
895
|
+
/**
|
|
896
|
+
* 续期失败回调(定时刷新失败时);首次注册失败仍会抛错。
|
|
897
|
+
* 连续失败时库内会节流:首次立即回调,之后同一失败串最多约每 15 分钟回调一次。
|
|
898
|
+
*/
|
|
899
|
+
onRenewError?: (error: unknown) => void;
|
|
900
|
+
};
|
|
901
|
+
|
|
902
|
+
/**
|
|
903
|
+
* 向后代提供底图密钥(通常由业务页或 ArcgisMap 调用)。
|
|
904
|
+
* 传入已解析的 keys(ComputedRef 或普通对象均可)。
|
|
905
|
+
*/
|
|
906
|
+
export declare const provideBasemapKeys: (keys: MaybeRef<BasemapKeys>) => void;
|
|
907
|
+
|
|
908
|
+
/**
|
|
909
|
+
* 登记后端代签的 Portal token(不调用 generateToken)。
|
|
910
|
+
*/
|
|
911
|
+
export declare const registerPortalAccessToken: (options: PortalAccessTokenOptions) => string;
|
|
912
|
+
|
|
913
|
+
/**
|
|
914
|
+
* 向 IdentityManager 注册 Portal token,并挂请求拦截器保证首轮带 token。
|
|
915
|
+
* 注意:前端持有账号密码仅适合内网联调;生产应由后端签发 token。
|
|
916
|
+
*/
|
|
917
|
+
export declare const registerPortalToken: (options: PortalAuthOptions) => Promise<string>;
|
|
918
|
+
|
|
919
|
+
/**
|
|
920
|
+
* 按完整配置重排地图上已存在的业务图层 z 序。
|
|
921
|
+
* 分批 addMany 后调用,可恢复 layerOrder 决定的叠放次序;
|
|
922
|
+
* 仅在业务图层原有槽位间调整,不影响绘图层等其它图层。
|
|
923
|
+
*/
|
|
924
|
+
export declare const reorderBusinessLayers: (options: ReorderBusinessLayersOptions) => void;
|
|
925
|
+
|
|
926
|
+
/** 按完整配置重排业务图层 z 序的入参 */
|
|
927
|
+
export declare type ReorderBusinessLayersOptions = Pick<LoadBusinessLayersOptions, 'map' | 'layers' | 'reverse' | 'idPrefix'>;
|
|
928
|
+
|
|
929
|
+
/**
|
|
930
|
+
* 将系统参数 systemCoordinate 解析为期望坐标系。
|
|
931
|
+
* 8848 → CGCS2000_Albers WKT;其他有限数字 → WKID。
|
|
932
|
+
*/
|
|
933
|
+
export declare const resolveExpectedSpatialReference: (systemCoordinate: number | string | null | undefined) => ExpectedSpatialReference | null;
|
|
934
|
+
|
|
935
|
+
/** 解析最终 Arcade 表达式 */
|
|
936
|
+
export declare const resolveLabelExpression: (config: BusinessLayerLabelConfig) => string;
|
|
937
|
+
|
|
938
|
+
/**
|
|
939
|
+
* 解析后台 layerVisible:未配置默认可见;
|
|
940
|
+
* true/1/'1'/'true' 为可见,false/0/'0'/'false' 等为隐藏。
|
|
941
|
+
*/
|
|
942
|
+
export declare const resolveLayerVisible: (value: unknown) => boolean;
|
|
943
|
+
|
|
944
|
+
/** 恢复指定视图的平移边界约束 */
|
|
945
|
+
export declare function resumePanBounds(view: default_3): void;
|
|
946
|
+
|
|
947
|
+
/**
|
|
948
|
+
* 包装 view.goTo:忽略打断类拒绝,其它错误继续抛出。
|
|
949
|
+
*/
|
|
950
|
+
export declare const safeViewGoTo: (view: default_3, target: Parameters<default_3["goTo"]>[0], options?: Parameters<default_3["goTo"]>[1]) => Promise<void>;
|
|
951
|
+
|
|
952
|
+
/** 比例尺样式 */
|
|
953
|
+
declare type ScaleBarStyle = 'line' | 'ruler';
|
|
954
|
+
|
|
955
|
+
/** 比例尺单位 */
|
|
956
|
+
declare type ScaleBarUnit = 'metric' | 'imperial' | 'dual';
|
|
957
|
+
|
|
958
|
+
/**
|
|
959
|
+
* 登记尚未上图的业务图层(默认隐藏)。
|
|
960
|
+
* 不 map.add,因此不会触发服务元数据请求;用户勾选时再 materialize。
|
|
961
|
+
*/
|
|
962
|
+
export declare const setPendingBusinessLayers: (layers: BusinessLayerConfig[], options: PendingBusinessLayerCreateOptions) => void;
|
|
963
|
+
|
|
964
|
+
/** 是否应按 MapImageLayer 加载(整幅 MapServer) */
|
|
965
|
+
export declare const shouldUseMapImageLayer: (item: BusinessLayerConfig) => boolean;
|
|
966
|
+
|
|
967
|
+
export declare const SpatialAnalysisPanel: DefineComponent<__VLS_Props_5, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_5> & Readonly<{}>, {
|
|
968
|
+
systemCoordinateWkid: number | null;
|
|
969
|
+
mapBounds: MapBounds | null;
|
|
970
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
971
|
+
fileInputRef: HTMLInputElement;
|
|
972
|
+
tabsScrollRef: HTMLDivElement;
|
|
973
|
+
tableWrapRef: HTMLDivElement;
|
|
974
|
+
wordRef: HTMLDivElement;
|
|
975
|
+
}, HTMLDivElement>;
|
|
976
|
+
|
|
977
|
+
/** 业务图层坐标系校验结果原因 */
|
|
978
|
+
export declare type SpatialReferenceCheckReason = 'mismatch' | 'unreadable';
|
|
979
|
+
|
|
980
|
+
export declare type SpatialReferenceCheckStatus = 'match' | 'mismatch' | 'unreadable';
|
|
981
|
+
|
|
982
|
+
/** 可参与比对的坐标系描述(图层 spatialReference 或期望值) */
|
|
983
|
+
export declare type SpatialReferenceLike = {
|
|
984
|
+
wkid?: number | null;
|
|
985
|
+
latestWkid?: number | null;
|
|
986
|
+
wkt?: string | null;
|
|
987
|
+
};
|
|
988
|
+
|
|
989
|
+
/** 业务图层坐标系与系统期望不一致/无法读取时的回调信息 */
|
|
990
|
+
export declare type SpatialReferenceMismatchInfo = {
|
|
991
|
+
layerId: string;
|
|
992
|
+
layerTitle: string;
|
|
993
|
+
layerUrl: string;
|
|
994
|
+
/**
|
|
995
|
+
* 系统参数原始码(含业务哨兵 8848)。
|
|
996
|
+
* Albers 场景下不是标准 EPSG WKID。
|
|
997
|
+
*/
|
|
998
|
+
expectedWkid: number;
|
|
999
|
+
/** 图层可读到的 wkid/latestWkid;仅有 WKT 时为 null */
|
|
1000
|
+
actualWkid: number | null;
|
|
1001
|
+
/** mismatch=确认不一致;unreadable=无法可靠读取/比对 */
|
|
1002
|
+
reason: SpatialReferenceCheckReason;
|
|
1003
|
+
/** 期望坐标系展示名 */
|
|
1004
|
+
expectedLabel: string;
|
|
1005
|
+
/** 实际坐标系展示名 */
|
|
1006
|
+
actualLabel: string;
|
|
1007
|
+
};
|
|
1008
|
+
|
|
1009
|
+
/**
|
|
1010
|
+
* 注册 Portal token,并在过期前自动续期(覆盖 IdentityManager 登记)。
|
|
1011
|
+
* 页面卸载或不再需要时务必调用返回的 stop()。
|
|
1012
|
+
* 注意:前端持有账号密码仅适合内网联调;生产应由后端签发 token。
|
|
1013
|
+
*/
|
|
1014
|
+
export declare const startPortalTokenRenewal: (options: PortalTokenRenewalOptions) => Promise<PortalTokenRenewalHandle>;
|
|
1015
|
+
|
|
1016
|
+
/**
|
|
1017
|
+
* 通过 fetchToken 登记 Portal token 并自动续期(后端代签场景)。
|
|
1018
|
+
* fetchToken 应调用业务后端 /portalToken,不再持有 Portal 账号密码。
|
|
1019
|
+
*/
|
|
1020
|
+
export declare const startPortalTokenRenewalWithFetcher: (options: PortalTokenFetcherRenewalOptions) => Promise<PortalTokenRenewalHandle>;
|
|
1021
|
+
|
|
1022
|
+
/** 订阅待创建列表变化(返回取消订阅) */
|
|
1023
|
+
export declare const subscribePendingBusinessLayers: (listener: () => void) => (() => void);
|
|
1024
|
+
|
|
1025
|
+
/** 订阅不一致登记变化(返回取消订阅函数) */
|
|
1026
|
+
export declare const subscribeSpatialReferenceMismatches: (listener: () => void) => (() => void);
|
|
1027
|
+
|
|
1028
|
+
/** 暂停指定视图的平移边界约束 */
|
|
1029
|
+
export declare function suspendPanBounds(view: default_3): void;
|
|
1030
|
+
|
|
1031
|
+
export declare const SwipeCompare: DefineComponent<ExtractPropTypes< {
|
|
1032
|
+
/** MapView 实例 */
|
|
1033
|
+
view: {
|
|
1034
|
+
type: PropType<default_3>;
|
|
1035
|
+
required: true;
|
|
1036
|
+
};
|
|
1037
|
+
/** 底图密钥;未传时尝试 inject(BASEMAP_KEYS_KEY) */
|
|
1038
|
+
keys: {
|
|
1039
|
+
type: PropType<BasemapKeys | null>;
|
|
1040
|
+
default: null;
|
|
1041
|
+
};
|
|
1042
|
+
}>, {
|
|
1043
|
+
destroySwipe: () => void;
|
|
1044
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
|
|
1045
|
+
/** MapView 实例 */
|
|
1046
|
+
view: {
|
|
1047
|
+
type: PropType<default_3>;
|
|
1048
|
+
required: true;
|
|
1049
|
+
};
|
|
1050
|
+
/** 底图密钥;未传时尝试 inject(BASEMAP_KEYS_KEY) */
|
|
1051
|
+
keys: {
|
|
1052
|
+
type: PropType<BasemapKeys | null>;
|
|
1053
|
+
default: null;
|
|
1054
|
+
};
|
|
1055
|
+
}>> & Readonly<{}>, {
|
|
1056
|
+
keys: BasemapKeys | null;
|
|
1057
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {
|
|
1058
|
+
swipeSelectRef: HTMLDivElement;
|
|
1059
|
+
}, HTMLDivElement>;
|
|
1060
|
+
|
|
1061
|
+
/**
|
|
1062
|
+
* 底图卷帘与业务图层卷帘互斥注册表。
|
|
1063
|
+
* 两侧在挂载时登记 destroy,应用卷帘前拆除另一侧。
|
|
1064
|
+
*/
|
|
1065
|
+
declare type SwipeKind = 'basemap' | 'layer';
|
|
1066
|
+
|
|
1067
|
+
/** 业务约定:8848 → CGCS2000_Albers */
|
|
1068
|
+
export declare const SYSTEM_COORDINATE_ALBERS_CODE = 8848;
|
|
1069
|
+
|
|
1070
|
+
/** 生成业务图层 id,带前缀避免冲突 */
|
|
1071
|
+
export declare const toBusinessLayerId: (item: BusinessLayerConfig, idPrefix?: string) => string;
|
|
1072
|
+
|
|
1073
|
+
/** @deprecated 请用 toLayerProps;保留兼容旧调用 */
|
|
1074
|
+
export declare const toFeatureLayerProps: (item: BusinessLayerConfig) => __esri.FeatureLayerProperties;
|
|
1075
|
+
|
|
1076
|
+
/** 将后台配置转为图层基础构造参数 */
|
|
1077
|
+
export declare const toLayerProps: (item: BusinessLayerConfig, options?: Pick<LoadBusinessLayersOptions, "idPrefix" | "outFields" | "accessToken">) => LayerProps;
|
|
1078
|
+
|
|
1079
|
+
/** 工具栏内置工具 id(不含坐标条,坐标条由 showCoordinate 控制) */
|
|
1080
|
+
export declare type ToolbarToolId = 'fullExtent' | 'fullscreen' | 'zoomIn' | 'zoomOut' | 'prevExtent' | 'nextExtent' | 'coordinateLocate' | 'distanceMeasure' | 'areaMeasure' | 'layerManage' | 'layerSwipe' | 'mapLabel' | 'conditionQuery' | 'txtDraw';
|
|
1081
|
+
|
|
1082
|
+
/**
|
|
1083
|
+
* 解析底图密钥:显式 props.keys 优先,否则取 inject,再否则空对象。
|
|
1084
|
+
* propsKeys 请传 getter / toRef,例如 useBasemapKeys(() => props.keys)
|
|
1085
|
+
*/
|
|
1086
|
+
export declare const useBasemapKeys: (propsKeys?: MaybeRefOrGetter<BasemapKeys | null | undefined>) => ComputedRef<BasemapKeys>;
|
|
1087
|
+
|
|
1088
|
+
/** 地图 Web 标注可用字体(Esri CDN 托管字形) */
|
|
1089
|
+
export declare const WEB_SAFE_LABEL_FONT = "Arial Unicode MS";
|
|
1090
|
+
|
|
1091
|
+
export { }
|