@soonspacejs/plugin-tiles 2.15.8 → 2.15.9
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 +1 -3
- package/dist/index.esm.js +1074 -559
- package/dist/plot/GroundDecalManager.d.ts +76 -50
- package/dist/plot/PlotPrimitiveBridge.d.ts +61 -0
- package/dist/plot/index.d.ts +9 -0
- package/dist/plot/plot-order.d.ts +15 -0
- package/dist/plot/plugins/arrow.d.ts +17 -14
- package/dist/plot/plugins/base.d.ts +25 -12
- package/dist/plot/plugins/circle.d.ts +3 -5
- package/dist/plot/plugins/line.d.ts +2 -5
- package/dist/plot/plugins/point.d.ts +4 -5
- package/dist/plot/plugins/polygon.d.ts +2 -5
- package/dist/plot/plugins/rectangle.d.ts +2 -6
- package/dist/plot/plugins/sector.d.ts +3 -5
- package/dist/plot/plugins/text.d.ts +4 -5
- package/dist/plot/plugins/types.d.ts +99 -48
- package/dist/plot/plugins/utils/ArrowUtils.d.ts +28 -111
- package/dist/plot/plugins/utils/colorUtils.d.ts +20 -35
- package/dist/terrain-tiles-renderer/TerrainTilesRenderer.d.ts +31 -3
- package/package.json +3 -2
- package/dist/plot/plugins/utils/coordUtils.d.ts +0 -48
|
@@ -1,54 +1,58 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { default as SoonSpace } from 'soonspacejs';
|
|
2
|
+
import { CesiumGroundFrameState } from 'cesium-to-three/ground';
|
|
3
3
|
import { GisPlotBase } from './plugins/base';
|
|
4
4
|
import { GisPlotArrowSnapshot, GisPlotSnapshot, LonLatPoint, PlotAddOptions } from './plugins/types';
|
|
5
|
-
import {
|
|
6
|
-
/** 构造
|
|
5
|
+
import { PlotPrimitiveBridge } from './PlotPrimitiveBridge';
|
|
6
|
+
/** 构造 GroundDecalManager 时的选项(注入 ssp)。 */
|
|
7
7
|
export type GroundDecalManagerOptions = {
|
|
8
|
-
/** SoonSpace
|
|
8
|
+
/** SoonSpace 实例(必传);标绘图元挂载到 ssp.viewport.scene。 */
|
|
9
9
|
ssp: SoonSpace;
|
|
10
|
-
/** 传入后会在首次有图形时自动将 PlotOverlay 注册到该插件 */
|
|
11
|
-
imageOverlayPlugin?: ImageOverlayPlugin;
|
|
12
10
|
};
|
|
13
|
-
/**
|
|
11
|
+
/** getItem / getItemDeep 的联合返回类型(箭头额外带 generatedCoords)。 */
|
|
14
12
|
export type GisPlotItemSnapshot = GisPlotSnapshot | GisPlotArrowSnapshot;
|
|
15
|
-
/**
|
|
16
|
-
* 标绘样式补丁:与 {@link GisPlotBase.update} 一致,允许在基类字段之外带扩展键。
|
|
17
|
-
*/
|
|
13
|
+
/** 标绘样式补丁:与 GisPlotBase.update 一致,允许基类字段之外的扩展键。 */
|
|
18
14
|
export type GisPlotStylePatch = Partial<Parameters<GisPlotBase['update']>[0]> & Record<string, unknown>;
|
|
19
|
-
/**
|
|
20
|
-
* {@link GroundDecalManager.setCenter} 的中心点(度)。
|
|
21
|
-
*/
|
|
15
|
+
/** setCenter 的中心点(lon / lat 均可选;单位度)。 */
|
|
22
16
|
export type CenterLonLat = {
|
|
23
17
|
lon?: number;
|
|
24
18
|
lat?: number;
|
|
25
19
|
};
|
|
20
|
+
/**
|
|
21
|
+
* 地面标绘管理器:与参考项目同名同形,数据 API 逐字保留;
|
|
22
|
+
* 渲染接入收敛到桥接器(PlotPrimitiveBridge)。
|
|
23
|
+
*/
|
|
26
24
|
export declare class GroundDecalManager {
|
|
27
|
-
/** 标绘 id →
|
|
25
|
+
/** 标绘 id → 实例;与桥接器的 shapes 共用同一引用 */
|
|
28
26
|
private readonly _items;
|
|
29
|
-
/**
|
|
27
|
+
/** 标绘管理器 id(对外常量,保持与参考项目一致) */
|
|
30
28
|
readonly id: string;
|
|
31
29
|
/** SoonSpace 实例 */
|
|
32
30
|
readonly ssp: SoonSpace;
|
|
33
|
-
/**
|
|
34
|
-
private
|
|
35
|
-
/**
|
|
31
|
+
/** 渲染桥接器(顶替参考项目的 PlotSdfPlugin) */
|
|
32
|
+
private readonly _bridge;
|
|
33
|
+
/** 桥接器是否已收到 shapes 引用 */
|
|
36
34
|
private _overlayAttached;
|
|
37
|
-
/** 合并同一帧内多次
|
|
35
|
+
/** 合并同一帧内多次 _markDirty,值为 requestAnimationFrame 句柄 */
|
|
38
36
|
private _redrawTimer;
|
|
39
37
|
constructor(options: GroundDecalManagerOptions);
|
|
38
|
+
/** 暴露内部桥接器,业务若需自定义场景接入可选择性使用 */
|
|
39
|
+
get bridge(): PlotPrimitiveBridge;
|
|
40
40
|
/**
|
|
41
|
-
*
|
|
42
|
-
*
|
|
41
|
+
* 兼容参考项目同名 getter:内置桥接器替代 PlotSdfPlugin。
|
|
42
|
+
* 业务旧调用 `decals.plotSdfPlugin` 仍能拿到一个具备 shapes / redraw /
|
|
43
|
+
* opacity / dispose 协议的对象。
|
|
43
44
|
*/
|
|
44
|
-
get plotSdfPlugin():
|
|
45
|
+
get plotSdfPlugin(): PlotPrimitiveBridge;
|
|
45
46
|
/**
|
|
46
|
-
*
|
|
47
|
-
*
|
|
47
|
+
* 兼容参考项目签名:桥接器已在构造时内置,无需外部注入。
|
|
48
|
+
* 调用仅触发一次重绘,便于旧业务无感升级。
|
|
48
49
|
*/
|
|
49
|
-
setPlotSDFPlugin(
|
|
50
|
+
setPlotSDFPlugin(_plugin?: unknown): void;
|
|
50
51
|
/**
|
|
51
|
-
* 添加标绘:由
|
|
52
|
+
* 添加标绘:由 options.type 决定实例化哪一类 GisPlot*。
|
|
53
|
+
*
|
|
54
|
+
* @returns 新建标绘的自增字符串 id。
|
|
55
|
+
* @throws 当 options.type 未知时抛错。
|
|
52
56
|
*/
|
|
53
57
|
addPlot(options: PlotAddOptions): string;
|
|
54
58
|
/** 按 id 移除标绘;存在并删除成功时触发重绘 */
|
|
@@ -56,57 +60,79 @@ export declare class GroundDecalManager {
|
|
|
56
60
|
/** 清空全部标绘 */
|
|
57
61
|
clear(): void;
|
|
58
62
|
/**
|
|
59
|
-
*
|
|
60
|
-
*
|
|
63
|
+
* 读取标绘浅快照(options 为新对象,points 仍共享引用;箭头附带 generatedCoords)。
|
|
64
|
+
*
|
|
65
|
+
* @returns 浅快照;id 不存在时返回 null。
|
|
61
66
|
*/
|
|
62
67
|
getItem(id: string): GisPlotItemSnapshot | null;
|
|
63
68
|
/**
|
|
64
|
-
*
|
|
65
|
-
*
|
|
69
|
+
* 读取标绘深快照:points 等嵌套数组被复制;箭头额外深拷贝 generatedCoords。
|
|
70
|
+
*
|
|
71
|
+
* @returns 深快照;id 不存在时返回 null。
|
|
66
72
|
*/
|
|
67
73
|
getItemDeep(id: string): GisPlotItemSnapshot | null;
|
|
68
74
|
/**
|
|
69
|
-
* 合并更新样式与几何字段(调用对应
|
|
70
|
-
* `patch` 形状需与该 id 下图元类型兼容。
|
|
75
|
+
* 合并更新样式与几何字段(调用对应 GisPlot*.update 做不可变整表替换)。
|
|
71
76
|
*/
|
|
72
77
|
setStyle(id: string, patch: GisPlotStylePatch): void;
|
|
73
78
|
/**
|
|
74
|
-
*
|
|
79
|
+
* 将第一个顶点设为新的经纬度中心(点 / 矩形中心 / 扇心 / 文字锚点等单中心
|
|
80
|
+
* 语义)。**就地修改** points[0](与 update 的不可变风格不同)。
|
|
75
81
|
*/
|
|
76
82
|
setCenter(id: string, center: CenterLonLat): void;
|
|
77
|
-
/**
|
|
83
|
+
/**
|
|
84
|
+
* 整体替换顶点列表(每项为 [lon, lat],深拷贝防止外部引用泄漏)。
|
|
85
|
+
*/
|
|
78
86
|
setCoords(id: string, coords: LonLatPoint[]): void;
|
|
79
|
-
/**
|
|
87
|
+
/**
|
|
88
|
+
* 修改指定下标顶点;coord 分量为 undefined 表示不改该分量。越界静默返回。
|
|
89
|
+
*/
|
|
80
90
|
setCoord(id: string, index: number, coord: Partial<LonLatPoint> | [number?, number?]): void;
|
|
81
|
-
/**
|
|
91
|
+
/**
|
|
92
|
+
* 在 index 处插入一个顶点(可插末尾,越界钳位)。插入顶点深拷贝。
|
|
93
|
+
*/
|
|
82
94
|
insertCoord(id: string, index: number, coord: LonLatPoint): void;
|
|
83
95
|
/**
|
|
84
|
-
*
|
|
85
|
-
* 多边形至少保留 3 点,其余类型至少 2 点(与 `shape.category` 联动)。
|
|
96
|
+
* 删除指定下标顶点。多边形至少保留 3 点,其余至少 2 点;越界 / 触底静默返回。
|
|
86
97
|
*/
|
|
87
98
|
removeCoord(id: string, index: number): void;
|
|
88
|
-
/**
|
|
99
|
+
/**
|
|
100
|
+
* 对所有顶点做经纬度平移(度),就地修改。
|
|
101
|
+
*/
|
|
89
102
|
translateCoords(id: string, dLon: number, dLat: number): void;
|
|
90
|
-
/**
|
|
103
|
+
/**
|
|
104
|
+
* 仅对 category === 'text' 的项更新 options.content。
|
|
105
|
+
*/
|
|
91
106
|
setText(id: string, text: string): void;
|
|
92
|
-
/**
|
|
107
|
+
/**
|
|
108
|
+
* 设置整个标绘层的全局不透明度(0..1)。桥接器内部钳位。
|
|
109
|
+
*/
|
|
93
110
|
setGlobalOpacity(opacity: number): void;
|
|
111
|
+
/**
|
|
112
|
+
* 返回某标绘顶点数(不存在返回 0)。
|
|
113
|
+
*/
|
|
94
114
|
getCoordCount(id: string): number;
|
|
95
115
|
/**
|
|
96
|
-
*
|
|
97
|
-
* 无顶点时返回 `-1`。
|
|
116
|
+
* 在经纬度平面找离 (lon, lat) 最近的顶点下标(平方距离最小);无顶点返回 -1。
|
|
98
117
|
*/
|
|
99
118
|
findNearestCoord(id: string, lon: number, lat: number): number;
|
|
100
|
-
render: () => void;
|
|
101
119
|
/**
|
|
102
|
-
*
|
|
103
|
-
*
|
|
120
|
+
* 宿主每帧调用:在深度纹理渲染之后、renderer.render 之前,
|
|
121
|
+
* 把深度纹理 / 视口 / 相机透传给所有标绘图元。
|
|
122
|
+
*
|
|
123
|
+
* @param frameState 当前帧状态(含 depthTexture / width / height / camera /
|
|
124
|
+
* pixelRatio?)。
|
|
104
125
|
*/
|
|
126
|
+
update(frameState: CesiumGroundFrameState): void;
|
|
127
|
+
/**
|
|
128
|
+
* 触发 SoonSpace 视口刷新;在 _markDirty 合并重绘后调用。
|
|
129
|
+
*/
|
|
130
|
+
render: () => void;
|
|
131
|
+
/** 释放桥接器内部全部图元与场景挂载 */
|
|
105
132
|
dispose(): void;
|
|
106
133
|
/**
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
* `init()` → `hasContent` 能正确返回 true)。
|
|
134
|
+
* 标记下一帧重绘;同帧多次调用只调度一次。
|
|
135
|
+
* 首次有图形时把 _items 交给桥接器(此时 shapes 已有数据,redraw 能正确建图元)。
|
|
110
136
|
*/
|
|
111
137
|
private _markDirty;
|
|
112
138
|
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { Scene } from 'three';
|
|
2
|
+
import { CesiumGroundFrameState } from 'cesium-to-three/ground';
|
|
3
|
+
import { GisPlotBase } from './plugins/base';
|
|
4
|
+
/** 桥接器构造选项 */
|
|
5
|
+
export interface PlotPrimitiveBridgeOptions {
|
|
6
|
+
/** 标绘图元挂载的目标场景 */
|
|
7
|
+
scene: Scene;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* 标绘图元桥接器:把 Map<id, GisPlot*> 同步为一组 CesiumGround*Primitive。
|
|
11
|
+
*/
|
|
12
|
+
export declare class PlotPrimitiveBridge {
|
|
13
|
+
/** 标绘 id → 渲染记录 */
|
|
14
|
+
private readonly _entries;
|
|
15
|
+
/** 由 GroundDecalManager 写入的标绘集合(引用共享) */
|
|
16
|
+
private _shapes;
|
|
17
|
+
/** 全局不透明度(0..1);写入后下次 redraw 生效 */
|
|
18
|
+
private _opacity;
|
|
19
|
+
/** 挂载场景 */
|
|
20
|
+
private readonly _scene;
|
|
21
|
+
/** 已释放标记 */
|
|
22
|
+
private _disposed;
|
|
23
|
+
constructor(options: PlotPrimitiveBridgeOptions);
|
|
24
|
+
/** 接收 GroundDecalManager 交付的 Map */
|
|
25
|
+
set shapes(value: Map<string, GisPlotBase>);
|
|
26
|
+
/** 当前持有的标绘集合(引用,与 GroundDecalManager._items 同一) */
|
|
27
|
+
get shapes(): Map<string, GisPlotBase>;
|
|
28
|
+
/** 全局不透明度,写入时钳到 [0, 1] */
|
|
29
|
+
set opacity(value: number);
|
|
30
|
+
get opacity(): number;
|
|
31
|
+
/**
|
|
32
|
+
* 把 _shapes 同步成图元集合:删除消失的、新增没有的、几何 / 样式变化的重建,
|
|
33
|
+
* 仅可见性 / renderOrder 变化的轻量刷新。
|
|
34
|
+
*/
|
|
35
|
+
redraw(): void;
|
|
36
|
+
/**
|
|
37
|
+
* 宿主每帧调用:把 frameState 透传给所有图元(深度 + 视口 + 相机 + pixelRatio)。
|
|
38
|
+
*/
|
|
39
|
+
update(frameState: CesiumGroundFrameState): void;
|
|
40
|
+
/** 释放全部图元与场景挂载 */
|
|
41
|
+
dispose(): void;
|
|
42
|
+
/**
|
|
43
|
+
* 当前图元是否支持样式热更新(颜色 / 描边等)。
|
|
44
|
+
* 折线(setColor / setWidth)与文字(setText)支持;面类不支持,需重建。
|
|
45
|
+
*/
|
|
46
|
+
private _supportsStyleHotUpdate;
|
|
47
|
+
/**
|
|
48
|
+
* 几何未变时的轻量刷新:
|
|
49
|
+
* - 所有图元:group.visible + setRenderOrder。
|
|
50
|
+
* - 折线:setColor / setWidth / setArrowSizeMeters / setVisible(不重建几何)。
|
|
51
|
+
* - 文字:setText(内容 + 颜色 + 不透明度)/ setVisible(不重建图元)。
|
|
52
|
+
*/
|
|
53
|
+
private _refreshLightweight;
|
|
54
|
+
/**
|
|
55
|
+
* 按 category 实例化对应 cesium-to-three 图元。统一透传 stroke/fill 颜色与
|
|
56
|
+
* 0..100 不透明度,并按全局 opacity 折算(在 0..100 口径上乘 this._opacity)。
|
|
57
|
+
*
|
|
58
|
+
* @returns 渲染图元;未知类型 / 退化情况返回 null。
|
|
59
|
+
*/
|
|
60
|
+
private _buildPrimitive;
|
|
61
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { GroundDecalManager, } from './GroundDecalManager';
|
|
2
|
+
export type { GroundDecalManagerOptions, GisPlotItemSnapshot, GisPlotStylePatch, CenterLonLat, } from './GroundDecalManager';
|
|
3
|
+
export * from './plugins/index';
|
|
4
|
+
export { parseColorToRGBA, resolveOpacity, } from './plugins/utils/colorUtils';
|
|
5
|
+
export type { NormalizedRGBA, StyleOpacityInput, } from './plugins/utils/colorUtils';
|
|
6
|
+
export * from './plugins/utils/ArrowUtils';
|
|
7
|
+
export { PlotPrimitiveBridge, } from './PlotPrimitiveBridge';
|
|
8
|
+
export type { PlotPrimitiveBridgeOptions, } from './PlotPrimitiveBridge';
|
|
9
|
+
export { plotOrderToRenderOrder, sanitizePlotOrder, } from './plot-order';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 将用户侧标绘顺序清洗为有限非负整数。
|
|
3
|
+
* NaN / Infinity / 负数均回退到 0。
|
|
4
|
+
*/
|
|
5
|
+
export declare function sanitizePlotOrder(plotOrder: number): number;
|
|
6
|
+
/**
|
|
7
|
+
* 将唯一 plotOrder 展开为 front-stencil 命令块的基础 renderOrder。
|
|
8
|
+
*
|
|
9
|
+
* 该函数只把已经唯一的 plotOrder 展开为 stencil 管线使用的三个绘制命令。
|
|
10
|
+
* 真正的唯一性由桥接器按 Map 插入序分配 plotOrder 保证;不要把这个函数
|
|
11
|
+
* 当成去重器。
|
|
12
|
+
*
|
|
13
|
+
* @returns 基础 renderOrder = 1000 + plotOrder × 3。
|
|
14
|
+
*/
|
|
15
|
+
export declare function plotOrderToRenderOrder(plotOrder: number): number;
|
|
@@ -1,25 +1,28 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ArrowPolygon } from 'cesium-to-three/arrow';
|
|
2
2
|
import { GisPlotBase } from './base';
|
|
3
3
|
import { GisPlotArrowSnapshot, PlotArrowOptions } from './types';
|
|
4
|
-
/**
|
|
5
|
-
* 箭头标绘(面类)→ {@link PlotArrowOptions}
|
|
6
|
-
*
|
|
7
|
-
* CPU 端由 `./utils/ArrowUtils` 生成闭合多边形 → `generatedCoords`,复用 polygon type 2 渲染。
|
|
8
|
-
* 与折线端点箭头样式(`PlotArrowStyle`)不同。
|
|
9
|
-
*/
|
|
10
4
|
export declare class GisPlotArrow extends GisPlotBase {
|
|
11
5
|
readonly category: "arrow";
|
|
12
6
|
options: PlotArrowOptions;
|
|
13
|
-
/**
|
|
14
|
-
generatedCoords:
|
|
7
|
+
/** generateCoords() 填充的闭合多边形顶点;初始为空 */
|
|
8
|
+
generatedCoords: ArrowPolygon;
|
|
15
9
|
constructor(options: PlotArrowOptions);
|
|
16
|
-
|
|
10
|
+
/** 类型收窄:patch 限定为 PlotArrowOptions 的子集 + 任意扩展键 */
|
|
11
|
+
update(patch: Partial<PlotArrowOptions> & Record<string, unknown>): void;
|
|
17
12
|
/**
|
|
18
|
-
*
|
|
13
|
+
* 根据 arrowType 把控制点转为闭合多边形顶点序列,存入 generatedCoords。
|
|
14
|
+
* 结果已 CCW 规范化、去除连续重复顶点并 clamp 到 ≤120 顶点,
|
|
15
|
+
* 可直接喂给 CesiumGroundPolygonPrimitive。
|
|
16
|
+
*
|
|
17
|
+
* 边界:
|
|
18
|
+
* - 控制点 < 2 → generatedCoords = [],返回 []。
|
|
19
|
+
* - 'fine' / 'assaultDirection' 只用前 2 个控制点。
|
|
20
|
+
* - 'attack' / 'swallowtailAttack' / 'curved' 用全部控制点。
|
|
21
|
+
* - 未知 arrowType 退化为 createFineArrow( cp[0], cp[last] )。
|
|
19
22
|
*/
|
|
20
|
-
generateCoords():
|
|
21
|
-
/**
|
|
23
|
+
generateCoords(): ArrowPolygon;
|
|
24
|
+
/** 浅快照:附带 generatedCoords(每个顶点复制一份,与内部数组解耦) */
|
|
22
25
|
getSnapshot(): GisPlotArrowSnapshot;
|
|
23
|
-
/**
|
|
26
|
+
/** 深快照:options.points 与 generatedCoords 各自每个顶点都是新数组 */
|
|
24
27
|
getSnapshotDeep(): GisPlotArrowSnapshot;
|
|
25
28
|
}
|
|
@@ -1,32 +1,45 @@
|
|
|
1
1
|
import { GisPlotBaseOptions, GisPlotCategory, GisPlotSnapshot, LonLatPoint } from './types';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* 数据结构对齐 {@link GisPlotBaseOptions}:`points` 为 `[[lon, lat], ...]`。
|
|
6
|
-
* 子类在 `options` 中扩展各自字段(如 `size`、`radius`、`arrowType` 等)。
|
|
3
|
+
* 标绘数据模型基类。每个实例是一个**纯数据对象**:只持有 id / category /
|
|
4
|
+
* options,不持有任何 GPU 资源 / Three 对象 / DOM 节点。
|
|
7
5
|
*/
|
|
8
6
|
export declare class GisPlotBase {
|
|
7
|
+
/** 自增字符串 id('1' / '2' / '3' ...) */
|
|
9
8
|
readonly id: string;
|
|
9
|
+
/**
|
|
10
|
+
* 类别。基类构造为空串,子类用 `readonly category = 'xxx' as const` 覆写。
|
|
11
|
+
* 桥接器据此 switch 分支。
|
|
12
|
+
*/
|
|
10
13
|
category: GisPlotCategory;
|
|
14
|
+
/**
|
|
15
|
+
* 标绘选项。基类持 GisPlotBaseOptions,子类用 `declare options: 具体Options`
|
|
16
|
+
* 收窄类型提示。
|
|
17
|
+
*/
|
|
11
18
|
options: GisPlotBaseOptions;
|
|
12
19
|
constructor(options: GisPlotBaseOptions);
|
|
13
20
|
/**
|
|
14
|
-
*
|
|
15
|
-
*
|
|
21
|
+
* 不可变整表替换:用展开 + patch 重建 options。
|
|
22
|
+
* 子类覆写此方法仅为收窄 patch 的类型提示,方法体相同。
|
|
16
23
|
*/
|
|
17
24
|
update(patch: Partial<GisPlotBaseOptions> & Record<string, unknown>): void;
|
|
18
25
|
/**
|
|
19
|
-
*
|
|
20
|
-
*
|
|
26
|
+
* 浅快照:options 是新对象(展开一层),但 options.points 与内部共享引用。
|
|
27
|
+
* 管理器 getItem 默认走这里。
|
|
21
28
|
*/
|
|
22
29
|
getSnapshot(): GisPlotSnapshot;
|
|
23
30
|
/**
|
|
24
|
-
*
|
|
25
|
-
*
|
|
31
|
+
* 深快照:points 每个顶点都是新数组 → 改返回值不影响内部。
|
|
32
|
+
* 管理器 getItemDeep 走这里。
|
|
26
33
|
*/
|
|
27
34
|
getSnapshotDeep(): GisPlotSnapshot;
|
|
28
|
-
/**
|
|
35
|
+
/**
|
|
36
|
+
* 基类默认:返回全部顶点。上层用来算 ENU 参考中心。
|
|
37
|
+
* 子类(point / text / circle / sector 等)可覆写为更紧的语义。
|
|
38
|
+
*/
|
|
29
39
|
getCenterPoints(): LonLatPoint[];
|
|
30
|
-
/**
|
|
40
|
+
/**
|
|
41
|
+
* 基类默认:返回全部顶点。上层用来算最大空间范围。
|
|
42
|
+
* circle / sector 子类覆写为按半径外扩的经纬度包围盒。
|
|
43
|
+
*/
|
|
31
44
|
getExtentPoints(): LonLatPoint[];
|
|
32
45
|
}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { GisPlotBase } from './base';
|
|
2
2
|
import { LonLatPoint, PlotCircleOptions } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* 圆标绘 → {@link PlotCircleOptions}
|
|
5
|
-
* `points[0]` 为圆心;shader type 1。
|
|
6
|
-
*/
|
|
7
3
|
export declare class GisPlotCircle extends GisPlotBase {
|
|
8
4
|
readonly category: "circle";
|
|
9
5
|
options: PlotCircleOptions;
|
|
10
6
|
constructor(options: PlotCircleOptions);
|
|
11
|
-
|
|
7
|
+
/** 类型收窄:patch 限定为 PlotCircleOptions 的子集 + 任意扩展键 */
|
|
8
|
+
update(patch: Partial<PlotCircleOptions> & Record<string, unknown>): void;
|
|
9
|
+
/** 按半径外扩的经纬度包围盒(两点:西南角、东北角) */
|
|
12
10
|
getExtentPoints(): LonLatPoint[];
|
|
13
11
|
}
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import { GisPlotBase } from './base';
|
|
2
2
|
import { PlotLineOptions } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* 折线标绘 → {@link PlotLineOptions}
|
|
5
|
-
* `options.points` 为折线顶点;shader type 3。
|
|
6
|
-
*/
|
|
7
3
|
export declare class GisPlotLine extends GisPlotBase {
|
|
8
4
|
readonly category: "line";
|
|
9
5
|
options: PlotLineOptions;
|
|
10
6
|
constructor(options: PlotLineOptions);
|
|
11
|
-
|
|
7
|
+
/** 类型收窄:patch 限定为 PlotLineOptions 的子集 + 任意扩展键 */
|
|
8
|
+
update(patch: Partial<PlotLineOptions> & Record<string, unknown>): void;
|
|
12
9
|
}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { GisPlotBase } from './base';
|
|
2
2
|
import { LonLatPoint, PlotPointOptions } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* 点标绘 → {@link PlotPointOptions}
|
|
5
|
-
* `options.points[0]` 为点的中心;shader type 6。
|
|
6
|
-
*/
|
|
7
3
|
export declare class GisPlotPoint extends GisPlotBase {
|
|
8
4
|
readonly category: "point";
|
|
9
5
|
options: PlotPointOptions;
|
|
10
6
|
constructor(options: PlotPointOptions);
|
|
11
|
-
|
|
7
|
+
/** 类型收窄:patch 限定为 PlotPointOptions 的子集 + 任意扩展键 */
|
|
8
|
+
update(patch: Partial<PlotPointOptions> & Record<string, unknown>): void;
|
|
9
|
+
/** 单中心语义:只取 points[0] */
|
|
12
10
|
getCenterPoints(): LonLatPoint[];
|
|
11
|
+
/** 范围与中心相同(点无几何外扩) */
|
|
13
12
|
getExtentPoints(): LonLatPoint[];
|
|
14
13
|
}
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import { GisPlotBase } from './base';
|
|
2
2
|
import { PlotPolygonOptions } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* 多边形标绘 → {@link PlotPolygonOptions}
|
|
5
|
-
* 至少 3 个顶点;shader type 2。
|
|
6
|
-
*/
|
|
7
3
|
export declare class GisPlotPolygon extends GisPlotBase {
|
|
8
4
|
readonly category: "polygon";
|
|
9
5
|
options: PlotPolygonOptions;
|
|
10
6
|
constructor(options: PlotPolygonOptions);
|
|
11
|
-
|
|
7
|
+
/** 类型收窄:patch 限定为 PlotPolygonOptions 的子集 + 任意扩展键 */
|
|
8
|
+
update(patch: Partial<PlotPolygonOptions> & Record<string, unknown>): void;
|
|
12
9
|
}
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import { GisPlotBase } from './base';
|
|
2
2
|
import { PlotRectangleOptions } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* 矩形标绘 → {@link PlotRectangleOptions}
|
|
5
|
-
* `points` 为 4 个角点 [[lon,lat], ...],按顺/逆时针排列;
|
|
6
|
-
* 渲染端以多边形方式绘制(shader type 2)。
|
|
7
|
-
*/
|
|
8
3
|
export declare class GisPlotRectangle extends GisPlotBase {
|
|
9
4
|
readonly category: "rectangle";
|
|
10
5
|
options: PlotRectangleOptions;
|
|
11
6
|
constructor(options: PlotRectangleOptions);
|
|
12
|
-
|
|
7
|
+
/** 类型收窄:patch 限定为 PlotRectangleOptions 的子集 + 任意扩展键 */
|
|
8
|
+
update(patch: Partial<PlotRectangleOptions> & Record<string, unknown>): void;
|
|
13
9
|
}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { GisPlotBase } from './base';
|
|
2
2
|
import { LonLatPoint, PlotSectorOptions } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* 扇形标绘 → {@link PlotSectorOptions}
|
|
5
|
-
* `points[0]` 为扇心;shader type 5。
|
|
6
|
-
*/
|
|
7
3
|
export declare class GisPlotSector extends GisPlotBase {
|
|
8
4
|
readonly category: "sector";
|
|
9
5
|
options: PlotSectorOptions;
|
|
10
6
|
constructor(options: PlotSectorOptions);
|
|
11
|
-
|
|
7
|
+
/** 类型收窄:patch 限定为 PlotSectorOptions 的子集 + 任意扩展键 */
|
|
8
|
+
update(patch: Partial<PlotSectorOptions> & Record<string, unknown>): void;
|
|
9
|
+
/** 按半径外扩的经纬度包围盒(与 GisPlotCircle 完全一致;不区分扇区角度) */
|
|
12
10
|
getExtentPoints(): LonLatPoint[];
|
|
13
11
|
}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { GisPlotBase } from './base';
|
|
2
2
|
import { LonLatPoint, PlotTextOptions } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* 文本标绘 → {@link PlotTextOptions}
|
|
5
|
-
* `points[0]` 为标签锚点;shader type 4(label atlas)。
|
|
6
|
-
*/
|
|
7
3
|
export declare class GisPlotText extends GisPlotBase {
|
|
8
4
|
readonly category: "text";
|
|
9
5
|
options: PlotTextOptions;
|
|
10
6
|
constructor(options: PlotTextOptions);
|
|
11
|
-
|
|
7
|
+
/** 类型收窄:patch 限定为 PlotTextOptions 的子集 + 任意扩展键 */
|
|
8
|
+
update(patch: Partial<PlotTextOptions> & Record<string, unknown>): void;
|
|
9
|
+
/** 单锚点语义:只取 points[0] */
|
|
12
10
|
getCenterPoints(): LonLatPoint[];
|
|
11
|
+
/** 范围与中心相同(文本无几何外扩) */
|
|
13
12
|
getExtentPoints(): LonLatPoint[];
|
|
14
13
|
}
|