@soonspacejs/plugin-tiles 2.15.13 → 2.15.15

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.
@@ -0,0 +1,21 @@
1
+ /** Emergency-resource ontology IDs and their assets shipped by cesium-to-three. */
2
+ export declare const EMERGENCY_RESOURCE_ICON_BY_ONTOLOGY_ID: {
3
+ readonly OutdoorFireHydrant: "outdoor-hydrant.svg";
4
+ readonly UndergroundHydrant: "outdoor-hydrant-underground.svg";
5
+ readonly AboveGroundHydrant: "outdoor-hydrant-above-ground.svg";
6
+ readonly MunicipalFireHydrants: "municipal-hydrant.svg";
7
+ readonly FireWaterReservoir: "fire-water-pool.svg";
8
+ readonly NaturalWater: "natural-water-source.svg";
9
+ readonly HospitalResourcePoint: "hospital-resource.svg";
10
+ readonly PublicSecurityResourcePoint: "police-resource.svg";
11
+ readonly SupportMaterialPoint: "emergency-supplies.svg";
12
+ readonly FireStation: "fire-station.svg";
13
+ readonly LinkageUnit: "coordination-unit.svg";
14
+ };
15
+ export type EmergencyResourceOntologyId = keyof typeof EMERGENCY_RESOURCE_ICON_BY_ONTOLOGY_ID;
16
+ export declare const EMERGENCY_RESOURCE_ONTOLOGY_IDS: readonly ("OutdoorFireHydrant" | "UndergroundHydrant" | "AboveGroundHydrant" | "MunicipalFireHydrants" | "FireWaterReservoir" | "NaturalWater" | "HospitalResourcePoint" | "PublicSecurityResourcePoint" | "SupportMaterialPoint" | "FireStation" | "LinkageUnit")[];
17
+ export declare function resolveEmergencyResourceIcon(ontologyId: string | null | undefined): string | null;
18
+ export declare function resolvePlotPointImageUrl(source: {
19
+ imageUrl?: string;
20
+ ontologyId?: string;
21
+ }): string | null;
@@ -6,4 +6,6 @@ export type { NormalizedRGBA, StyleOpacityInput, } from './plugins/utils/colorUt
6
6
  export * from './plugins/utils/ArrowUtils';
7
7
  export { PlotPrimitiveBridge, } from './PlotPrimitiveBridge';
8
8
  export type { PlotPrimitiveBridgeOptions, } from './PlotPrimitiveBridge';
9
+ export { EMERGENCY_RESOURCE_ICON_BY_ONTOLOGY_ID, EMERGENCY_RESOURCE_ONTOLOGY_IDS, resolveEmergencyResourceIcon, resolvePlotPointImageUrl, } from './emergency-resource-icons';
10
+ export type { EmergencyResourceOntologyId, } from './emergency-resource-icons';
9
11
  export { plotOrderToRenderOrder, sanitizePlotOrder, } from './plot-order';
@@ -1,3 +1,4 @@
1
+ import { EmergencyResourceOntologyId } from '../emergency-resource-icons';
1
2
  /** 经纬度顶点:[经度°, 纬度°],单位度。 */
2
3
  export type LonLatPoint = [number, number];
3
4
  /** 标绘类别枚举,与 8 个 GisPlot* 子类一一对应;也是桥接器 switch(category) 的分支依据。 */
@@ -41,18 +42,31 @@ export type GisPlotSnapshot<T extends GisPlotBaseOptions = GisPlotBaseOptions> =
41
42
  export type GisPlotArrowSnapshot = GisPlotSnapshot<PlotArrowOptions> & {
42
43
  generatedCoords: LonLatPoint[];
43
44
  };
44
- /** 点标绘形状:'circle' = 圆点,'square' = 方点。 */
45
- export type PlotPointStyle = 'circle' | 'square';
45
+ /** 点标绘形状:圆点、方点或使用米制宽高贴地的图片。 */
46
+ export type PlotPointStyle = 'circle' | 'square' | 'image';
46
47
  /**
47
48
  * 点标绘选项。points[0] 为点中心;size 在 cesium-to-three 侧:
48
49
  * circle 解释为直径、square 解释为边长。
49
50
  */
50
- export type PlotPointOptions = GisPlotBaseOptions & {
51
- /** 点形状:'circle' / 'square' */
52
- pointStyle: PlotPointStyle;
53
- /** 尺寸(米):circle 为直径、square 为边长 */
51
+ export type PlotPointOptions = GisPlotBaseOptions & ({
52
+ /** 普通点形状。 */
53
+ pointStyle: 'circle' | 'square';
54
+ /** 尺寸(米):circle 为直径、square 为边长。 */
54
55
  size: number;
55
- };
56
+ } | {
57
+ /** 图片点。 */
58
+ pointStyle: 'image';
59
+ /** 图片贴地足迹宽度(米)。 */
60
+ imageWidth: number;
61
+ /** 图片贴地足迹高度(米)。 */
62
+ imageHeight: number;
63
+ /** 俯视顺时针旋转角度;0 表示图片顶部朝北。 */
64
+ rotation?: number;
65
+ /** 本体 ID;显式图片 URL 同时存在时优先使用 URL。 */
66
+ ontologyId?: EmergencyResourceOntologyId | (string & {});
67
+ /** 显式图片资源地址。 */
68
+ imageUrl?: string;
69
+ });
56
70
  /**
57
71
  * 折线描边样式:实线 / 虚线。cesium-to-three 贴地折线着色器只支持 solid / dash 两态。
58
72
  */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@soonspacejs/plugin-tiles",
3
3
  "pluginName": "TilesPlugin",
4
- "version": "2.15.13",
4
+ "version": "2.15.15",
5
5
  "description": "3D Tiles plugin for SoonSpace.js",
6
6
  "main": "dist/index.esm.js",
7
7
  "module": "dist/index.esm.js",
@@ -21,7 +21,7 @@
21
21
  "um-3d-tiles-renderer": "^0.4.48",
22
22
  "three": "^0.183.0",
23
23
  "@mapbox/geojson-merge": "^1.1.1",
24
- "cesium-to-three": "^0.1.7",
25
- "soonspacejs": "2.15.13"
24
+ "cesium-to-three": "^0.2.1",
25
+ "soonspacejs": "2.15.15"
26
26
  }
27
27
  }