@gausslib/gauss-core 0.0.8 → 0.0.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.
|
@@ -4,4 +4,13 @@
|
|
|
4
4
|
* @Description:
|
|
5
5
|
*/
|
|
6
6
|
import { Viewer } from 'cesium';
|
|
7
|
+
/**
|
|
8
|
+
* Cesium 默认配置项
|
|
9
|
+
*/
|
|
7
10
|
export declare const defaultViewerOptions: Partial<Viewer.ConstructorOptions>;
|
|
11
|
+
/**
|
|
12
|
+
* Gauss 扩展类型
|
|
13
|
+
**/
|
|
14
|
+
export interface GaussViewerOptions extends Viewer.ConstructorOptions {
|
|
15
|
+
debug?: boolean;
|
|
16
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @Author: jc
|
|
3
|
+
* @Date: 2026/1/14 20:00
|
|
4
|
+
* @Description:
|
|
5
|
+
*/
|
|
6
|
+
export declare class Logger {
|
|
7
|
+
private _debug;
|
|
8
|
+
constructor(debug?: boolean);
|
|
9
|
+
info(...args: any[]): void;
|
|
10
|
+
error(...args: any[]): void;
|
|
11
|
+
warn(...args: any[]): void;
|
|
12
|
+
setDebug(enable: boolean): void;
|
|
13
|
+
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
* @Author: jc
|
|
3
|
-
* @Date: 2025/12/27 16:38
|
|
4
|
-
* @Description: Cesium Viewer 封装类
|
|
5
|
-
*/
|
|
6
|
-
import * as Cesium from 'cesium';
|
|
1
|
+
import type { GaussViewerOptions } from "@/core/config/viewerOptions";
|
|
7
2
|
export declare class Viewer {
|
|
8
3
|
private viewer;
|
|
9
|
-
|
|
4
|
+
private logger;
|
|
5
|
+
/**
|
|
6
|
+
* 创建 Viewer
|
|
7
|
+
* @param container - 容器元素
|
|
8
|
+
* @param options - 配置项
|
|
9
|
+
*/
|
|
10
|
+
constructor(container: string | HTMLElement, options?: GaussViewerOptions);
|
|
10
11
|
/**
|
|
11
12
|
* 销毁 Viewer
|
|
12
13
|
*/
|
package/dist/gauss-core.js
CHANGED
|
@@ -19452,7 +19452,7 @@ function Tp(e, t) {
|
|
|
19452
19452
|
})
|
|
19453
19453
|
);
|
|
19454
19454
|
}
|
|
19455
|
-
const
|
|
19455
|
+
const qp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
19456
19456
|
__proto__: null,
|
|
19457
19457
|
along: xf,
|
|
19458
19458
|
angle: Ef,
|
|
@@ -19638,33 +19638,62 @@ const Fp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
19638
19638
|
voronoi: Tp
|
|
19639
19639
|
}, Symbol.toStringTag, { value: "Module" })), Op = {
|
|
19640
19640
|
animation: !1,
|
|
19641
|
-
//
|
|
19641
|
+
// 是否显示动画控件
|
|
19642
19642
|
timeline: !1,
|
|
19643
|
-
//
|
|
19643
|
+
// 是否显示时间轴控件
|
|
19644
19644
|
baseLayerPicker: !1,
|
|
19645
|
-
//
|
|
19645
|
+
// 是否显示底图选择器
|
|
19646
19646
|
geocoder: !1,
|
|
19647
|
-
//
|
|
19647
|
+
// 是否显示地理编码搜索框
|
|
19648
19648
|
sceneModePicker: !1,
|
|
19649
|
-
//
|
|
19649
|
+
// 是否显示场景模式切换
|
|
19650
19650
|
homeButton: !1,
|
|
19651
|
-
//
|
|
19651
|
+
// 是否显示 Home 按钮
|
|
19652
19652
|
fullscreenButton: !1,
|
|
19653
|
-
//
|
|
19653
|
+
// 是否显示全屏按钮
|
|
19654
19654
|
navigationHelpButton: !1,
|
|
19655
|
-
//
|
|
19655
|
+
// 是否显示帮助按钮
|
|
19656
19656
|
infoBox: !1,
|
|
19657
|
-
//
|
|
19658
|
-
selectionIndicator: !1
|
|
19659
|
-
//
|
|
19657
|
+
// 是否显示 InfoBox(点击实体弹出的信息框)
|
|
19658
|
+
selectionIndicator: !1,
|
|
19659
|
+
// 是否显示选中指示器(黄色方框)
|
|
19660
|
+
vrButton: !1,
|
|
19661
|
+
// 是否显示 VR 模式按钮(WebXR)
|
|
19662
|
+
shadows: !1
|
|
19663
|
+
// 是否显示阴影
|
|
19660
19664
|
};
|
|
19661
|
-
class
|
|
19665
|
+
class Rp {
|
|
19666
|
+
_debug;
|
|
19667
|
+
constructor(t = !1) {
|
|
19668
|
+
this._debug = t;
|
|
19669
|
+
}
|
|
19670
|
+
info(...t) {
|
|
19671
|
+
this._debug && console.log("[Gauss]", ...t);
|
|
19672
|
+
}
|
|
19673
|
+
error(...t) {
|
|
19674
|
+
console.error("[Gauss]", ...t);
|
|
19675
|
+
}
|
|
19676
|
+
warn(...t) {
|
|
19677
|
+
console.warn("[Gauss]", ...t);
|
|
19678
|
+
}
|
|
19679
|
+
setDebug(t) {
|
|
19680
|
+
this._debug = t;
|
|
19681
|
+
}
|
|
19682
|
+
}
|
|
19683
|
+
class Bp {
|
|
19662
19684
|
viewer;
|
|
19685
|
+
logger;
|
|
19686
|
+
/**
|
|
19687
|
+
* 创建 Viewer
|
|
19688
|
+
* @param container - 容器元素
|
|
19689
|
+
* @param options - 配置项
|
|
19690
|
+
*/
|
|
19663
19691
|
constructor(t, i) {
|
|
19664
|
-
|
|
19692
|
+
const { debug: s = !0, ...o } = i || {};
|
|
19693
|
+
this.logger = new Rp(s), this.viewer = new yf.Viewer(t, {
|
|
19665
19694
|
...Op,
|
|
19666
|
-
...
|
|
19667
|
-
});
|
|
19695
|
+
...o
|
|
19696
|
+
}), this.logger.info("初始化成功");
|
|
19668
19697
|
}
|
|
19669
19698
|
/**
|
|
19670
19699
|
* 销毁 Viewer
|
|
@@ -19673,10 +19702,10 @@ class qp {
|
|
|
19673
19702
|
this.viewer && this.viewer.destroy();
|
|
19674
19703
|
}
|
|
19675
19704
|
}
|
|
19676
|
-
const
|
|
19705
|
+
const Gp = "0.1.0";
|
|
19677
19706
|
export {
|
|
19678
19707
|
yf as Cesium,
|
|
19679
|
-
|
|
19680
|
-
|
|
19681
|
-
|
|
19708
|
+
Bp as Viewer,
|
|
19709
|
+
qp as turf,
|
|
19710
|
+
Gp as version
|
|
19682
19711
|
};
|