@jorgmoritz/gis-manager 0.1.21
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/LICENSE +21 -0
- package/README.md +76 -0
- package/dist/VertexDetailInfo-BoVDy22s.d.cts +79 -0
- package/dist/VertexDetailInfo-BoVDy22s.d.ts +79 -0
- package/dist/index.cjs +10111 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +1891 -0
- package/dist/index.d.ts +1891 -0
- package/dist/index.js +10084 -0
- package/dist/index.js.map +1 -0
- package/dist/vue/index.cjs +9939 -0
- package/dist/vue/index.cjs.map +1 -0
- package/dist/vue/index.d.cts +160 -0
- package/dist/vue/index.d.ts +160 -0
- package/dist/vue/index.js +9936 -0
- package/dist/vue/index.js.map +1 -0
- package/package.json +67 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# @jorgmoritz/gis-manager
|
|
2
|
+
|
|
3
|
+
GIS-Verwaltungsbibliothek basierend auf CesiumJS und TypeScript: Szenenverwaltung, Ebenenverwaltung, Kamerasteuerung, CZML-Unterstützung (Import/Export/Bearbeitung) sowie Vue 3-Adapter.
|
|
4
|
+
|
|
5
|
+
## Funktionen
|
|
6
|
+
|
|
7
|
+
- ESM + CJS Ausgabe, vollständige Typdeklarationen
|
|
8
|
+
- Szenenkonfiguration (Beleuchtung/Schatten/Anfangsansicht/Terrain/Bilder) aus einer Hand
|
|
9
|
+
- Ebenenverwaltung (DEM/DOM/DSM), Kamerasteuerung (Perspektive/Orthogonal/Flug/Pfad), CZML (Import/Export/Bearbeitung)
|
|
10
|
+
- Vue 3 Komponente GisViewer und Composition API useGisViewer
|
|
11
|
+
|
|
12
|
+
**Hinweis:** Cesium-Statische Ressourcen (Assets/Widgets/ThirdParty) müssen von Ihrer Anwendung gehostet werden, und CESIUM_BASE_URL muss korrekt konfiguriert sein.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Installation und Abhängigkeiten
|
|
17
|
+
|
|
18
|
+
Ihre Anwendung muss installieren:
|
|
19
|
+
|
|
20
|
+
```powershell
|
|
21
|
+
npm install @jorgmoritz/gis-manager cesium
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Wenn Sie diese Bibliothek im lokalen Verbindungsmodus (npm link) testen möchten:
|
|
25
|
+
|
|
26
|
+
```powershell
|
|
27
|
+
# Im Stammverzeichnis dieser Bibliothek
|
|
28
|
+
npm run build
|
|
29
|
+
npm link
|
|
30
|
+
|
|
31
|
+
# In Ihrem Testanwendungsverzeichnis
|
|
32
|
+
npm link @jorgmoritz/gis-manager cesium
|
|
33
|
+
npm install cesium --save
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Wichtige Konfiguration: CESIUM_BASE_URL und statische Ressourcen
|
|
39
|
+
|
|
40
|
+
Cesium benötigt im Browser Zugriff auf statische Ressourcenverzeichnisse (Assets, Widgets, ThirdParty). Bitte stellen Sie diese drei Verzeichnisse in Ihrer Anwendung über einen öffentlichen Pfad bereit und rufen Sie die von der Bibliothek bereitgestellte Konfigurationsfunktion auf:
|
|
41
|
+
|
|
42
|
+
```ts
|
|
43
|
+
import { configureCesiumAssets } from '@jorgmoritz/gis-manager';
|
|
44
|
+
|
|
45
|
+
configureCesiumAssets({ baseUrl: '/cesium' });
|
|
46
|
+
// Ihr Server muss sicherstellen, dass die folgenden Pfade zugänglich sind:
|
|
47
|
+
// /cesium/Assets/*
|
|
48
|
+
// /cesium/Widgets/*
|
|
49
|
+
// /cesium/ThirdParty/*
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Skripte
|
|
53
|
+
|
|
54
|
+
Build und Tests:
|
|
55
|
+
|
|
56
|
+
```powershell
|
|
57
|
+
npm run build
|
|
58
|
+
npm test
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Fehlerbehebung
|
|
64
|
+
|
|
65
|
+
- Konsolenwarnung `CESIUM_BASE_URL is not configured`
|
|
66
|
+
- Rufen Sie `configureCesiumAssets({ baseUrl: '/cesium' })` auf und stellen Sie sicher, dass statische Ressourcen vorhanden sind
|
|
67
|
+
- Widget-Stile werden nicht angewendet
|
|
68
|
+
- Stellen Sie sicher, dass `<link rel="stylesheet" href="/cesium/Widgets/widgets.css" />` eingebunden ist
|
|
69
|
+
- Bildkacheln 404 oder CORS-Fehler
|
|
70
|
+
- Überprüfen Sie die Bilddienst-URL, CORS-Richtlinien und Netzwerk-Proxy-Einstellungen
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## Lizenz
|
|
75
|
+
|
|
76
|
+
MIT
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import * as Cesium from 'cesium';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 顶点详细信息
|
|
5
|
+
* 用于向调用者提供完整的顶点上下文信息
|
|
6
|
+
*/
|
|
7
|
+
interface VertexDetailInfo {
|
|
8
|
+
/** 实际索引(包含隐藏爬升点) */
|
|
9
|
+
index: number;
|
|
10
|
+
/** 显示编号(用户可见的序号,跳过隐藏爬升点) */
|
|
11
|
+
displayNumber: number;
|
|
12
|
+
/** 顶点位置(笛卡尔坐标) */
|
|
13
|
+
position: Cesium.Cartesian3;
|
|
14
|
+
/** 经纬度高度坐标 */
|
|
15
|
+
coordinates: {
|
|
16
|
+
/** 经度(度) */
|
|
17
|
+
longitude: number;
|
|
18
|
+
/** 纬度(度) */
|
|
19
|
+
latitude: number;
|
|
20
|
+
/** 高度(米) */
|
|
21
|
+
height: number;
|
|
22
|
+
};
|
|
23
|
+
/** 姿态信息 */
|
|
24
|
+
pose?: {
|
|
25
|
+
/** 航向角(度) */
|
|
26
|
+
heading: number;
|
|
27
|
+
/** 俯仰角(度) */
|
|
28
|
+
pitch: number;
|
|
29
|
+
/** 横滚角(度) */
|
|
30
|
+
roll: number;
|
|
31
|
+
/** 视场角(度) */
|
|
32
|
+
fov: number;
|
|
33
|
+
};
|
|
34
|
+
/** 是否为起点 */
|
|
35
|
+
isStartPoint: boolean;
|
|
36
|
+
/** 是否为隐藏爬升点 */
|
|
37
|
+
isHiddenClimb: boolean;
|
|
38
|
+
/** 是否可删除 */
|
|
39
|
+
canDelete: boolean;
|
|
40
|
+
/** 总顶点数(不含隐藏点) */
|
|
41
|
+
totalVisibleVertices: number;
|
|
42
|
+
/** 总顶点数(包含隐藏点) */
|
|
43
|
+
totalVertices: number;
|
|
44
|
+
/** 实体引用 */
|
|
45
|
+
entity?: Cesium.Entity;
|
|
46
|
+
/** 路径的额外属性 */
|
|
47
|
+
pathProperties?: {
|
|
48
|
+
/** 高度模式 */
|
|
49
|
+
altitudeMode?: string;
|
|
50
|
+
/** 爬升高度 */
|
|
51
|
+
climbHeight?: number;
|
|
52
|
+
/** 是否有隐藏爬升点 */
|
|
53
|
+
hasHiddenClimb?: boolean;
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* 顶点操作事件信息
|
|
58
|
+
* 用于顶点插入、删除等操作的通知
|
|
59
|
+
*/
|
|
60
|
+
interface VertexOperationInfo {
|
|
61
|
+
/** 操作类型 */
|
|
62
|
+
type: 'insert' | 'delete' | 'move' | 'select';
|
|
63
|
+
/** 受影响的顶点索引 */
|
|
64
|
+
index: number;
|
|
65
|
+
/** 显示编号 */
|
|
66
|
+
displayNumber: number;
|
|
67
|
+
/** 操作前的顶点总数 */
|
|
68
|
+
totalVerticesBefore: number;
|
|
69
|
+
/** 操作后的顶点总数 */
|
|
70
|
+
totalVerticesAfter: number;
|
|
71
|
+
/** 对于插入操作,新顶点的详细信息 */
|
|
72
|
+
newVertex?: VertexDetailInfo;
|
|
73
|
+
/** 对于移动操作,新位置 */
|
|
74
|
+
newPosition?: Cesium.Cartesian3;
|
|
75
|
+
/** 时间戳 */
|
|
76
|
+
timestamp: Date;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export type { VertexDetailInfo as V, VertexOperationInfo as a };
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import * as Cesium from 'cesium';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 顶点详细信息
|
|
5
|
+
* 用于向调用者提供完整的顶点上下文信息
|
|
6
|
+
*/
|
|
7
|
+
interface VertexDetailInfo {
|
|
8
|
+
/** 实际索引(包含隐藏爬升点) */
|
|
9
|
+
index: number;
|
|
10
|
+
/** 显示编号(用户可见的序号,跳过隐藏爬升点) */
|
|
11
|
+
displayNumber: number;
|
|
12
|
+
/** 顶点位置(笛卡尔坐标) */
|
|
13
|
+
position: Cesium.Cartesian3;
|
|
14
|
+
/** 经纬度高度坐标 */
|
|
15
|
+
coordinates: {
|
|
16
|
+
/** 经度(度) */
|
|
17
|
+
longitude: number;
|
|
18
|
+
/** 纬度(度) */
|
|
19
|
+
latitude: number;
|
|
20
|
+
/** 高度(米) */
|
|
21
|
+
height: number;
|
|
22
|
+
};
|
|
23
|
+
/** 姿态信息 */
|
|
24
|
+
pose?: {
|
|
25
|
+
/** 航向角(度) */
|
|
26
|
+
heading: number;
|
|
27
|
+
/** 俯仰角(度) */
|
|
28
|
+
pitch: number;
|
|
29
|
+
/** 横滚角(度) */
|
|
30
|
+
roll: number;
|
|
31
|
+
/** 视场角(度) */
|
|
32
|
+
fov: number;
|
|
33
|
+
};
|
|
34
|
+
/** 是否为起点 */
|
|
35
|
+
isStartPoint: boolean;
|
|
36
|
+
/** 是否为隐藏爬升点 */
|
|
37
|
+
isHiddenClimb: boolean;
|
|
38
|
+
/** 是否可删除 */
|
|
39
|
+
canDelete: boolean;
|
|
40
|
+
/** 总顶点数(不含隐藏点) */
|
|
41
|
+
totalVisibleVertices: number;
|
|
42
|
+
/** 总顶点数(包含隐藏点) */
|
|
43
|
+
totalVertices: number;
|
|
44
|
+
/** 实体引用 */
|
|
45
|
+
entity?: Cesium.Entity;
|
|
46
|
+
/** 路径的额外属性 */
|
|
47
|
+
pathProperties?: {
|
|
48
|
+
/** 高度模式 */
|
|
49
|
+
altitudeMode?: string;
|
|
50
|
+
/** 爬升高度 */
|
|
51
|
+
climbHeight?: number;
|
|
52
|
+
/** 是否有隐藏爬升点 */
|
|
53
|
+
hasHiddenClimb?: boolean;
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* 顶点操作事件信息
|
|
58
|
+
* 用于顶点插入、删除等操作的通知
|
|
59
|
+
*/
|
|
60
|
+
interface VertexOperationInfo {
|
|
61
|
+
/** 操作类型 */
|
|
62
|
+
type: 'insert' | 'delete' | 'move' | 'select';
|
|
63
|
+
/** 受影响的顶点索引 */
|
|
64
|
+
index: number;
|
|
65
|
+
/** 显示编号 */
|
|
66
|
+
displayNumber: number;
|
|
67
|
+
/** 操作前的顶点总数 */
|
|
68
|
+
totalVerticesBefore: number;
|
|
69
|
+
/** 操作后的顶点总数 */
|
|
70
|
+
totalVerticesAfter: number;
|
|
71
|
+
/** 对于插入操作,新顶点的详细信息 */
|
|
72
|
+
newVertex?: VertexDetailInfo;
|
|
73
|
+
/** 对于移动操作,新位置 */
|
|
74
|
+
newPosition?: Cesium.Cartesian3;
|
|
75
|
+
/** 时间戳 */
|
|
76
|
+
timestamp: Date;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export type { VertexDetailInfo as V, VertexOperationInfo as a };
|