ngx-cesium
ngx-cesium is a cesium component for Angular.
Usage
-
Install
npm install --save ngx-cesium@latest -
Set in the
.angular-cli.json(@angular/cli)
"assets":,"styles":,"scripts": -
Add
cesium-typings
totypings.d.ts
/// -
Set
CESIUM_BASE_URL
in main.tswindow = '/assets/scripts/cesium'; // 设置cesium请求资源的基本路径// window['CESIUM_BASE_URL']需在应用启动之前设置platformBrowserDynamic.bootstrapModuleAppModule; -
Add the
NgxCesiumModule
; -
Use in Template
-
Use in Component
viewerOptions: ViewerOptions;viewer: Viewer;constructoronViewerReady$event: Viewer
API
Inputs
viewerOptions
(any
) - 创建Cesium.Viewer的属性配置
Outputs
viewerReady
- 准备就绪后会触发该事件,参数$event为Cesium.Viewer
Instance Method
- 无
Develop
```shell
npm install // 安装依赖包
npm start // 启动项目
```