|
|
|
@@ -1,76 +1,88 @@ |
|
|
|
# DC-SDK |
|
|
|
|
|
|
|
> 数字视觉的 3D 框架,该框架是基于开源项目 Cesium 进行的二次开发,优化了 Cesium 一些操作,通过该框架开发者可以快速的开发 3D 应用。 |
|
|
|
> [主页](http://dc.cavencj.cn) |
|
|
|
[**🇨🇳 中文**]('./README_zh.md') | [**🇬🇧English**]('') |
|
|
|
|
|
|
|
> The SDK is a secondary development based on the open source project Cesium, which optimizes some operations of Cesium and enables developers to quickly develop 3D applications through the framework. |
|
|
|
> [home](http://dc.dvgis.cn) |
|
|
|
|
|
|
|
```warning |
|
|
|
Tips:本框架是 JS+GIS 的框架包。开发者需要有一定的前端技术和 GIS 相关技术 |
|
|
|
Tips:This SDK is JS+GIS framework package. Developers need to have some front-end technology and GIS related technology |
|
|
|
``` |
|
|
|
|
|
|
|
## 使用 |
|
|
|
## Installation |
|
|
|
|
|
|
|
> CDN |
|
|
|
|
|
|
|
```html |
|
|
|
<!--基础包--> |
|
|
|
<!--Basic Package--> |
|
|
|
<script src="/libs/dc-sdk/dc.base.min.js"></script> |
|
|
|
<!--核心包--> |
|
|
|
<!--Core Package--> |
|
|
|
<script src="/libs/dc-sdk/dc.core.min.js"></script> |
|
|
|
<!--插件包--> |
|
|
|
<!--Plugins Package--> |
|
|
|
<script src="/libs/dc-sdk/plugins/dc.plugins.min.js"></script> |
|
|
|
<!--标绘包--> |
|
|
|
<!--Plot Package--> |
|
|
|
<script src="/libs/dc-sdk/plot/dc.plot.min.js"></script> |
|
|
|
<!--覆盖物/要素包--> |
|
|
|
<!--Overlay Package--> |
|
|
|
<script src="/libs/dc-sdk/overlay/dc.overlay.min.js"></script> |
|
|
|
<!--主要样式--> |
|
|
|
<!--Main Style Sheet --> |
|
|
|
<link href="/libs/dc-sdk/dc.core.min.css" rel="stylesheet" type="text/css" /> |
|
|
|
``` |
|
|
|
|
|
|
|
> NPM / YARN |
|
|
|
|
|
|
|
```shell |
|
|
|
yarn add dc-sdk.js |
|
|
|
npm install dc-sdk.js |
|
|
|
``` |
|
|
|
|
|
|
|
> ES6 |
|
|
|
|
|
|
|
```html |
|
|
|
<!--基础包--> |
|
|
|
<!--Basic Package--> |
|
|
|
<script src="/libs/dc-sdk/dc.base.min.js"></script> |
|
|
|
``` |
|
|
|
|
|
|
|
```js |
|
|
|
import '/libs/dc-sdk/dc.core.min' //核心包 |
|
|
|
import 'libs/dc-sdk/plugins/dc.plugins.min' //插件包 |
|
|
|
import 'libs/dc-sdk/plot/dc.plot.min' //标绘包 |
|
|
|
import 'libs/dc-sdk/overlay/dc.overlay.min' // 覆盖物/要素包 |
|
|
|
import 'libs/dc-sdk/dc.core.min.css' // 主要样式 |
|
|
|
import '/libs/dc-sdk/dc.core.min' //Core Package |
|
|
|
import 'libs/dc-sdk/plugins/dc.plugins.min' //Plugins Package |
|
|
|
import 'libs/dc-sdk/plot/dc.plot.min' //Plot Package |
|
|
|
import 'libs/dc-sdk/overlay/dc.overlay.min' // Overlay Package |
|
|
|
import 'libs/dc-sdk/dc.core.min.css' // Main Style Sheet |
|
|
|
``` |
|
|
|
|
|
|
|
> 开始 |
|
|
|
## Start |
|
|
|
|
|
|
|
```js |
|
|
|
DC.ready(() => { |
|
|
|
let viewer = new DC.Viewer(divId) // divId 为一个div节点的Id属性值,如果不传入,会无法初始化3D场景 |
|
|
|
let viewer = new DC.Viewer(divId) // divId is the Id attribute value of a div node. If it is not passed in, the 3D scene cannot be initialized |
|
|
|
}) |
|
|
|
``` |
|
|
|
|
|
|
|
> API |
|
|
|
## Documentation |
|
|
|
|
|
|
|
[Cesium-Api](https://cesium.com/docs/cesiumjs-ref-doc/) |
|
|
|
|
|
|
|
相关文档可查看 [Cesium-Api](https://cesium.com/docs/cesiumjs-ref-doc/) 和 [DC-SDK-Api](http://dc.cavencj.cn/home/#/docs) |
|
|
|
[DC-SDK-Api](http://dc.dvgis.cn/home/#/docs) |
|
|
|
|
|
|
|
## 示例 |
|
|
|
## Demo |
|
|
|
|
|
|
|
|  |  |  |  | |
|
|
|
| :------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------: | |
|
|
|
|  |  |  |  | |
|
|
|
|  | <img src="https://raw.githubusercontent.com/Digital-Visual/dc-sdk-examples/master/images/layer/tileset.png" alt="开始" width="200px" height="150px"/> | <img src="https://raw.githubusercontent.com/Digital-Visual/dc-sdk-examples/master/images/layer/html.png" alt="开始" width="200px" height="150px"/> |  | |
|
|
|
|  |  |  |  | |
|
|
|
|  |  |  |  | |
|
|
|
| :---------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------: | |
|
|
|
|  |  |  |  | |
|
|
|
|  | <img src="https://raw.githubusercontent.com/Digital-Visual/dc-sdk-examples/master/images/layer/tileset.png" alt="开始" width="200px" height="150px"/> | <img src="https://raw.githubusercontent.com/Digital-Visual/dc-sdk-examples/master/images/layer/html.png" alt="开始" width="200px" height="150px"/> |  | |
|
|
|
|  |  |  |  | |
|
|
|
|
|
|
|
[更多>>](http://dc.cavencj.cn/home/#/examples) |
|
|
|
[More>>](http://dc.cavencj.cn/home/#/examples) |
|
|
|
|
|
|
|
## 版权声明 |
|
|
|
## Copyright statement |
|
|
|
|
|
|
|
```warning |
|
|
|
1.框架是一个基本平台,完全开源,任何个人和机构可以修改、重构,无需经过我方授权。 |
|
|
|
2.后期会添加一系列针对性的插件和工具,会适量的开源。 |
|
|
|
3.任何个人和机构在遵守下列条件的前提下可以永久免费使用: |
|
|
|
1)程序包完整引用; |
|
|
|
2)保留此版权信息在控制台输出 我方保留对此版权信息的最终解释权。 |
|
|
|
1. The framework is a basic platform, completely open source, which can be modified and reconstructed by any individual or institution without our authorization. |
|
|
|
2. A series of targeted plug-ins and tools will be added later, and an appropriate amount of open source. |
|
|
|
3. Free and permanent use by any person or institution subject to the following conditions: |
|
|
|
1) complete package reference; |
|
|
|
2) reserve this copyright information in the console output |
|
|
|
We reserve the right of final interpretation of this copyright information. |
|
|
|
``` |
|
|
|
|
|
|
|
## 感谢 |
|
|
|
## Thanks |