webgl-network-view 0.1.3 → 0.1.4

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/index.d.ts CHANGED
@@ -245,10 +245,10 @@ export interface GisViewLineStyle {
245
245
  /** 折线拐角与端点样式,round 会用圆点补齐接头 */
246
246
  join?: 'round' | 'butt'
247
247
  shadow?: GisViewShadow
248
- /** 线型:solid(默认)/ dashed / dotted / dashdot,也可以直接给自定义图案,见 GisViewLineDash */
249
- dash?: GisViewLineDash
250
- /** 线型预设的别名写法,等价于 dash(两者都写时以 dash 为准) */
251
- lineType?: GisViewLineType
248
+ /** 线型预设:solid(默认)/ dashed / dotted / dashdot */
249
+ lineType?: GisViewLineType
250
+ /** 自定义虚线图案;与 lineType 同层同时写时以 dash 为准 */
251
+ dash?: GisViewLineDash
252
252
  /** 虚线图案的相位偏移(CSS 像素,可以为负):图案相对折线起点整体前后挪一段 */
253
253
  dashOffset?: number
254
254
  /**
@@ -259,22 +259,11 @@ export interface GisViewLineStyle {
259
259
  zIndex?: number
260
260
  }
261
261
 
262
- /**
263
- * 线型预设:solid 实线、dashed 虚线、dotted 点线、dashdot 点划线。
264
- * 别名:none / line 等价 solid,dash 等价 dashed,dot 等价 dotted,dash-dot / dash-dot-dot 等价 dashdot。
265
- * 认不出来的字符串按实线画(不会把线画没)。
266
- */
267
- export type GisViewLineType =
268
- | 'solid'
269
- | 'dashed'
270
- | 'dotted'
271
- | 'dashdot'
272
- | 'none'
273
- | 'line'
274
- | 'dash'
275
- | 'dot'
276
- | 'dash-dot'
277
- | 'dash-dot-dot'
262
+ /**
263
+ * 线型预设:solid 实线、dashed 虚线、dotted 点线、dashdot 点划线。
264
+ * 认不出来的字符串按实线画(不会把线画没)。
265
+ */
266
+ export type GisViewLineType = 'solid' | 'dashed' | 'dotted' | 'dashdot'
278
267
 
279
268
  /**
280
269
  * 自定义虚线图案(CSS 像素):[实线, 空档] 或 [实线, 空档, 第二段实线, 第二段空档];
@@ -282,28 +271,8 @@ export type GisViewLineType =
282
271
  */
283
272
  export type GisViewLineDashValues = [number, number] | [number, number, number, number] | number[]
284
273
 
285
- /** 虚线的对象写法:图案与相位偏移写在一起 */
286
- export interface GisViewLineDashObject {
287
- /** 图案:预设名或自定义数组 */
288
- dash?: GisViewLineType | GisViewLineDashValues
289
- /** 等价于 dash */
290
- type?: GisViewLineType
291
- /** 等价于 dash */
292
- lineType?: GisViewLineType
293
- /** 实线长(等价于数组第一项) */
294
- on?: number
295
- /** 空档长(等价于数组第二项) */
296
- off?: number
297
- /** 第二段实线长(点划线) */
298
- on2?: number
299
- /** 第二段空档长 */
300
- off2?: number
301
- /** 相位偏移(CSS 像素) */
302
- offset?: number
303
- }
304
-
305
- /** 线型:预设名字符串、自定义图案数组,或 { dash, offset } 对象 */
306
- export type GisViewLineDash = GisViewLineType | GisViewLineDashValues | GisViewLineDashObject
274
+ /** 自定义线型图案;预设名请写 lineType,相位请写 dashOffset */
275
+ export type GisViewLineDash = GisViewLineDashValues
307
276
 
308
277
  /** 悬停目标的分类,与光标配置一一对应 */
309
278
  export type GisViewCursorTarget = 'point' | 'line' | 'channel' | 'waypoint'
@@ -1340,7 +1309,7 @@ export interface GisViewPoint {
1340
1309
  id?: string | number
1341
1310
  x: number
1342
1311
  y: number
1343
- /** 业务字段,也是 options.label / labels 未写 field / content 时的默认文本来源 */
1312
+ /** 业务字段,也是 options.labels.point / labels 未写 field / content 时的默认文本来源 */
1344
1313
  label?: string
1345
1314
  name?: string
1346
1315
  color?: string
@@ -1357,7 +1326,7 @@ export interface GisViewPoint {
1357
1326
  decorations?: GisViewPointDecoration[]
1358
1327
  /**
1359
1328
  * 这个点上的标签清单(可以写多条,同一个点上显示多个标签):数组里每一条就是一份
1360
- * 逐条标签写法(见 GisViewItemLabel),与 options.label 里同 id 的那一条合并,
1329
+ * 逐条标签写法(见 GisViewItemLabel),与 options.labels.point 里同 id 的那一条合并,
1361
1330
  * 不带 id 的按位置对上配置里的第几条,多出来的那几条自动成为新标签。
1362
1331
  * exportData 导出的 labels 列就是这一份,喂回来即回显(位置 / 样式 / 偏移都在里面)
1363
1332
  */
@@ -1406,7 +1375,7 @@ export interface GisViewLine {
1406
1375
  from?: string | number
1407
1376
  /** 终点绑定的点 id,拖拽该点时线的一端跟随移动 */
1408
1377
  to?: string | number
1409
- /** 业务字段,也是 options.lineLabel / labels 未写 field / content 时的默认文本来源 */
1378
+ /** 业务字段,也是 options.labels.line / labels 未写 field / content 时的默认文本来源 */
1410
1379
  label?: string
1411
1380
  name?: string
1412
1381
  color?: string
@@ -1414,10 +1383,10 @@ export interface GisViewLine {
1414
1383
  opacity?: number
1415
1384
  join?: 'round' | 'butt'
1416
1385
  shadow?: GisViewShadow
1417
- /** 线型:solid(默认)/ dashed / dotted / dashdot,也可以直接给自定义图案,见 GisViewLineDash */
1418
- lineType?: GisViewLineType
1419
- /** 等价于 lineType 的另一种写法(数组或 { dash, offset } 对象) */
1420
- dash?: GisViewLineDash
1386
+ /** 线型预设:solid(默认)/ dashed / dotted / dashdot */
1387
+ lineType?: GisViewLineType
1388
+ /** 自定义虚线图案;与 lineType 同层同时写时以 dash 为准 */
1389
+ dash?: GisViewLineDash
1421
1390
  /** 虚线图案的相位偏移(CSS 像素,可以为负) */
1422
1391
  dashOffset?: number
1423
1392
  /** 绘制层级:越大越靠上,同一个值算一层;缺省 0。规则与 lineStyle 里的 zIndex 会被它覆盖 */
@@ -1606,18 +1575,24 @@ export type GisViewChannelOffsetMode = 'tangent' | 'inset'
1606
1575
  * 通道分组声明:一个通道默认一组,拆分 / 合并之后按它记录每一组有哪些回线、各自的拐点。
1607
1576
  * 分组只影响成员与拐点,两端节点、宽度等配置仍然由通道统管。
1608
1577
  */
1609
- export interface GisViewChannelGroup {
1610
- /** 分组 id:缺省时第一组用通道 id,第 n 组用 `${通道 id}::${n}`(n 从 2 起) */
1611
- id?: string | number
1612
- /** 这一组是否显示,缺省 true;隐藏后成员、骨架与拐点都保留,改回 true 原样恢复 */
1613
- visible?: boolean
1614
- /** 这一组的线路 id,至少一条;同一条线只能出现在一组里,没列出来的并回第一组 */
1615
- lineIds: Array<string | number>
1616
- /** 这一组自己的骨架拐点(两端锚定时只写中间拐点):新拆分出来的分组不带拐点,就是一条直线 */
1617
- path?: GisViewCoordinate[]
1578
+ export interface GisViewChannelGroup {
1579
+ /** 分组 id:缺省时第一组用通道 id,第 n 组用 `${通道 id}::${n}`(n 从 2 起) */
1580
+ id?: string | number
1581
+ /** 分组名:分组标签缺省取它;不写时依次回落到 label / id,模板或 field 取不到分组字段时再回落到通道 */
1582
+ name?: string
1583
+ /** 分组名的备用字段:默认文本在 name 之后、id 之前取它 */
1584
+ label?: string
1585
+ /** 这一组是否显示,缺省 true;隐藏后成员、骨架与拐点都保留,改回 true 原样恢复 */
1586
+ visible?: boolean
1587
+ /** 这一组的线路 id,至少一条;同一条线只能出现在一组里,没列出来的并回第一组 */
1588
+ lineIds: Array<string | number>
1589
+ /** 这一组自己的标签:单个对象或数组,字段同 options.labels.group;与全局定义按 id 合并,不同 id 追加 */
1590
+ labels?: GisViewGroupLabelOptions | GisViewGroupLabelContent | Array<GisViewGroupLabelOptions | GisViewGroupLabelContent>
1591
+ /** 这一组自己的骨架拐点(两端锚定时只写中间拐点):新拆分出来的分组不带拐点,就是一条直线 */
1592
+ path?: GisViewCoordinate[]
1618
1593
  /**
1619
1594
  * 刚性拐点偏移:键是分组骨架顶点序号(含首尾端点,从 0 起,只认中间拐点),值是这一组所有成员回线在该顶点的世界坐标增量。
1620
- * `channelWaypointDragMode: 'vertex'` 拖出来的结果写在这里;不写或空对象就是普通平行骨架
1595
+ * `options.channel.waypointDragMode: 'vertex'` 拖出来的结果写在这里;不写或空对象就是普通平行骨架
1621
1596
  */
1622
1597
  waypointOffsets?: Record<string, GisViewCoordinate>
1623
1598
  }
@@ -1628,11 +1603,15 @@ export interface GisViewChannelGroup {
1628
1603
  * 通道声明只保存线路 id(`lineIds` / `groups[].lineIds`),真正的线路对象统一在顶层 `lines`;
1629
1604
  * 组件不会读取或写入 `channel.lineData` —— 新增接口第二段的同名 `lineData` 只是入参。
1630
1605
  */
1631
- export interface GisViewChannel {
1632
- /** 通道标识:同 id 的通道在数据刷新之间保留已编辑过的骨架 */
1633
- id?: string | number
1634
- /** 通道名:仅作业务标识,组件不渲染 */
1635
- name?: string
1606
+ export interface GisViewChannel {
1607
+ /** 通道标识:同 id 的通道在数据刷新之间保留已编辑过的骨架 */
1608
+ id?: string | number
1609
+ /** 通道名:通道标签缺省取它;不写时依次回落到 label / id */
1610
+ name?: string
1611
+ /** 通道名的备用字段:默认文本在 name 之后、id 之前取它 */
1612
+ label?: string
1613
+ /** 通道自己的标签:单个对象或数组,字段同 options.labels.channel;多分组时按屏幕走廊每簇标一次 */
1614
+ labels?: GisViewChannelLabelOptions | GisViewChannelLabelContent | Array<GisViewChannelLabelOptions | GisViewChannelLabelContent>
1636
1615
  /**
1637
1616
  * 是否显示这条通道:false 时整条通道与成员回线一起隐藏,数据、分组、拐点与编辑状态都保留,
1638
1617
  * 改回 true(或 `showFeatures('channel', ref)`)立即恢复;缺省 true。
@@ -1664,13 +1643,13 @@ export interface GisViewChannel {
1664
1643
  /** 终点绑定的节点 id,语义与 from 相同 */
1665
1644
  to?: string | number
1666
1645
  /**
1667
- * 通道宽度(世界单位):tangent 模式下是最外侧两条回线中心的间距,缺省用 options.channelWidth。
1646
+ * 通道宽度(世界单位):tangent 模式下是最外侧两条回线中心的间距,缺省用 options.channel.width。
1668
1647
  * 只在 nodeWidth 为 0(或两端没绑节点)时生效,否则宽度按两端节点尺寸算
1669
1648
  */
1670
1649
  width?: number
1671
1650
  /**
1672
1651
  * 通道宽度按两端节点尺寸取的倍数:1 表示回线正好铺满节点(默认,节点放大回线跟着放大),
1673
- * 0 表示退回 width / options.channelWidth 的世界单位写法
1652
+ * 0 表示退回 width / options.channel.width 的世界单位写法
1674
1653
  */
1675
1654
  nodeWidth?: number
1676
1655
  /**
@@ -1682,7 +1661,7 @@ export interface GisViewChannel {
1682
1661
  /** 偏移方式,缺省为 tangent */
1683
1662
  offsetMode?: GisViewChannelOffsetMode
1684
1663
  /**
1685
- * inset 模式下从切点向内收的比例(占通道宽度,最大 0.42),缺省用 options.channelInset;
1664
+ * inset 模式下从切点向内收的比例(占通道宽度,最大 0.42),缺省用 options.channel.inset;
1686
1665
  * 负数外收:把最外侧回线往切点外撑,最多把可用区间撑到两倍宽
1687
1666
  */
1688
1667
  inset?: number
@@ -1999,7 +1978,7 @@ export type GisViewChannelExistingMode = 'block' | 'newGroup' | 'joinGroup' | 'a
1999
1978
 
2000
1979
  /**
2001
1980
  * 新增方案:newChannel 新建一条通道,newGroup 在原通道里加一组(不带拐点),
2002
- * joinGroup 把新回线并进原通道的某一组;上限(channelMaxGroups / channelGroupMaxLines)到了就不 enabled;
1981
+ * joinGroup 把新回线并进原通道的某一组;上限(options.channel.maxGroups / groupMaxLines)到了就不 enabled;
2003
1982
  * 一次要加几回由 count 决定(草稿的 circuits),余量(组数 / 每组回数)也按它算
2004
1983
  */
2005
1984
  export interface GisViewChannelAddOption {
@@ -2190,7 +2169,7 @@ export interface GisViewChannelDraftOptions {
2190
2169
  routing?: 'straight' | 'orthogonal'
2191
2170
  /** 中间拐点(不含两端):给了就按它折线;routing 的自动拐点只在没给有效拐点时补 */
2192
2171
  path?: GisViewCoordinate[]
2193
- /** 本次草稿的预览样式:盖在全局 channelDraftStyle 之上,草稿结束即丢弃 */
2172
+ /** 本次草稿的预览样式:盖在全局 options.channel.draftStyle 之上,草稿结束即丢弃 */
2194
2173
  channelDraftStyle?: GisViewChannelDraftStyle
2195
2174
  /**
2196
2175
  * 交接模式:两个节点选完、发完 phase: 'ready' 就把草稿收掉(假通道当场消失、不补 cancel),
@@ -4005,14 +3984,10 @@ export interface GisViewCopyItem {
4005
3984
  item: GisViewPoint
4006
3985
  }
4007
3986
 
4008
- /** 剪贴板里的节点快照:单节点兼容字段 index / item / coordinate 指向第一个来源,整组看 sources / items */
4009
- export interface GisViewClipboardItem {
4010
- /** 复制时的第一个来源下标(来源不在数据里时为 -1) */
4011
- index: number
4012
- item: GisViewPoint
4013
- coordinate: [number, number]
4014
- /** 这一次收进剪贴板的节点数 */
4015
- count: number
3987
+ /** 剪贴板里的节点快照:来源、内部线路 / 通道与粘贴锚点;单个来源也在 sources / items 里 */
3988
+ export interface GisViewClipboardItem {
3989
+ /** 这一次收进剪贴板的节点数 */
3990
+ count: number
4016
3991
  sources: GisViewCopySource[]
4017
3992
  items: GisViewPoint[]
4018
3993
  /** 选中线路 / 通道时为了独立复制而补进快照的端点 */
@@ -4623,9 +4598,11 @@ export interface GisViewLabelStats {
4623
4598
  rendered: number
4624
4599
  /** class / dataset / 内容 / 内联样式 / transform / 挂载等实际写入次数 */
4625
4600
  domWrites: number
4626
- point: GisViewLabelKindStats
4627
- line: GisViewLabelKindStats
4628
- drag: GisViewLabelDragStats
4601
+ point: GisViewLabelKindStats
4602
+ line: GisViewLabelKindStats
4603
+ group: GisViewLabelKindStats
4604
+ channel: GisViewLabelKindStats
4605
+ drag: GisViewLabelDragStats
4629
4606
  resize: GisViewLabelResizeStats
4630
4607
  }
4631
4608
 
@@ -4758,11 +4735,15 @@ export interface GisViewDenseState {
4758
4735
  lineThreshold: number
4759
4736
  /** 当前自动启用的优化项;qualityAuto 为 true 表示 extreme 正在代管画质档 */
4760
4737
  strategy: {
4761
- /** 节点标签当前是否走避让 / 截断优化档(显式 labelOptimize 或密集档) */
4762
- labelOptimize: boolean
4763
- /** 线路标签当前是否走避让 / 截断优化档(显式 lineLabelOptimize、继承 labelOptimize 或密集档) */
4764
- lineLabelOptimize: boolean
4765
- effectsPaused: boolean
4738
+ /** 节点标签当前是否走避让 / 截断优化档(显式 options.labels.optimize 或密集档) */
4739
+ labelOptimize: boolean
4740
+ /** 线路标签当前是否走避让 / 截断优化档(显式 options.labels.lineOptimize、继承 options.labels.optimize 或密集档) */
4741
+ lineLabelOptimize: boolean
4742
+ /** 分组标签当前是否走避让 / 截断优化档(与线路标签同一套开关) */
4743
+ groupLabelOptimize: boolean
4744
+ /** 通道标签当前是否走避让 / 截断优化档(与线路标签同一套开关) */
4745
+ channelLabelOptimize: boolean
4746
+ effectsPaused: boolean
4766
4747
  qualityAuto: boolean
4767
4748
  }
4768
4749
  }
@@ -5055,7 +5036,7 @@ export type GisViewLabelContent = string | ((payload: GisViewLabelPayload) => st
5055
5036
 
5056
5037
  /**
5057
5038
  * 逐条标签的写法(数据里的 `labels`,单个对象或数组;exportData 的 labels 列也是它):
5058
- * 字段与 options.label / options.lineLabel 里的一条完全一致,另外认 id / hidden / added。
5039
+ * 字段与 options.labels.point / options.labels.line 里的一条完全一致,另外认 id / hidden / added。
5059
5040
  * 不带 id 的按在数组里的位置对上配置里的第几条(第一条就是 default,之后是 label2 / label3…),
5060
5041
  * 对不上的就是这一条要素自己多出来的标签 —— 所以 labels 可以只写给用户动过的那几条,
5061
5042
  * 也能整份把导出结果喂回来。
@@ -5063,8 +5044,8 @@ export type GisViewLabelContent = string | ((payload: GisViewLabelPayload) => st
5063
5044
  export interface GisViewItemLabel {
5064
5045
  /** 这一条标签的 id:与外层配置里的同 id 条目合并,对不上就是这条要素自己多出来的一条(不同 id 共存) */
5065
5046
  id?: string
5066
- /** 文本来源:字符串按模板解析、函数按 payload 算,覆盖配置里的 content;false 表示这一条不画 */
5067
- content?: GisViewLabelContent | GisViewLineLabelContent | false
5047
+ /** 文本来源:字符串按模板解析、函数按 payload 算,覆盖配置里的 content;false 表示这一条不画 */
5048
+ content?: GisViewLabelContent | GisViewLineLabelContent | GisViewGroupLabelContent | GisViewChannelLabelContent | false
5068
5049
  /** 字符串内容是否按 HTML 渲染 */
5069
5050
  html?: boolean
5070
5051
  /** 取哪个字段作为文本,缺省按 label / name 取 */
@@ -5087,8 +5068,8 @@ export interface GisViewItemLabel {
5087
5068
  * 0.5 表示地图放大 4 倍时字号放大 2 倍。基数是标签样式里的 fontSize(缺省 12px)。
5088
5069
  */
5089
5070
  zoomScale?: number
5090
- /** 线路标签是否与线路方向平行(点的标签忽略这一项) */
5091
- parallel?: boolean
5071
+ /** 沿线标签是否与线路 / 骨架方向平行(点标签忽略这一项) */
5072
+ parallel?: boolean
5092
5073
  /** 避让优先级:数值越大越先占位,默认 0;只影响同一显隐档位内的先后 */
5093
5074
  priority?: number
5094
5075
  /** 避让时检查哪些对象:labels 两类标签都查(默认)/ pointLabels 只查点标签 / lineLabels 只查线标签 / nodes 只查节点 / both 标签与节点都查,也可写 { labels, nodes } */
@@ -5100,16 +5081,16 @@ export interface GisViewItemLabel {
5100
5081
  avoidOverlap?: boolean
5101
5082
  /**
5102
5083
  * 这一条撞上别的标签之后怎么避让:`shift`(默认)主动换锚点 / 沿线挪,`hide` 直接不显示。
5103
- * 只在所属类别处于优化档(节点看 `labelOptimize`、线路看 `lineLabelOptimize`,后者未写时继承前者)且这条的 `avoidOverlap` 不为 false 时生效;只和底图区域文字重叠时仍按软冲突照画。
5084
+ * 只在所属类别处于优化档(节点看 `options.labels.optimize`、线路看 `options.labels.lineOptimize`,后者未写时继承前者)且这条的 `avoidOverlap` 不为 false 时生效;只和底图区域文字重叠时仍按软冲突照画。
5104
5085
  */
5105
5086
  overlapMode?: GisViewLabelOverlapMode
5106
5087
  /** 显隐策略:auto 智能隐藏 / always 一直显示 / hidden 不显示 */
5107
5088
  visibility?: GisViewLabelVisibility
5108
5089
  /** 整条不画(等于 visibility: 'hidden');false 表示撤回隐藏覆盖 */
5109
5090
  hidden?: boolean
5110
- /** 这一条标签能不能拖:逐条覆盖 options.label / lineLabel 里的同名开关 */
5091
+ /** 这一条标签能不能拖:逐条覆盖 options.labels.point / options.labels.line 里的同名开关 */
5111
5092
  draggable?: boolean
5112
- /** 这一条标签能不能点选:逐条覆盖 options.label / lineLabel 里的同名开关 */
5093
+ /** 这一条标签能不能点选:逐条覆盖 options.labels.point / options.labels.line 里的同名开关 */
5113
5094
  editable?: boolean
5114
5095
  /** 这条标签是运行时加的(addLabel),导出时带上它便于整份回显 */
5115
5096
  added?: boolean
@@ -5117,7 +5098,7 @@ export interface GisViewItemLabel {
5117
5098
  }
5118
5099
 
5119
5100
  export interface GisViewLabelOptions {
5120
- /** 配置了 label 就默认渲染,显式 false 关闭 */
5101
+ /** 配置了 options.labels.point 就默认渲染,显式 false 关闭 */
5121
5102
  enabled?: boolean
5122
5103
  /** 这一条标签的 id:数据里的 labels 按它对上号(同 id 合并覆盖、不同 id 追加共存),updateLabel / removeLabel 用它点名改哪一条 */
5123
5104
  id?: string
@@ -5241,7 +5222,7 @@ export interface GisViewLineLabelPayload {
5241
5222
  export type GisViewLineLabelContent = string | ((payload: GisViewLineLabelPayload) => string | HTMLElement | number | null | undefined)
5242
5223
 
5243
5224
  /**
5244
- * 点 / 线两类标签的公共默认层(options.labelDefaults)。
5225
+ * 点 / 线两类标签的公共默认层(options.labels.defaults)。
5245
5226
  * 分类里的同名字段覆盖这里;style 是一层合并,所以公共字号 / 字重可以保留,同时让点、线各自覆盖颜色。
5246
5227
  * 只收两类都讲得通的键:position / gap / anchor / when / parallel / followOnInteract / id / enabled
5247
5228
  * 属于某一类的专属配置,要写回 label / lineLabel,写在这里会被忽略。
@@ -5370,12 +5351,184 @@ export interface GisViewLineLabelOptions {
5370
5351
  style?: Record<string, string>
5371
5352
  /** 标签层级:越大越靠上;不写时是 0 */
5372
5353
  zIndex?: number
5373
- /** 字号跟随地图缩放的指数:0 固定屏幕字号(默认),1 与地图同倍率 */
5374
- zoomScale?: number
5375
- }
5376
-
5377
- /** 标签类别:节点标签 / 线路标签 */
5378
- export type GisViewLabelKind = 'point' | 'line'
5354
+ /** 字号跟随地图缩放的指数:0 固定屏幕字号(默认),1 与地图同倍率 */
5355
+ zoomScale?: number
5356
+ }
5357
+
5358
+ /** 分组标签内容函数的入参:几何字段与线路标签同一套口径 */
5359
+ export interface GisViewGroupLabelPayload {
5360
+ /** 分组在这条通道里的序号(单组通道恒为 0) */
5361
+ index: number
5362
+ /** 当前标签定义的 id(同一分组上有多条标签时用来区分) */
5363
+ labelId?: string
5364
+ channelId?: string | number
5365
+ channelIndex?: number
5366
+ groupId?: string | number
5367
+ groupIndex?: number
5368
+ /** 这一组的分组声明(单组通道为引擎合成的同名对象) */
5369
+ group: GisViewChannelGroup
5370
+ /** 所属通道 */
5371
+ item: GisViewChannel
5372
+ /** ECharts 风格别名:与 item 指向同一份通道数据 */
5373
+ data: GisViewChannel
5374
+ /** 这一组的骨架折线(世界坐标) */
5375
+ skeleton: GisViewCoordinate[]
5376
+ /** 路径总长度与锚点距起点的长度(世界单位) */
5377
+ length: number
5378
+ distance: number
5379
+ /** 锚点在路径上的比例(0 ~ 1) */
5380
+ ratio: number
5381
+ /** 锚点的世界坐标与画布 CSS 像素坐标 */
5382
+ x: number
5383
+ y: number
5384
+ screen: [number, number]
5385
+ /** 锚点处路径方向的屏幕角度(弧度,x 轴正方向为 0,顺时针为正) */
5386
+ angle: number
5387
+ }
5388
+
5389
+ /** 分组标签内容:模板字符串(先取分组字段,取不到再回落到通道字段)或返回文本 / 元素的函数 */
5390
+ export type GisViewGroupLabelContent = string | ((payload: GisViewGroupLabelPayload) => string | HTMLElement | number | null | undefined)
5391
+
5392
+ /** 通道标签内容函数的入参:多分组时 index / group 指向当前簇的代表分组 */
5393
+ export interface GisViewChannelLabelPayload {
5394
+ /** 通道在 channels 数组里的下标 */
5395
+ index: number
5396
+ /** 当前标签定义的 id */
5397
+ labelId?: string
5398
+ channelId?: string | number
5399
+ channelIndex?: number
5400
+ /** 当前簇的代表分组;同一通道的其他簇会各画一条通道标签 */
5401
+ groupId?: string | number
5402
+ groupIndex?: number
5403
+ group: GisViewChannelGroup
5404
+ /** 通道声明 */
5405
+ item: GisViewChannel
5406
+ /** ECharts 风格别名:与 item 指向同一份通道数据 */
5407
+ data: GisViewChannel
5408
+ /** 代表分组的骨架折线(世界坐标) */
5409
+ skeleton: GisViewCoordinate[]
5410
+ length: number
5411
+ distance: number
5412
+ ratio: number
5413
+ x: number
5414
+ y: number
5415
+ screen: [number, number]
5416
+ angle: number
5417
+ }
5418
+
5419
+ /** 通道标签内容:模板字符串(取通道字段,缺字段回落到代表分组)或返回文本 / 元素的函数 */
5420
+ export type GisViewChannelLabelContent = string | ((payload: GisViewChannelLabelPayload) => string | HTMLElement | number | null | undefined)
5421
+
5422
+ /**
5423
+ * 分组标签(只读):每个可见分组按自己的骨架画一条。支持内容、沿线位置、平行与避让;
5424
+ * v1 不参与标签拖动 / 编辑 / labelClick,也不继承 options.labels.defaults。
5425
+ */
5426
+ export interface GisViewGroupLabelOptions {
5427
+ /** 配置了就默认渲染,显式 false 关闭 */
5428
+ enabled?: boolean
5429
+ /** 这一条标签的 id:数据里的 groups[].labels 按它对上号 */
5430
+ id?: string
5431
+ /** 文本来源:模板字符串或函数;缺省取分组的 name / label / id,模板 / field 取不到分组字段时才回落通道 */
5432
+ content?: GisViewGroupLabelContent
5433
+ /** 取哪个字段作为文本,缺省按 name / label / id 取 */
5434
+ field?: string
5435
+ /** 沿骨架的位置,缺省 0.5(中点) */
5436
+ position?: GisViewLineLabelPosition
5437
+ /**
5438
+ * 标签是否与骨架平行:按锚点处的路径方向旋转,朝左的方向自动翻半圈保证文字正读,默认 false。
5439
+ * 标签宽度在拐点附近放不下时会沿线挪到最近的足够长直段;所有线段都太短时落在最长线段中点。
5440
+ */
5441
+ parallel?: boolean
5442
+ /** 相对锚点额外偏移的像素 [x, y] */
5443
+ offset?: [number, number]
5444
+ /** 只给命中的分组显示标签 */
5445
+ when?: GisViewConditionInput<GisViewChannelGroup>
5446
+ /** 最多渲染多少个分组标签,0 表示不限制 */
5447
+ maxCount?: number
5448
+ /** 标签避让:优化档下和已放下的标签重叠时按 overlapMode 处理 */
5449
+ avoidOverlap?: boolean
5450
+ /** 避让留白(CSS 像素),默认 0 */
5451
+ overlapGap?: number
5452
+ /** 避让优先级:数值越大越先占位,默认 0 */
5453
+ priority?: number
5454
+ /** 避让时检查哪些对象 */
5455
+ collisionTargets?: GisViewLabelCollisionTargets
5456
+ /** 撞上后 shift 沿骨架挪 / hide 直接不显示 */
5457
+ overlapMode?: GisViewLabelOverlapMode
5458
+ /** 沿线换位步数:每一步 = 标签自身宽度 + 间隙,左右交替;默认 2 */
5459
+ slideFallback?: number | false
5460
+ /** 显隐策略:auto / always / hidden */
5461
+ visibility?: GisViewLabelVisibility
5462
+ /** 整类标签不画(等于 visibility: 'hidden') */
5463
+ hidden?: boolean
5464
+ /** 字符串内容是否按 HTML 渲染,默认 false */
5465
+ html?: boolean
5466
+ /** 交互期是否收起这一层:true 一交互就收,数字表示超过该条数才收 */
5467
+ hideOnInteract?: boolean | number
5468
+ className?: string
5469
+ /** 标签的内联样式 */
5470
+ style?: Record<string, string>
5471
+ /** 标签层级:越大越靠上 */
5472
+ zIndex?: number
5473
+ /** 字号跟随地图缩放的指数:0 固定屏幕字号(默认),1 与地图同倍率 */
5474
+ zoomScale?: number
5475
+ }
5476
+
5477
+ /**
5478
+ * 整条通道标签(只读):多分组时按内部走廊的实际屏幕折线距离聚类(包围盒只做快速排除),相邻平行分组只标一次,
5479
+ * 屏幕上离得远的簇各标一次,均取通道名称;不使用所有分组的总包围盒中点。
5480
+ * v1 不参与标签拖动 / 编辑 / labelClick,也不继承 options.labels.defaults。
5481
+ */
5482
+ export interface GisViewChannelLabelOptions {
5483
+ /** 配置了就默认渲染,显式 false 关闭 */
5484
+ enabled?: boolean
5485
+ /** 这一条标签的 id:数据里的 channels[].labels 按它对上号 */
5486
+ id?: string
5487
+ /** 文本来源:模板字符串或函数;缺省取通道的 name / label / id */
5488
+ content?: GisViewChannelLabelContent
5489
+ /** 取哪个字段作为文本,缺省按 name / label / id 取 */
5490
+ field?: string
5491
+ /** 沿代表分组骨架的位置,缺省 0.5(中点) */
5492
+ position?: GisViewLineLabelPosition
5493
+ /** 标签是否与骨架平行;拐点落位规则与分组标签相同 */
5494
+ parallel?: boolean
5495
+ /** 相对锚点额外偏移的像素 [x, y] */
5496
+ offset?: [number, number]
5497
+ /** 只给命中的通道显示标签 */
5498
+ when?: GisViewConditionInput<GisViewChannel>
5499
+ /** 每个标签定义最多渲染多少个通道簇,0 表示不限制 */
5500
+ maxCount?: number
5501
+ /** 标签避让:优化档下和已放下的标签重叠时按 overlapMode 处理 */
5502
+ avoidOverlap?: boolean
5503
+ /** 避让留白(CSS 像素),默认 0 */
5504
+ overlapGap?: number
5505
+ /** 避让优先级:数值越大越先占位,默认 0 */
5506
+ priority?: number
5507
+ /** 避让时检查哪些对象 */
5508
+ collisionTargets?: GisViewLabelCollisionTargets
5509
+ /** 撞上后 shift 沿骨架挪 / hide 直接不显示 */
5510
+ overlapMode?: GisViewLabelOverlapMode
5511
+ /** 沿线换位步数:每一步 = 标签自身宽度 + 间隙,左右交替;默认 2 */
5512
+ slideFallback?: number | false
5513
+ /** 显隐策略:auto / always / hidden */
5514
+ visibility?: GisViewLabelVisibility
5515
+ /** 整类标签不画(等于 visibility: 'hidden') */
5516
+ hidden?: boolean
5517
+ /** 字符串内容是否按 HTML 渲染,默认 false */
5518
+ html?: boolean
5519
+ /** 交互期是否收起这一层:true 一交互就收,数字表示超过该条数才收 */
5520
+ hideOnInteract?: boolean | number
5521
+ className?: string
5522
+ /** 标签的内联样式 */
5523
+ style?: Record<string, string>
5524
+ /** 标签层级:越大越靠上 */
5525
+ zIndex?: number
5526
+ /** 字号跟随地图缩放的指数:0 固定屏幕字号(默认),1 与地图同倍率 */
5527
+ zoomScale?: number
5528
+ }
5529
+
5530
+ /** 标签类别:节点标签 / 线路标签 */
5531
+ export type GisViewLabelKind = 'point' | 'line'
5379
5532
 
5380
5533
  /**
5381
5534
  * 一个标签的运行时状态:拖拽偏移 + 逐条覆盖。
@@ -6480,10 +6633,10 @@ export interface GisViewFitSpacingOptions {
6480
6633
  maxDistance?: number
6481
6634
  }
6482
6635
 
6483
- /**
6484
- * 插件:视图建好之后调用一次,拿到实例本身与带 apiVersion 的上下文;返回 { destroy } 时会挂进实例的 destroy。
6485
- * 写一次插件,之后换项目直接复用,不必把「URL 同步 / 自建图例 / 业务操作」再抄一遍。
6486
- */
6636
+ /**
6637
+ * 插件:视图建好之后调用一次,拿到实例本身与带 apiVersion 的上下文。
6638
+ * 写一次插件,之后换项目直接复用,不必把「URL 同步 / 自建图例 / 业务操作」再抄一遍。
6639
+ */
6487
6640
  export interface GisViewPluginContext {
6488
6641
  /** 插件 API 版本:当前为 1;以后只做加字段的向后兼容扩展 */
6489
6642
  readonly apiVersion: 1
@@ -6503,11 +6656,8 @@ export interface GisViewPluginContext {
6503
6656
  registerCommand<Payload = unknown, Value = unknown>(name: string, handler: GisViewCommandHandler<Payload, Value>): () => void
6504
6657
  }
6505
6658
 
6506
- /**
6507
- * 插件返回值只需要 destroy;第二个参数是插件作用域上下文(signal / 自动清理)。
6508
- * 旧写法 `view => ({ destroy })` 不受影响。
6509
- */
6510
- export type GisViewPlugin = (view: GisViewInstance, context: GisViewPluginContext) => void | { destroy?: () => void }
6659
+ /** 插件只执行副作用;清理统一登记到 context.onCleanup,返回值不参与生命周期。 */
6660
+ export type GisViewPlugin = (view: GisViewInstance, context: GisViewPluginContext) => void
6511
6661
 
6512
6662
  /** 实例命令的上下文:注册表属于这个视图,handler 里拿它就能继续调实例方法 */
6513
6663
  export interface GisViewCommandContext {
@@ -6773,16 +6923,16 @@ export type GisViewChannelHiddenLineLayout = 'preserve' | 'center'
6773
6923
  */
6774
6924
  export type GisViewSelectionKind = 'point' | 'line' | 'channel' | 'lineEndpoints' | 'channelEndpoints'
6775
6925
  /**
6776
- * selectionKinds 的写法:单类、类型数组、'all' / true(全开)或 false / null(全关)。
6777
- * 端点口径也认 line-endpoints / line_endpoints / channel-endpoints / channel_endpoints 这几种连字符写法。
6778
- * 不写时保留旧行为:框选只收节点,Ctrl / 多选点击仍可收节点与线路(回线按 channelSelectMode 摊开)。
6926
+ * options.selection.kinds 的写法:单类、类型数组、'all' / true(全开)或 false / null(全关)。
6927
+ * 端点口径也认 line-endpoints / line_endpoints / channel-endpoints / channel_endpoints 这几种连字符写法。
6928
+ * 不写时框选只收节点,Ctrl / 多选点击仍可收节点与线路(回线按 options.channel.selectMode 摊开)。
6779
6929
  */
6780
6930
  export type GisViewSelectionKindsInput = GisViewSelectionKind | GisViewSelectionKind[] | 'all' | true | false | null
6781
6931
 
6782
6932
  /** 框选 / Ctrl 多选保留哪一端:target 是碰撞目标(缺省),source 是正在拖动的来源 */
6783
6933
  export type GisViewMergeKeep = 'target' | 'source'
6784
6934
 
6785
- /** selectInBox 的临时类型过滤:不写 selectionKinds 就沿用全局 options.selectionKinds */
6935
+ /** selectInBox 的临时类型过滤:不写 selectionKinds 就沿用全局 options.selection.kinds */
6786
6936
  export interface GisViewSelectInBoxOptions {
6787
6937
  selectionKinds?: GisViewSelectionKindsInput
6788
6938
  originalEvent?: Event | null
@@ -7073,9 +7223,13 @@ export type GisViewFeatureName =
7073
7223
  | 'tooltip'
7074
7224
  /** 节点标签图层 */
7075
7225
  | 'label'
7076
- /** 线路标签图层 */
7077
- | 'lineLabel'
7078
- /** 内置鹰眼图(配了 minimap 才有) */
7226
+ /** 线路标签图层 */
7227
+ | 'lineLabel'
7228
+ /** 通道分组标签图层(只读) */
7229
+ | 'groupLabel'
7230
+ /** 通道标签图层(只读,多分组时按屏幕走廊每簇标一次) */
7231
+ | 'channelLabel'
7232
+ /** 内置鹰眼图(配了 minimap 才有) */
7079
7233
  | 'minimap'
7080
7234
  /** 键盘快捷键:Esc / Ctrl+C / Ctrl+V / Delete / 0 / Ctrl+Z… */
7081
7235
  | 'keyboard'
@@ -7467,36 +7621,30 @@ export interface GisViewA11yOptions {
7467
7621
 
7468
7622
  export type GisViewA11yInput = boolean | GisViewA11yOptions
7469
7623
 
7470
- /**
7471
- * 标签类 options 的分组写法。字段与顶层扁平配置一一对应:
7472
- * defaults -> labelDefaults、point -> label、line -> lineLabel、optimize -> labelOptimize、
7473
- * lineOptimize -> lineLabelOptimize、render -> labelRender、states -> labelStates。
7474
- * 扁平字段与分组字段同时出现时,显式扁平字段优先。
7475
- */
7476
- export interface GisViewLabelOptionsGroup {
7477
- /** 点 / 线两类标签的公共默认层,对应 labelDefaults */
7478
- defaults?: GisViewLabelDefaultsOptions | GisViewLabelContent | GisViewLineLabelContent
7479
- /** 节点标签,对应 label */
7480
- point?: GisViewLabelOptions | GisViewLabelContent | Array<GisViewLabelOptions | GisViewLabelContent>
7481
- /** 线路标签,对应 lineLabel */
7482
- line?: GisViewLineLabelOptions | GisViewLineLabelContent | Array<GisViewLineLabelOptions | GisViewLineLabelContent>
7483
- /** 节点标签优化开关,对应 labelOptimize */
7484
- optimize?: boolean
7485
- /** 线路标签优化开关,对应 lineLabelOptimize;不写时继承 optimize */
7486
- lineOptimize?: boolean
7487
- /** 标签容器渲染模式,对应 labelRender */
7488
- render?: 'auto' | 'canvas' | 'dom'
7489
- /** 标签运行时状态,对应 labelStates */
7490
- states?: GisViewLabelState[]
7491
- }
7492
-
7493
- /**
7494
- * 选中与框选配置的分组写法。字段与顶层扁平配置一一对应:
7495
- * trigger -> selectTrigger、kinds -> selectionKinds、onTop -> selectionOnTop、
7496
- * boxStyle -> selectionBoxStyle、boxPersistent -> selectionBoxPersistent、
7497
- * boxLiveSelect -> selectionBoxLiveSelect、boxNodeDrag -> selectionBoxNodeDrag。
7498
- */
7499
- export interface GisViewSelectionOptionsGroup {
7624
+ /** 标签配置:节点 / 线路 / 分组 / 通道标签及运行状态统一写在 labels 下。 */
7625
+ export interface GisViewLabelOptionsGroup {
7626
+ /** 点 / 线两类标签的公共默认层 */
7627
+ defaults?: GisViewLabelDefaultsOptions | GisViewLabelContent | GisViewLineLabelContent
7628
+ /** 节点标签 */
7629
+ point?: GisViewLabelOptions | GisViewLabelContent | Array<GisViewLabelOptions | GisViewLabelContent>
7630
+ /** 线路标签 */
7631
+ line?: GisViewLineLabelOptions | GisViewLineLabelContent | Array<GisViewLineLabelOptions | GisViewLineLabelContent>
7632
+ /** 通道分组标签;只读,不继承 defaults */
7633
+ group?: GisViewGroupLabelOptions | GisViewGroupLabelContent | Array<GisViewGroupLabelOptions | GisViewGroupLabelContent>
7634
+ /** 整条通道标签;只读,不继承 defaults */
7635
+ channel?: GisViewChannelLabelOptions | GisViewChannelLabelContent | Array<GisViewChannelLabelOptions | GisViewChannelLabelContent>
7636
+ /** 节点标签优化开关,缺省 false */
7637
+ optimize?: boolean
7638
+ /** 线路标签优化开关;不写时继承 optimize */
7639
+ lineOptimize?: boolean
7640
+ /** 标签容器渲染模式,缺省 auto */
7641
+ render?: 'auto' | 'canvas' | 'dom'
7642
+ /** 标签运行时状态(getLabelStates() 的输出) */
7643
+ states?: GisViewLabelState[]
7644
+ }
7645
+
7646
+ /** 选中与框选配置:触发方式、要素类型、保留框与选中层级统一写在 selection 下。 */
7647
+ export interface GisViewSelectionOptionsGroup {
7500
7648
  trigger?: GisViewSelectTrigger
7501
7649
  kinds?: GisViewSelectionKindsInput
7502
7650
  onTop?: boolean
@@ -7506,15 +7654,8 @@ export interface GisViewSelectionOptionsGroup {
7506
7654
  boxNodeDrag?: boolean
7507
7655
  }
7508
7656
 
7509
- /**
7510
- * 通道默认配置的分组写法。字段与顶层扁平配置一一对应:
7511
- * width -> channelWidth、inset -> channelInset、nodeWidth -> channelNodeWidth、
7512
- * tangentInset -> channelTangentInset、maxGroups -> channelMaxGroups、
7513
- * groupMaxLines -> channelGroupMaxLines、simplify -> channelSimplify、
7514
- * draftStyle -> channelDraftStyle、hiddenLineLayout -> channelHiddenLineLayout、
7515
- * selectMode -> channelSelectMode、waypointDragMode -> channelWaypointDragMode。
7516
- */
7517
- export interface GisViewChannelOptionsGroup {
7657
+ /** 通道默认配置:尺寸、分组上限、简略、草稿与选择 / 拐点模式统一写在 channel 下。 */
7658
+ export interface GisViewChannelOptionsGroup {
7518
7659
  width?: number
7519
7660
  inset?: number
7520
7661
  nodeWidth?: number
@@ -7528,13 +7669,13 @@ export interface GisViewChannelOptionsGroup {
7528
7669
  waypointDragMode?: GisViewChannelWaypointDragMode
7529
7670
  }
7530
7671
 
7531
- export interface GisViewOptions {
7532
- /** 标签配置的分组写法,见 GisViewLabelOptionsGroup;扁平 label / lineLabel 等字段仍可用且优先 */
7533
- labels?: GisViewLabelOptionsGroup
7534
- /** 选中与框选配置的分组写法,见 GisViewSelectionOptionsGroup;扁平字段仍可用且优先 */
7535
- selection?: GisViewSelectionOptionsGroup
7536
- /** 通道默认配置的分组写法,见 GisViewChannelOptionsGroup;扁平字段仍可用且优先 */
7537
- channel?: GisViewChannelOptionsGroup
7672
+ export interface GisViewOptions {
7673
+ /** 标签配置,见 GisViewLabelOptionsGroup */
7674
+ labels?: GisViewLabelOptionsGroup
7675
+ /** 选中与框选配置,见 GisViewSelectionOptionsGroup */
7676
+ selection?: GisViewSelectionOptionsGroup
7677
+ /** 通道默认配置,见 GisViewChannelOptionsGroup */
7678
+ channel?: GisViewChannelOptionsGroup
7538
7679
  /**
7539
7680
  * 功能开关:预设名('edit' / 'view' / 'static')、开关表或布尔值 ——
7540
7681
  * **缺省全关**:什么都不写时只剩画布与数据,想要哪一项就手动打开哪一项。
@@ -7573,7 +7714,7 @@ export interface GisViewOptions {
7573
7714
  /**
7574
7715
  * 大数据展示模式:`'auto'`(缺省)按可见节点 / 线路数、节点屏幕密度与数据总量自动切;
7575
7716
  * `'on'` / `'off'` / true / false 强制开关;对象写法可改点 / 线各自阈值(见 GisViewDenseModeOptions)。
7576
- * 进入密集档后节点 / 线路标签都强制走避让 / 截断(等价 labelOptimize / lineLabelOptimize 同时为 true),线路动点与节点涟漪暂停;
7717
+ * 进入密集档后节点 / 线路标签都强制走避让 / 截断(等价 options.labels.optimize / options.labels.lineOptimize 同时为 true),线路动点与节点涟漪暂停;
7577
7718
  * 运行时用 updateOptions({ denseMode }) 切换,当前有效值与判定依据看 getStats().dense。
7578
7719
  */
7579
7720
  denseMode?: GisViewDenseModeInput
@@ -7616,37 +7757,10 @@ export interface GisViewOptions {
7616
7757
  */
7617
7758
  rulePreprocess?: GisViewRulePreprocessInput
7618
7759
  points?: GisViewPoint[]
7619
- lines?: GisViewLine[]
7620
- /** 通道:把若干条线路组织成并行敷设的多回线走廊 */
7621
- channels?: GisViewChannel[]
7622
- /** 通道默认宽度(世界单位),通道自身可用 width 覆盖 */
7623
- channelWidth?: number
7624
- /** 通道默认的内收比例(占通道宽度,最大 0.42,offsetMode 为 inset 时生效;负数外收,最小 -0.5),通道自身可用 inset 覆盖 */
7625
- channelInset?: number
7626
- /**
7627
- * 通道默认按两端节点尺寸取宽度的倍数:1(默认)表示回线正好铺在节点两边、节点放大回线跟着变宽,
7628
- * 0 表示所有通道都退回 width / channelWidth 的世界单位写法,通道自身可用 nodeWidth 覆盖
7629
- */
7630
- channelNodeWidth?: number
7631
- /**
7632
- * 通道两端的切点往节点内收多少(CSS 像素):缺省 / null 表示按回线自身线宽收 —— 最外侧那条回线
7633
- * 落在节点里面,不会从节点边缘探出去;配 0 就退回「切点正好落在节点边上」,负数外收(切点往外让,
7634
- * 单侧最多让节点宽度的 50%)。只在按节点尺寸取宽度(channelNodeWidth > 0)且两端锚定时生效,通道自身可用 tangentInset 覆盖
7635
- */
7636
- channelTangentInset?: number | null
7637
- /** 一条通道最多几个分组(0 表示不限):新增通道时据此判断还能不能加新分组 */
7638
- channelMaxGroups?: number
7639
- /** 一个分组最多几条回线(0 表示不限):新增通道时据此判断还能不能并进这一组 */
7640
- channelGroupMaxLines?: number
7641
- /**
7642
- * 通道简略:true 用缺省阈值 4;对象可改 threshold 与代表线 style。
7643
- * 某个分组超过阈值时只画一条代表线(没有 groups 的通道按一整组算),数据、分组读数与导出不变
7644
- */
7645
- channelSimplify?: boolean | GisViewChannelSimplifyOptions
7646
- /** 新增通道草稿线的样式(跟随光标的那条预览线) */
7647
- channelDraftStyle?: GisViewChannelDraftStyle
7648
- /** WebGL 自定义层:内置内容之后按 order 绘制;运行时用 addWebGLLayer / updateWebGLLayer 等维护 */
7649
- webglLayers?: GisViewWebGLLayer[]
7760
+ lines?: GisViewLine[]
7761
+ /** 通道:把若干条线路组织成并行敷设的多回线走廊 */
7762
+ /** WebGL 自定义层:内置内容之后按 order 绘制;运行时用 addWebGLLayer / updateWebGLLayer 等维护 */
7763
+ webglLayers?: GisViewWebGLLayer[]
7650
7764
  background?: GisViewBackground
7651
7765
  pointStyle?: GisViewPointStyle
7652
7766
  lineStyle?: GisViewLineStyle
@@ -7665,65 +7779,10 @@ export interface GisViewOptions {
7665
7779
  * 不写 / null 时零 DOM;默认跟随 heatmap 的字段、自动值域与颜色,也能独立给 domain / colors。
7666
7780
  * 不写 target 时展示值域取第一类有数值的目标,交互选区门控 heatmap 全部启用目标上同 field 的
7667
7781
  * 热力上色、光晕与密度;显式 target 只门控这一类。不删除数据、不改筛选;
7668
- * 只改图例配置仍只重画这一层,不触发引擎场景重排或标签重排
7669
- */
7670
- visualMap?: GisViewVisualMap | null
7671
- /**
7672
- * 点 / 线两类标签的公共默认层:content、style、overlapGap、priority、collisionTargets 等
7673
- * 两边都讲得通的字段可以只写一份;label / lineLabel 里的同名字段逐项覆盖,style 再做一层合并。
7674
- * 也可以直接写字符串 / 函数(等价于公共 content)。position / gap / anchor / when / parallel 等
7675
- * 分类专属字段仍写回 label / lineLabel。
7676
- */
7677
- labelDefaults?: GisViewLabelDefaultsOptions | GisViewLabelContent | GisViewLineLabelContent
7678
- /**
7679
- * 节点标签:配了就按这个配置渲染,内容、位置、数量与显隐都可配。
7680
- * 写数组就是「一个节点上显示多条标签」:数组里每一条各自有内容 / 位置 / 样式 / 显隐,
7681
- * 用 id 与数据里的 labels 对上号(不写 id 时第一个是 default,之后是 label2 / label3…)。
7682
- * 也可直接写字符串 / 函数,等价于只设置 content;未写的字段先继承 labelDefaults。
7683
- */
7684
- label?: GisViewLabelOptions | GisViewLabelContent | Array<GisViewLabelOptions | GisViewLabelContent>
7685
- /**
7686
- * 线路标签:按比例或绝对距离摆在线路上任意位置,内容与避让同样可配;
7687
- * 写数组就是「一条线上显示多条标签」,与节点标签同一套逐条写法;
7688
- * 最外层同样可直接写字符串 / 函数;未写的字段先继承 labelDefaults,位置 / 平行等专属项仍以这里为准。
7689
- */
7690
- lineLabel?: GisViewLineLabelOptions | GisViewLineLabelContent | Array<GisViewLineLabelOptions | GisViewLineLabelContent>
7691
- /**
7692
- * 节点标签的显示优化开关,缺省 `false`:关着(缺省)走「强制显示」——不避让、不按 maxCount 截断、
7693
- * 不设扫描预算 / 候选上限,视口内该出现的标签一条不少;打开(`true`)与从前完全一致:
7694
- * 避让 / 换落点 / 数量上限 / 扫描预算全部生效(十万级数据建议打开,
7695
- * 两档的开销差别见 docs/GisView.md 的「标签显示优化开关」)。线路标签通过
7696
- * `lineLabelOptimize` 单独控制,未写时继承这一项。
7697
- * 只管「画不画、画在哪、拖节点时是否临时避让其他标签」:`visibility` / `when` / 标签自身拖拽与编辑 /
7698
- * 样式与动画都不受影响;强制显示档不触发拖动期临时避让 / 隐藏
7699
- */
7700
- labelOptimize?: boolean
7701
- /**
7702
- * 线路标签的显示优化开关;不写时继承 `labelOptimize`,显式布尔值可单独覆盖:
7703
- * `false` 让线路标签始终强制显示,`true` 只让线路标签走避让 / 数量上限 / 候选预算。
7704
- * 进入大数据密集档时与节点标签一样强制走优化档(性能保护优先)。
7705
- * 只管线路标签「画不画、画在哪、拖节点时是否临时避让其他标签」;`visibility` / `when` / 标签自身拖拽与编辑 /
7706
- * 样式与动画不受影响;强制显示档不触发拖动期临时避让 / 隐藏。
7707
- */
7708
- lineLabelOptimize?: boolean
7709
- /**
7710
- * 纯文本标签的渲染方式,缺省 `auto`:
7711
- * - `auto`:某一类标签处于强制显示档下,视口里的纯文本标签达到 1024 条时自动改画到该类别的单张 Canvas;
7712
- * 需要 DOM 的标签(`html: true`、函数返回元素、可拖拽 / 可编辑)仍逐条建节点。
7713
- * - `canvas`:纯文本标签始终改画到所属类别的单张 Canvas,不受 1024 条阈值限制,
7714
- * 节点 / 线路各自的优化档下也按画布尺寸参与避让 / 换落点;需要 DOM 的标签仍逐条建节点。
7715
- * - `dom`:始终逐条建 `.network-view__label`,保持旧行为。
7716
- * 画布档不改变标签内容、锚点与显隐,只减少高密度场景的 DOM 数量。
7717
- */
7718
- labelRender?: 'auto' | 'canvas' | 'dom'
7719
- /**
7720
- * 标签的运行时状态(`getLabelStates()` 的那一份:拖过的偏移、改过的内容与样式、运行时加的标签、隐藏覆盖):
7721
- * 创建 / `updateOptions` 时喂回来就回显,与 `setLabelStates(states)` 同一条路。
7722
- * `exportData({ format: 'input' })` 的结果里叫 `labelStates`,原样接上即可完成存档 → 回灌
7723
- */
7724
- labelStates?: GisViewLabelState[]
7725
- /**
7726
- * 与节点无关的扩展图形:在画布之上、标签之下绘制 SVG 路径 / 图片 / Canvas,
7782
+ * 只改图例配置仍只重画这一层,不触发引擎场景重排或标签重排
7783
+ */
7784
+ /**
7785
+ * 与节点无关的扩展图形:在画布之上、标签之下绘制 SVG 路径 / 图片 / Canvas,
7727
7786
  * 支持世界坐标锚点、旋转、透明度、zIndex 与随视图缩放。运行时用 addGraphic / addGraphics /
7728
7787
  * updateGraphic / removeGraphic / clearGraphics 增删改;exportImage 的 PNG / SVG 都会带上这一层。
7729
7788
  */
@@ -7785,7 +7844,7 @@ export interface GisViewOptions {
7785
7844
  * 地图缩放对节点尺寸的联动指数(「节点跟随地图缩放」就是配它):0(默认)表示节点不随地图缩放变化,
7786
7845
  * 1 表示与地图同倍率放大(地图放大 2 倍节点也大 2 倍),0.5 是地图放大 4 倍、节点放大 2 倍。
7787
7846
  * 与 pointSizeScale 不重复:那个是常数倍数(屏幕上恒定),这里是随地图缩放的指数,两者相乘生效。
7788
- * 节点尺寸变化时,按节点尺寸取宽的通道回线位置跟着一起变(见 channelNodeWidth)。
7847
+ * 节点尺寸变化时,按节点尺寸取宽的通道回线位置跟着一起变(见 options.channel.nodeWidth)。
7789
7848
  */
7790
7849
  pointZoomScale?: number
7791
7850
  /**
@@ -7874,74 +7933,10 @@ export interface GisViewOptions {
7874
7933
  /**
7875
7934
  * 框选 / 多选拖动时,线路或通道的两端节点都在拖动组里,是否优先实时跟随:默认 true。
7876
7935
  * 打开时这类「双端都选中」的几何在拖动过程中每帧更新,即使 `liveDrag: false`;
7877
- * 只连一端,或关掉本项时,仍按 `liveDrag` 的口径停手后补齐。运行时走 `updateOptions({ dragLinesWithNodes })`。
7878
- */
7879
- dragLinesWithNodes?: boolean
7880
- /**
7881
- * 选中触发方式:缺省 'click'(单击选中);写 'dblClick' 后第一次点击只派发 onClick,
7882
- * 第二次(双击判定命中)才更新选中集,并同时派发 onClick 与 onDblClick。
7883
- * Ctrl / ⌘ 多选与 multiSelect 在双击模式下同样等到第二下才取反。运行时走 updateOptions({ selectTrigger })。
7884
- */
7885
- selectTrigger?: GisViewSelectTrigger
7886
- /**
7887
- * 框选 / Ctrl 多选允许收哪几类要素:'point' 节点、'line' 独立线路、'channel' 通道回线,
7888
- * 另有 'lineEndpoints' / 'channelEndpoints' 只在框选时要求线路 / 通道两端节点都在框内;
7889
- * 框选线路 / 通道时按实际折线路径逐线段判定,不用包围盒冒充命中;
7890
- * 可写数组任意组合,'all' / true 全开,false / null 全关。
7891
- * **不写时保留旧行为**:框选只收节点,Ctrl / 多选点击仍可收节点与线路;
7892
- * 写了之后框选与 Ctrl / 多选点击统一按这一份过滤(普通单选、toggleSelect 的取消与接口 select 不受限制)。
7893
- * 两个端点口径只影响框选,不会因为写进同一份数组就让 Ctrl 点击去猜端点。
7894
- * 运行时走 updateOptions({ selectionKinds })。
7895
- */
7896
- selectionKinds?: GisViewSelectionKindsInput
7897
- /** 框选矩形样式;render: 'div' 时可用 className / borderStyle / radius 整体换外观 */
7898
- selectionBoxStyle?: GisViewSelectionBoxStyle
7899
- /**
7900
- * 框选结束后是否保留矩形(缺省 false)。保留时在框内按下并拖动会把框内选中的节点整组平移,
7901
- * 线路与通道随节点更新;选中集变化、清空或调用 clearSelectionBox() 时自动收起。
7902
- * 运行时走 updateOptions({ selectionBoxPersistent })。
7903
- */
7904
- selectionBoxPersistent?: boolean
7905
- /**
7906
- * 框选实时选中开关(缺省 false)。初次拖框打开后未松手就按帧更新选中视觉,不要求
7907
- * selectionBoxPersistent;松手仍只提交一次最终选中回调。移动保留框时另走只增不减语义,
7908
- * 仅在 selectionBoxPersistent: true 时生效,并使用建立保留框时那一份 selectionKinds;
7909
- * 本次手势开始时选中的拖动成员保持冻结,中途新并入的要素不会在当前拖动里跳位。
7910
- * 两种实时预览都不逐帧派发 onSelect / onSelectChange。运行时走 updateOptions({ selectionBoxLiveSelect })。
7936
+ * 只连一端,或关掉本项时,仍按 `liveDrag` 的口径停手后补齐。运行时走 `updateOptions({ dragLinesWithNodes })`。
7911
7937
  */
7912
- selectionBoxLiveSelect?: boolean
7913
- /**
7914
- * 在保留框内按住一个已选节点拖动时,是否连同保留框和整组选中要素一起移动(缺省 false)。
7915
- * 打开后这条手势与「按住框内空白拖动」同一套位移语义;框内未选中节点仍是普通单点拖动。
7916
- * 仅在 selectionBoxPersistent: true 时生效;运行时走 updateOptions({ selectionBoxNodeDrag })。
7917
- */
7918
- selectionBoxNodeDrag?: boolean
7919
- /**
7920
- * 选中的要素是否画在所有要素之上(默认 true):抬层的包括点击 / 拖动 / 待确认合并的节点、
7921
- * 选中线路所在的整条通道,以及它们的 decorations —— 选中了就一定看得见,与 zIndex 无关;
7922
- * 关掉之后完全按 zIndex 与数据顺序绘制(十万级数据下抬层会让整份重排一次)
7923
- */
7924
- selectionOnTop?: boolean
7925
- /**
7926
- * 通道选中模式:点中通道里的一条回线时选中什么 —— 'line'(缺省)只选这一条、'group' 连它所在分组、
7927
- * 'channel' 整条通道;通道以外的线路永远只选自己。它只影响「下一次点选怎么摊开选中集」,
7928
- * Ctrl + 点击在 group / channel 下是整批取反,切换走 updateOptions 不用重排场景
7929
- */
7930
- channelSelectMode?: GisViewChannelSelectMode
7931
- /**
7932
- * 分组拐点拖动模式:'parallel'(缺省)沿用共用骨架 + 平行偏移,拐角相邻顶点可能随 miter 微调;
7933
- * 'vertex' 只移动当前分组同一 pathIndex 的拐点(组内所有回线按相同世界增量),其他拐点保持不动。
7934
- * 普通线路不受影响;切换走 updateOptions({ channelWaypointDragMode }),下一次拖动生效
7935
- */
7936
- channelWaypointDragMode?: GisViewChannelWaypointDragMode
7937
- /**
7938
- * 隐藏回线时车道怎么排:'preserve'(缺省)保留原来的车道槽位,'center' 让剩余可见回线
7939
- * 在整条通道宽度内重新居中。隐藏的通道分组按整组处理。
7940
- * 运行时走 updateOptions({ channelHiddenLineLayout })。
7941
- */
7942
- channelHiddenLineLayout?: GisViewChannelHiddenLineLayout
7943
-
7944
- /**
7938
+
7939
+ /**
7945
7940
  * 快捷键:框选、多选、加点、复制、粘贴、取消、删除、适应视图都可以在这里改
7946
7941
  * (比如把框选从 shift 改成 ctrl),没写的动作沿用默认值,写 false 等于关掉这个动作的快捷键
7947
7942
  */
@@ -8004,8 +7999,8 @@ export interface GisViewOptions {
8004
7999
  */
8005
8000
  renderEmitInterval?: number
8006
8001
  /**
8007
- * 插件:视图建好之后依次调用 `plugin(view, context)`(context 带 apiVersion / view),用来把跨项目复用的逻辑
8008
- * (URL 同步、业务快捷操作、自建图例…)封装成一份;返回值里的 destroy 会在 view.destroy() 时回调。
8002
+ * 插件:视图建好之后依次调用 `plugin(view, context)`(context 带 apiVersion / view),用来把跨项目复用的逻辑
8003
+ * (URL 同步、业务快捷操作、自建图例…)封装成一份;需要清理的资源通过 context.onCleanup 登记。
8009
8004
  */
8010
8005
  plugins?: GisViewPlugin[]
8011
8006
  /** zoomIn / zoomOut 的步进倍率 */
@@ -8537,10 +8532,10 @@ export type GisViewExportScope = 'all' | 'viewport' | 'selection'
8537
8532
  * `parts` 决定要哪些分项,points / lines / channels 三个筛选搭着用。
8538
8533
  */
8539
8534
  export interface GisViewExportDataOptions extends GisViewExportFilterOptions {
8540
- /** 导出范围,缺省 'all';selected / visible 之类的同义词在运行时也认 */
8541
- scope?: GisViewExportScope
8535
+ /** 导出范围,缺省 'all';只认 'all' / 'viewport' / 'selection' */
8536
+ scope?: GisViewExportScope
8542
8537
  /**
8543
- * 只对 scope: 'viewport' 生效的类型过滤:写法与 options.selectionKinds 相同。
8538
+ * 只对 scope: 'viewport' 生效的类型过滤:写法与 options.selection.kinds 相同。
8544
8539
  * 不写时沿用视口导出的旧口径;写 'lineEndpoints' / 'channelEndpoints' 时,
8545
8540
  * 只有两端节点都落在视口世界矩形内的独立线路 / 通道才会导出(端点模式不会顺带导出节点)。
8546
8541
  */
@@ -8623,7 +8618,7 @@ export interface GisViewExportDataResult extends GisViewExportMeta {
8623
8618
  parallelGroups?: GisViewParallelGroup[]
8624
8619
  /**
8625
8620
  * format 为 'input':标签的运行时状态(与 getLabelStates / labelStates 入参同一份形状),
8626
- * 原样喂回 createNetworkView 或 updateOptions({ labelStates }) 就回显;`labels: false` 时不带这一列
8621
+ * 原样喂回 createNetworkView 或 updateOptions({ labels: { states } }) 就回显;`labels: false` 时不带这一列
8627
8622
  */
8628
8623
  labelStates?: GisViewLabelState[]
8629
8624
  /** format 为 'new':new.json 口径的整份 */
@@ -9342,8 +9337,8 @@ export interface GisViewInstance {
9342
9337
  pickAt(clientX: number, clientY: number): GisViewPickAtResult | null
9343
9338
  /**
9344
9339
  * 按客户端坐标做一次「普通单击选中」:与画布点击共用命中顺序与选中状态,
9345
- * 通道回线按 channelSelectMode 摊开。空白 / 聚合圆返回 null 且不改选中。
9346
- * 立即生效,不等待 selectTrigger: 'dblClick',也不派发 onClick / onDblClick;选中集实际变化时发
9340
+ * 通道回线按 options.channel.selectMode 摊开。空白 / 聚合圆返回 null 且不改选中。
9341
+ * 立即生效,不等待 options.selection.trigger: 'dblClick',也不派发 onClick / onDblClick;选中集实际变化时发
9347
9342
  * onSelect / onSelectChange。已知节点 / 线路 id 时直接用 selectFeatures,不必先求坐标。
9348
9343
  */
9349
9344
  selectAt(clientX: number, clientY: number): GisViewSelectPayload | null
@@ -9431,7 +9426,7 @@ export interface GisViewInstance {
9431
9426
  * 它只读,不改变选中集;取消选中、点空白处、换数据或关掉 cascadeHighlight 会收掉。
9432
9427
  */
9433
9428
  getCascadeHighlight(): GisViewCascadeHighlightInfo | null
9434
- /** 按画布 CSS 像素矩形框选;options.selectionKinds 可临时覆盖全局类型过滤 */
9429
+ /** 按画布 CSS 像素矩形框选;options 里的 selectionKinds 可临时覆盖全局 options.selection.kinds */
9435
9430
  selectInBox(box: GisViewRect, options?: GisViewSelectInBoxOptions): GisViewInstance
9436
9431
  /** 收起当前保留的框选矩形;只动矩形,不改变选中集 */
9437
9432
  clearSelectionBox(): GisViewInstance
@@ -9474,8 +9469,8 @@ export interface GisViewInstance {
9474
9469
  pastePoint(options?: GisViewPasteOptions): GisViewCopyItem | GisViewBatchCopyPayload | null
9475
9470
  /** 强制整组粘贴(单节点也走批量路):返回带 count / indexes / lines / channels / revert 的完整载荷 */
9476
9471
  pastePoints(options?: GisViewPasteOptions): GisViewBatchCopyPayload | null
9477
- /** 剪贴板快照:count / sources / items / lines / channels / anchor(没有就返回 null) */
9478
- getPointClipboard(): GisViewClipboardItem | null
9472
+ /** 剪贴板快照:count / anchor / sources / items / supportSources / supportItems / lines / channels / lineChannels / withLines / withChannels(没有就返回 null) */
9473
+ getPointClipboard(): GisViewClipboardItem | null
9479
9474
  /**
9480
9475
  * 把来源节点并进目标节点(接口调用):来源 / 目标收 id、下标或 `{ id }` / `{ index }`。
9481
9476
  * 节点数据按 merge.createItem 合并(缺省以目标节点为底,merge.maxKeys 列出的字段取双方最高值,
@@ -9649,7 +9644,7 @@ export interface GisViewInstance {
9649
9644
  beginAddLine(options?: GisViewChannelDraftOptions): GisViewInstance
9650
9645
  /** 当前新增通道草稿:两个节点的信息与可选方案,没有草稿时为 null */
9651
9646
  getAddChannelDraft(): GisViewChannelDraftPayload | null
9652
- /** 改当前草稿的预览样式(字段级合并,传 null 回到全局 channelDraftStyle);没有草稿时什么也不做 */
9647
+ /** 改当前草稿的预览样式(字段级合并,传 null 回到全局 options.channel.draftStyle);没有草稿时什么也不做 */
9653
9648
  updateAddChannelStyle(patch?: GisViewChannelDraftStyle | null): GisViewInstance
9654
9649
  /** 开下一段草稿:连续模式落地时内部自动调用,也可以手动调(没有草稿就按 options 重新进来) */
9655
9650
  continueAddChannel(options?: GisViewChannelDraftOptions): GisViewInstance
@@ -10026,8 +10021,8 @@ export interface GisViewInstance {
10026
10021
  off<K extends GisViewEventName>(name: K, handler?: GisViewEventListener<K>): number
10027
10022
  off(name: GisViewEventWildcard, handler?: GisViewAnyEventListener): number
10028
10023
  /**
10029
- * 运行时挂一个插件(写法与 `options.plugins` 里的一项完全一致):调用即执行,返回卸载函数 ——
10030
- * 调它就把这个插件返回的 `destroy` 清掉(重复调用只清一次;实例销毁之后再调也安全)
10024
+ * 运行时挂一个插件(写法与 `options.plugins` 里的一项完全一致):调用即执行,返回卸载函数 ——
10025
+ * 调它中止插件 signal 并执行 context 登记的清理(重复调用只清一次;实例销毁之后再调也安全)
10031
10026
  */
10032
10027
  use(plugin: GisViewPlugin): () => void
10033
10028
  /**
@@ -10244,9 +10239,9 @@ export interface GisViewEngineOptions {
10244
10239
  * 切换走 setOptions / updateOptions 不用重排场景
10245
10240
  */
10246
10241
  channelSelectMode?: GisViewChannelSelectMode
10247
- /** 分组拐点拖动模式:'parallel'(缺省)/ 'vertex',见 GisViewOptions.channelWaypointDragMode */
10242
+ /** 分组拐点拖动模式:'parallel'(缺省)/ 'vertex',见 GisViewOptions.channel.waypointDragMode */
10248
10243
  channelWaypointDragMode?: GisViewChannelWaypointDragMode
10249
- /** 隐藏回线后的车道排布,见 GisViewOptions.channelHiddenLineLayout;缺省 preserve */
10244
+ /** 隐藏回线后的车道排布,见 GisViewOptions.channel.hiddenLineLayout;缺省 preserve */
10250
10245
  channelHiddenLineLayout?: GisViewChannelHiddenLineLayout
10251
10246
  /** 线路是否跟随节点,缺省 true;关闭后节点退场时线路 / 通道停在最后一份坐标与解析尺寸 */
10252
10247
  lineFollowsNode?: boolean
@@ -10406,7 +10401,7 @@ export interface GisViewEngine {
10406
10401
  setChannelGroups(channelId: string | number, groups: Array<Array<string | number> | { id?: string | number; lineIds: Array<string | number>; path?: GisViewCoordinate[] }>, keepId?: string | number): { index: number; groups: GisViewChannelGroup[] } | null
10407
10402
  /**
10408
10403
  * 自由分配线路:把某一条回线单独拆到新分组,或并进另一个分组,返回分组现状与写回定义用的声明
10409
- * (index / declarations);组数 / 回线数到上限(channelMaxGroups / channelGroupMaxLines)时 ok 为 false
10404
+ * (index / declarations);组数 / 回线数到上限(options.channel.maxGroups / groupMaxLines)时 ok 为 false
10410
10405
  */
10411
10406
  moveChannelLine(channelId: string | number, lineId: string | number, target?: GisViewChannelLineMoveTarget): GisViewChannelLineMoveResult & { index?: number; declarations?: GisViewChannelGroup[] }
10412
10407
  /**
@@ -10442,7 +10437,7 @@ export interface GisViewEngine {
10442
10437
  circuits?: number
10443
10438
  /** 换这一段草稿的第二段线路数据;给了几条就按几条对齐 circuits */
10444
10439
  lineData?: GisViewChannelLineData
10445
- /** 换这一段草稿的预览样式(字段级合并;null 回到全局 channelDraftStyle,不传就沿用) */
10440
+ /** 换这一段草稿的预览样式(字段级合并;null 回到全局 options.channel.draftStyle,不传就沿用) */
10446
10441
  channelDraftStyle?: GisViewChannelDraftStyle | null
10447
10442
  routing?: 'straight' | 'orthogonal'
10448
10443
  path?: GisViewCoordinate[]
@@ -10592,7 +10587,7 @@ export interface GisViewEngine {
10592
10587
  pick(x: number, y: number): GisViewHitResult | null
10593
10588
  /** 与组件实例的 pickAt 同一份:按浏览器客户端坐标拾取(引擎不等 DOM 事件,直接给 clientX / clientY) */
10594
10589
  pickAtClient(clientX: number, clientY: number): GisViewHitResult | null
10595
- /** 与组件实例的 selectAt 同一份:按客户端坐标走一次普通单击选中(通道按 channelSelectMode 摊开) */
10590
+ /** 与组件实例的 selectAt 同一份:按客户端坐标走一次普通单击选中(通道按 options.channel.selectMode 摊开) */
10596
10591
  selectAtClient(clientX: number, clientY: number): GisViewSelectPayload | null
10597
10592
  /** 程序化悬停(客户端坐标):让指针「停」在这儿,悬停高亮 / 光标 / onHover 一起更新,返回这一次的读数 */
10598
10593
  hoverAtClient(clientX: number, clientY: number): GisViewHoverPayload | null