gis-view-webgl2 0.1.9 → 0.1.10
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 +5 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +63 -6
- package/dist/index.js +1 -1
- package/docs/AI/345/257/271/350/257/235/346/261/207/346/200/273.md +22 -5
- package/docs/GisView.md +1 -1
- package/docs/ai/06-/344/274/232/350/257/235/347/264/242/345/274/225/344/270/216/345/244/215/346/237/245/346/226/271/346/263/225.md +7 -5
- package/docs/demos/api-index.js +5 -4
- package/docs/demos/gis-view-demo/panels/StylePanels.vue +14 -2
- package/docs/demos/gis-view-demo/useGisViewDemo.js +29 -5
- package/docs/index.html +3 -3
- package/docs/manual/03-/351/205/215/347/275/256/351/241/271.md +2 -2
- package/docs/manual/09-/351/200/232/351/201/223/344/270/216/345/244/232/345/233/236/347/272/277.md +16 -13
- package/docs/manual/14-/350/247/206/345/233/276/344/270/216/347/255/233/351/200/211.md +19 -5
- package/docs/manual/16-/345/256/236/344/276/213/346/226/271/346/263/225/346/200/273/350/241/250.md +3 -2
- package/docs/manual/17-/345/217/202/346/225/260/351/200/237/346/237/245.md +3 -2
- package/docs/manual/18-/351/200/220/346/226/271/346/263/225/347/244/272/344/276/213.md +23 -9
- package/docs/steps/README.md +1 -1
- package/docs/steps/selftest-demos.html +2 -2
- package/docs/steps/selftest-docs.html +3 -3
- package/docs/steps/selftest-features.html +16 -10
- package/docs/steps/selftest-scale.html +33 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1841,6 +1841,20 @@ export interface GisViewDirectLineConnection {
|
|
|
1841
1841
|
/** getDirectConnections 的一项:直接通道或直接线路(通道与成员回线可能同时命中) */
|
|
1842
1842
|
export type GisViewDirectConnection = GisViewDirectChannelConnection | GisViewDirectLineConnection
|
|
1843
1843
|
|
|
1844
|
+
/** getDirectConnections 要查哪一列:缺省 / 'both' 两列都查 */
|
|
1845
|
+
export type GisViewDirectConnectionKind = 'channel' | 'line' | 'both'
|
|
1846
|
+
|
|
1847
|
+
/** getDirectConnections 第二段的写法:也可以直接传 'channel' / 'line' / 'both' */
|
|
1848
|
+
export interface GisViewDirectConnectionsOptions {
|
|
1849
|
+
kind?: GisViewDirectConnectionKind
|
|
1850
|
+
}
|
|
1851
|
+
|
|
1852
|
+
/** getDirectConnections 的返回值:外层固定拆成通道与线路两列,没命中的那一列是空数组 */
|
|
1853
|
+
export interface GisViewDirectConnections {
|
|
1854
|
+
channels: GisViewDirectChannelConnection[]
|
|
1855
|
+
lines: GisViewDirectLineConnection[]
|
|
1856
|
+
}
|
|
1857
|
+
|
|
1844
1858
|
/** 新增通道草稿的配置:beginAddChannel 用 */
|
|
1845
1859
|
export interface GisViewChannelDraftOptions {
|
|
1846
1860
|
/** 两个节点一选完就自动提交,不用再调 commitAddChannel */
|
|
@@ -5291,6 +5305,35 @@ export interface GisViewChannelSnapshot {
|
|
|
5291
5305
|
}
|
|
5292
5306
|
|
|
5293
5307
|
|
|
5308
|
+
/** getPointSpacing() 的端点:可见节点在原始 points 里的 id、下标与数据对象 */
|
|
5309
|
+
export interface GisViewPointSpacingNode {
|
|
5310
|
+
id: string | number
|
|
5311
|
+
index: number
|
|
5312
|
+
item: GisViewPoint
|
|
5313
|
+
}
|
|
5314
|
+
|
|
5315
|
+
/** getPointSpacing() 的一对节点:distance 是当前相机比例下的 CSS 像素 */
|
|
5316
|
+
export interface GisViewPointSpacingPair {
|
|
5317
|
+
from: GisViewPointSpacingNode
|
|
5318
|
+
to: GisViewPointSpacingNode
|
|
5319
|
+
distance: number
|
|
5320
|
+
}
|
|
5321
|
+
|
|
5322
|
+
/**
|
|
5323
|
+
* getPointSpacing() 的读数:当前可见节点的最近正距离与最远距离,单位都是 CSS 像素,
|
|
5324
|
+
* 与 fitSpacing 同一套屏幕口径,并随当前相机比例换算。筛选 / 隐藏后的节点不参与。
|
|
5325
|
+
*/
|
|
5326
|
+
export interface GisViewPointSpacing {
|
|
5327
|
+
/** 当前参与统计的可见节点数 */
|
|
5328
|
+
count: number
|
|
5329
|
+
/** 最近两个不同位置节点之间的 CSS 像素距离;不足两个节点或全部重合时为 null */
|
|
5330
|
+
minDistance: number | null
|
|
5331
|
+
/** 最远两个节点之间的 CSS 像素距离;不足两个节点时为 null,全部重合时为 0 */
|
|
5332
|
+
maxDistance: number | null
|
|
5333
|
+
nearest: GisViewPointSpacingPair | null
|
|
5334
|
+
farthest: GisViewPointSpacingPair | null
|
|
5335
|
+
}
|
|
5336
|
+
|
|
5294
5337
|
/** getViewState() 的一次性读数:相机 / 视口 / 可视范围 / 布局 / 选中 / 筛选 / 光标 / 渲染统计 */
|
|
5295
5338
|
export interface GisViewViewState {
|
|
5296
5339
|
camera: GisViewCamera
|
|
@@ -5459,12 +5502,15 @@ export interface GisViewInitialView {
|
|
|
5459
5502
|
|
|
5460
5503
|
/**
|
|
5461
5504
|
* 适应视图的节点间距兜底:普通「铺满数据范围」让最近节点在屏幕上挤在一起时,
|
|
5462
|
-
* 按 minDistance
|
|
5463
|
-
*
|
|
5505
|
+
* 按 minDistance 反推一个更高的相机比例;节点分布太散、最远节点铺得过开时,
|
|
5506
|
+
* 按 maxDistance 把比例压回来。minDistance / maxDistance 二选一,
|
|
5507
|
+
* 同时给时只启用 maxDistance;相机中心始终沿用普通适应的包围盒中心。
|
|
5464
5508
|
*/
|
|
5465
5509
|
export interface GisViewFitSpacingOptions {
|
|
5466
|
-
/**
|
|
5510
|
+
/** 距离模式一:可见节点中心之间的最小屏幕距离(CSS 像素),默认 24;与 maxDistance 二选一 */
|
|
5467
5511
|
minDistance?: number
|
|
5512
|
+
/** 距离模式二:可见节点里最远一对的中心距不超过这个屏幕距离(CSS 像素);与 minDistance 二选一,同时给时只启用它 */
|
|
5513
|
+
maxDistance?: number
|
|
5468
5514
|
/** 相对普通适应比例的最大放大倍数,默认 0(不限,只受 maxScale 约束);正数表示上限 */
|
|
5469
5515
|
maxZoom?: number
|
|
5470
5516
|
}
|
|
@@ -6724,7 +6770,8 @@ export interface GisViewOptions {
|
|
|
6724
6770
|
initialView?: GisViewInitialView | null
|
|
6725
6771
|
/**
|
|
6726
6772
|
* 适应视图时按可见节点间距兜底(默认关):true 用 minDistance 24 / maxZoom 不限,
|
|
6727
|
-
*
|
|
6773
|
+
* 对象在 minDistance / maxDistance 中二选一,另可改 maxZoom。只在首次默认适应与 fitView() 生效,
|
|
6774
|
+
* 显式 initialView.scale / zoom 优先。
|
|
6728
6775
|
*/
|
|
6729
6776
|
fitSpacing?: boolean | GisViewFitSpacingOptions
|
|
6730
6777
|
/**
|
|
@@ -7880,6 +7927,12 @@ export interface GisViewInstance {
|
|
|
7880
7927
|
/** 只移动视图中心、保持当前比例;返回 this 以便链式调用 */
|
|
7881
7928
|
setCenter(center: [number, number]): GisViewInstance
|
|
7882
7929
|
getBounds(): GisViewBounds
|
|
7930
|
+
/**
|
|
7931
|
+
* 当前可见节点的最近正距离 / 最远距离(CSS 像素,和 fitSpacing 同一套屏幕口径)。
|
|
7932
|
+
* 读数随当前相机比例换算;每个距离带两端节点与同口径的 distance;筛选 / 隐藏后的节点不参与。
|
|
7933
|
+
* 少于两个可见节点时为 null,全部重合时 nearest 为 null、maxDistance 为 0。
|
|
7934
|
+
*/
|
|
7935
|
+
getPointSpacing(): GisViewPointSpacing
|
|
7883
7936
|
/** 缩放联动的基准比例(pointZoomScale / lineZoomScale 共用那一份):缺省是首次适应视图时的 camera.scale */
|
|
7884
7937
|
getZoomBaseScale(): number
|
|
7885
7938
|
/** 重定缩放联动的基准比例:不传就取当下相机的比例(把现在这一屏当成「原样大小」),之后放大缩小都从它算倍数,返回 this */
|
|
@@ -8322,9 +8375,13 @@ export interface GisViewInstance {
|
|
|
8322
8375
|
/**
|
|
8323
8376
|
* 一组节点之间的直接通道 / 线路:两端都必须真实存在且都在传入的 id 集合里,
|
|
8324
8377
|
* 只认通道端点或线路 from / to 的直接绑定,不沿线路穿中间节点,也不返回集合外的边。
|
|
8325
|
-
*
|
|
8378
|
+
* 返回固定拆成 channels / lines 两列;options 写 'channel' / 'line' 只查一类,
|
|
8379
|
+
* 省略或写 'both' 两列都查。没有命中时两列都是空数组。
|
|
8326
8380
|
*/
|
|
8327
|
-
getDirectConnections(
|
|
8381
|
+
getDirectConnections(
|
|
8382
|
+
pointIds: string | number | Array<string | number>,
|
|
8383
|
+
options?: GisViewDirectConnectionKind | GisViewDirectConnectionsOptions
|
|
8384
|
+
): GisViewDirectConnections
|
|
8328
8385
|
/**
|
|
8329
8386
|
* 程序化新增一个通道:第一段是通道信息 `{ from, to, name, id, path, routing, channelProps }`,第二段是线路数据 ——
|
|
8330
8387
|
* 每条按自己的 id 建进通道(id 自动成为 lineIds),第三段是可选的分组信息。只负责新建一个通道:
|