| <img src="https://img.shields.io/github/workflow/status/dvgis/dc-sdk/publish"/> | <img src="https://img.shields.io/github/workflow/status/dvgis/dc-sdk/publish"/> | ||||
| <img src="https://img.shields.io/badge/license-Apache%202-blue"/> | <img src="https://img.shields.io/badge/license-Apache%202-blue"/> | ||||
| <img src="https://img.shields.io/npm/v/@dvgis/dc-sdk?color=orange&logo=npm" /> | <img src="https://img.shields.io/npm/v/@dvgis/dc-sdk?color=orange&logo=npm" /> | ||||
| <img src="https://img.shields.io/npm/dm/@dvgis/dc-sdk?logo=npm"/> | |||||
| <img src="https://img.shields.io/npm/dt/@dvgis/dc-sdk?logo=npm"/> | |||||
| </p> | </p> | ||||
| [**🇨🇳 中文**](./README_zh.md) | [**🇬🇧English**](./README.md) | [**🇨🇳 中文**](./README_zh.md) | [**🇬🇧English**](./README.md) | ||||
| > DC-SDK is based on Cesium for secondary development of 2, 3D all-in-one WebGis application framework, the framework optimizes the use of Cesium and add some additional features, designed for developers to quickly build WebGis applications. | |||||
| **_`DC-SDK`_** is based on the open source project **_`Cesium`_** for the second development of two three-dimensional **_`WebGis`_** application framework , the framework optimizes the use of **_`Cesium`_** and adds some additional features , designed for developers to quickly build **_`WebGis`_** application. | |||||
| ## Home | ## Home | ||||
| > http://dc.dvgis.cn | > http://dc.dvgis.cn | ||||
| ```warningH | |||||
| ```warning | |||||
| Tips:This SDK is JS+GIS framework package. Developers need to have some front-end technology and GIS related technology | Tips:This SDK is JS+GIS framework package. Developers need to have some front-end technology and GIS related technology | ||||
| ``` | ``` | ||||
| ## Installation | ## 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> | |||||
| <!--Main Style Sheet --> | |||||
| <link href="libs/dc-sdk/dc.core.min.css" rel="stylesheet" type="text/css" /> | |||||
| ``` | |||||
| `NPM / YARN` **_`(Recommend)`_** | |||||
| `NPM / YARN` | |||||
| Installing with NPM or YARN is recommended and it works seamlessly with webpack. | |||||
| ```shell | |||||
| ```node | |||||
| yarn add @dvgis/dc-sdk | yarn add @dvgis/dc-sdk | ||||
| ------------------------- | |||||
| npm install @dvgis/dc-sdk | npm install @dvgis/dc-sdk | ||||
| ``` | ``` | ||||
| ```js | ```js | ||||
| import DC from '@dvgis/dc-base' //Basic Package | |||||
| import DcCore from '@dvgis/dc-core' //Core Package | |||||
| import '@dvgis/dc-core/dist/dc.core.min.css' // Main Style Sheet | |||||
| import DC from '@dvgis/dc-sdk/dist/dc.base.min' | |||||
| import DcCore from '@dvgis/dc-sdk/dist/dc.core.min' | |||||
| import DcChart from '@dvgis/dc-sdk/dist/dc.chart.min' | |||||
| import DcMapv from '@dvgis/dc-sdk/dist/dc.mapv.min' | |||||
| import '@dvgis/dc-sdk/dist/dc.core.min.css' | |||||
| ``` | ``` | ||||
| ## Setting | |||||
| `NPM / YARN` **_`(On-demand)`_** | |||||
| ```node | |||||
| yarn add @dvgis/dc-base | |||||
| yarn add @dvgis/dc-core | |||||
| yarn add @dvgis/dc-chart | |||||
| yarn add @dvgis/dc-mapv | |||||
| ------------------------- | |||||
| npm install @dvgis/dc-base | |||||
| npm install @dvgis/dc-core | |||||
| npm install @dvgis/dc-chart | |||||
| npm install @dvgis/dc-mapv | |||||
| ``` | |||||
| ```js | |||||
| import DC from '@dvgis/dc-base' | |||||
| import DcCore from '@dvgis/dc-core' | |||||
| import DcChart from '@dvgis/dc-chart' | |||||
| import DcMapv from '@dvgis/dc-mapv' | |||||
| import '@dvgis/dc-core/dist/dc.core.min.css' | |||||
| ``` | |||||
| `CDN` | |||||
| [Resources](https://github.com/dvgis/dc-sdk/releases) | |||||
| ```html | |||||
| <script src="https://cdn.jsdelivr.net/npm/@dvgis/dc-sdk/dist/dc.base.min.js"></script> | |||||
| <script src="https://cdn.jsdelivr.net/npm/@dvgis/dc-sdk/dist/dc.core.min.js"></script> | |||||
| <script src="https://cdn.jsdelivr.net/npm/@dvgis/dc-sdk/dist/dc.chart.min.js"></script> | |||||
| <script src="https://cdn.jsdelivr.net/npm/@dvgis/dc-sdk/dist/dc.mapv.min.js"></script> | |||||
| <link | |||||
| href="https://cdn.jsdelivr.net/npm/@dvgis/dc-sdk/dist/dc.core.min.css" | |||||
| rel="stylesheet" | |||||
| type="text/css" | |||||
| /> | |||||
| ``` | |||||
| ``` | |||||
| Please put the resources in the project root directory libs/dc-sdk, if you put it in other directory, the framework will not run properly. | |||||
| ``` | |||||
| ## Configuration | |||||
| > The configuration is mainly used in the `NPM / YARN` way | |||||
| Since the DC framework sets `CESIUM_BASE_URL` to `JSON.stringify('. /libs/dc-sdk/resources/')`, you need to copy `Cesium` static resource files: `Assets`, `Workers`, `ThirdParty` to the `libs/dc-sdk/resources` directory of the project to ensure that the 3D scene can be rendered properly. | |||||
| `Webpack` | `Webpack` | ||||
| ```js | |||||
| // webpack.config.js | |||||
| [Project Template](https://github.com/cavencj/dc-vue-app) | |||||
| ```js | |||||
| // webpack.config.js | |||||
| const path = require('path') | const path = require('path') | ||||
| const CopywebpackPlugin = require('copy-webpack-plugin') | const CopywebpackPlugin = require('copy-webpack-plugin') | ||||
| const dvgisDist = './node_modules/@dvgis' | const dvgisDist = './node_modules/@dvgis' | ||||
| module.exports = { | module.exports = { | ||||
| // other settings | |||||
| plugins:[ | |||||
| plugins: [ | |||||
| new CopyWebpackPlugin([ | new CopyWebpackPlugin([ | ||||
| { | |||||
| { | |||||
| from: path.join(dvgisDist, 'dc-sdk/dist/resources'), | from: path.join(dvgisDist, 'dc-sdk/dist/resources'), | ||||
| to: 'libs/dc-sdk/resources' | |||||
| } | |||||
| ]) | |||||
| ] | |||||
| to: 'libs/dc-sdk/resources', | |||||
| }, | |||||
| ]), | |||||
| ], | |||||
| } | } | ||||
| ``` | ``` | ||||
| `Vue2.x` | `Vue2.x` | ||||
| [Project Template](https://github.com/dvgis/dc-vue) | |||||
| ```js | ```js | ||||
| // vue.config.js | // vue.config.js | ||||
| const path = require('path') | const path = require('path') | ||||
| const CopywebpackPlugin = require('copy-webpack-plugin') | const CopywebpackPlugin = require('copy-webpack-plugin') | ||||
| const dvgisDist = './node_modules/@dvgis' | const dvgisDist = './node_modules/@dvgis' | ||||
| module.exports = { | module.exports = { | ||||
| // other settings | |||||
| chainWebpack: config => { | |||||
| config.resolve.alias.set('dvgis', path.resolve(__dirname, dvgisDist)) | |||||
| chainWebpack: (config) => { | |||||
| config.plugin('copy').use(CopywebpackPlugin, [ | config.plugin('copy').use(CopywebpackPlugin, [ | ||||
| [ | [ | ||||
| { | { | ||||
| from: path.join(dvgisDist, 'dc-sdk/dist/resources'), | from: path.join(dvgisDist, 'dc-sdk/dist/resources'), | ||||
| to: 'libs/dc-sdk/resources' | |||||
| } | |||||
| ] | |||||
| to: 'libs/dc-sdk/resources', | |||||
| }, | |||||
| ], | |||||
| ]) | ]) | ||||
| } | |||||
| }, | |||||
| } | } | ||||
| ``` | ``` | ||||
| `Vue3.x` | `Vue3.x` | ||||
| [Project Template](https://github.com/dvgis/dc-vue-next) | |||||
| ```js | ```js | ||||
| // vue.config.js | // vue.config.js | ||||
| const path = require('path') | const path = require('path') | ||||
| const CopywebpackPlugin = require('copy-webpack-plugin') | const CopywebpackPlugin = require('copy-webpack-plugin') | ||||
| const dvgisDist = './node_modules/@dvgis' | const dvgisDist = './node_modules/@dvgis' | ||||
| module.exports = { | module.exports = { | ||||
| // other settings | |||||
| chainWebpack: config => { | |||||
| config.resolve.alias.set('dvgis', path.resolve(__dirname, dvgisDist)) | |||||
| chainWebpack: (config) => { | |||||
| config.plugin('copy').use(CopywebpackPlugin, [ | config.plugin('copy').use(CopywebpackPlugin, [ | ||||
| { | { | ||||
| patterns: [ | patterns: [ | ||||
| to: path.join(__dirname, 'dist', 'libs/dc-sdk/resources'), | to: path.join(__dirname, 'dist', 'libs/dc-sdk/resources'), | ||||
| }, | }, | ||||
| ], | ], | ||||
| } | |||||
| }, | |||||
| ]) | ]) | ||||
| } | |||||
| }, | |||||
| } | } | ||||
| ``` | ``` | ||||
| ## Start | ## Start | ||||
| ```js | ```js | ||||
| <img src="http://dc.dvgis.cn/examples/images/base/q2.png?v=6" style="width:60px;height:60px" title="Cesium开心农场"/> | <img src="http://dc.dvgis.cn/examples/images/base/q2.png?v=6" style="width:60px;height:60px" title="Cesium开心农场"/> | ||||
| </p> | </p> | ||||
| ## Copyright | ## Copyright | ||||
| ```warning | ```warning |
| <img src="https://img.shields.io/github/workflow/status/dvgis/dc-sdk/publish"/> | <img src="https://img.shields.io/github/workflow/status/dvgis/dc-sdk/publish"/> | ||||
| <img src="https://img.shields.io/badge/license-Apache%202-blue"/> | <img src="https://img.shields.io/badge/license-Apache%202-blue"/> | ||||
| <img src="https://img.shields.io/npm/v/@dvgis/dc-sdk?color=orange&logo=npm" /> | <img src="https://img.shields.io/npm/v/@dvgis/dc-sdk?color=orange&logo=npm" /> | ||||
| <img src="https://img.shields.io/npm/dm/@dvgis/dc-sdk?logo=npm"/> | |||||
| <img src="https://img.shields.io/npm/dt/@dvgis/dc-sdk?logo=npm"/> | |||||
| </p> | </p> | ||||
| [**🇨🇳 中文**](./README_zh.md) | [**🇬🇧English**](./README.md) | [**🇨🇳 中文**](./README_zh.md) | [**🇬🇧English**](./README.md) | ||||
| ## 安装 | ## 安装 | ||||
| `NPM / YARN` **_`(推荐使用)`_** | |||||
| NPM / YARN 的方式安装,它能更好地和 `webpack` 打包工具配合使用。 | |||||
| ```node | |||||
| yarn add @dvgis/dc-sdk | |||||
| ------------------------- | |||||
| npm install @dvgis/dc-sdk | |||||
| ``` | |||||
| ```js | |||||
| import DC from '@dvgis/dc-sdk/dist/dc.base.min' //基础包 | |||||
| import DcCore from '@dvgis/dc-sdk/dist/dc.core.min' //核心包 | |||||
| import DcChart from '@dvgis/dc-sdk/dist/dc.chart.min' //chart包 | |||||
| import DcMapv from '@dvgis/dc-sdk/dist/dc.mapv.min' //mapv包 | |||||
| import '@dvgis/dc-sdk/dist/dc.core.min.css' // 主要样式 | |||||
| ``` | |||||
| `NPM / YARN` **_`(按需安装)`_** | |||||
| ```node | |||||
| yarn add @dvgis/dc-base | |||||
| yarn add @dvgis/dc-core | |||||
| yarn add @dvgis/dc-chart | |||||
| yarn add @dvgis/dc-mapv | |||||
| ------------------------- | |||||
| npm install @dvgis/dc-base | |||||
| npm install @dvgis/dc-core | |||||
| npm install @dvgis/dc-chart | |||||
| npm install @dvgis/dc-mapv | |||||
| ``` | |||||
| ```js | |||||
| import DC from '@dvgis/dc-base' //基础包 | |||||
| import DcCore from '@dvgis/dc-core' //核心包 | |||||
| import DcChart from '@dvgis/dc-chart' //chart包 | |||||
| import DcMapv from '@dvgis/dc-mapv' //mapv包 | |||||
| import '@dvgis/dc-core/dist/dc.core.min.css' // 主要样式 | |||||
| ``` | |||||
| `CDN` | `CDN` | ||||
| [Resources 下载链接](https://github.com/dvgis/dc-sdk/releases) | |||||
| ```html | ```html | ||||
| <!--基础包--> | <!--基础包--> | ||||
| <script src="libs/dc-sdk/dc.base.min.js"></script> | |||||
| <script src="https://cdn.jsdelivr.net/npm/@dvgis/dc-sdk/dist/dc.base.min.js"></script> | |||||
| <!--核心包--> | <!--核心包--> | ||||
| <script src="libs/dc-sdk/dc.core.min.js"></script> | |||||
| <script src="https://cdn.jsdelivr.net/npm/@dvgis/dc-sdk/dist/dc.core.min.js"></script> | |||||
| <!--chart包--> | |||||
| <script src="https://cdn.jsdelivr.net/npm/@dvgis/dc-sdk/dist/dc.chart.min.js"></script> | |||||
| <!--mapv包--> | |||||
| <script src="https://cdn.jsdelivr.net/npm/@dvgis/dc-sdk/dist/dc.mapv.min.js"></script> | |||||
| <!--主要样式--> | <!--主要样式--> | ||||
| <link href="libs/dc-sdk/dc.core.min.css" rel="stylesheet" type="text/css" /> | |||||
| <link | |||||
| href="https://cdn.jsdelivr.net/npm/@dvgis/dc-sdk/dist/dc.core.min.css" | |||||
| rel="stylesheet" | |||||
| type="text/css" | |||||
| /> | |||||
| ``` | ``` | ||||
| `NPM / YARN` | |||||
| ```shell | |||||
| yarn add @dvgis/dc-sdk | |||||
| npm install @dvgis/dc-sdk | |||||
| ``` | ``` | ||||
| ```js | |||||
| import DC from 'dvgis/dc-sdk/dist/dc.base.min' //基础包 | |||||
| import DcCore from 'dvgis/dc-sdk/dist/dc.core.min' //核心包 | |||||
| import 'dvgis/dc-sdk/dist/dc.core.min.css' // 主要样式 | |||||
| 请将 resources 放置工程根目录 libs/dc-sdk 下,如果放置到其他目录下,框架将无法正常运行 | |||||
| ``` | ``` | ||||
| ## 配置 | ## 配置 | ||||
| > 配置主要用于 `NPM / YARN` 的方式 | |||||
| 由于 DC 框架中将 `CESIUM_BASE_URL` 设置为 `JSON.stringify('./libs/dc-sdk/resources/')`,这样需将 `Cesium` 相关的静态资源文件: `Assets`、`Workers` 、`ThirdParty` 复制到工程的 `libs/dc-sdk/resources` 目录下以保证三维场景能够正常呈现 | |||||
| `Webpack` | `Webpack` | ||||
| [工程模板](https://github.com/cavencj/dc-vue-app) | |||||
| ```js | ```js | ||||
| // webpack.config.js | |||||
| // webpack.config.js | |||||
| const path = require('path') | const path = require('path') | ||||
| const CopywebpackPlugin = require('copy-webpack-plugin') | const CopywebpackPlugin = require('copy-webpack-plugin') | ||||
| const dvgisDist = './node_modules/@dvgis' | const dvgisDist = './node_modules/@dvgis' | ||||
| module.exports = { | module.exports = { | ||||
| // 其他配置 | |||||
| resolve: { | |||||
| alias: { | |||||
| dvgis: path.resolve(__dirname, dvgisDist) | |||||
| } | |||||
| }, | |||||
| plugins:[ | |||||
| plugins: [ | |||||
| new CopyWebpackPlugin([ | new CopyWebpackPlugin([ | ||||
| { | |||||
| { | |||||
| from: path.join(dvgisDist, 'dc-sdk/dist/resources'), | from: path.join(dvgisDist, 'dc-sdk/dist/resources'), | ||||
| to: 'libs/dc-sdk/resources' | |||||
| } | |||||
| ]) | |||||
| ] | |||||
| to: 'libs/dc-sdk/resources', | |||||
| }, | |||||
| ]), | |||||
| ], | |||||
| } | } | ||||
| ``` | ``` | ||||
| `Vue2.x` | `Vue2.x` | ||||
| [工程模板](https://github.com/dvgis/dc-vue) | |||||
| ```js | ```js | ||||
| // vue.config.js | // vue.config.js | ||||
| module.exports = { | module.exports = { | ||||
| // 其他配置 | // 其他配置 | ||||
| chainWebpack: config => { | |||||
| config.resolve.alias.set('dvgis', path.resolve(__dirname, dvgisDist)) | |||||
| chainWebpack: (config) => { | |||||
| config.plugin('copy').use(CopywebpackPlugin, [ | config.plugin('copy').use(CopywebpackPlugin, [ | ||||
| [ | [ | ||||
| { | { | ||||
| from: path.join(dvgisDist, 'dc-sdk/dist/resources'), | from: path.join(dvgisDist, 'dc-sdk/dist/resources'), | ||||
| to: 'libs/dc-sdk/resources' | |||||
| } | |||||
| ] | |||||
| to: 'libs/dc-sdk/resources', | |||||
| }, | |||||
| ], | |||||
| ]) | ]) | ||||
| } | |||||
| }, | |||||
| } | } | ||||
| ``` | ``` | ||||
| `Vue3.x` | `Vue3.x` | ||||
| [工程模板](https://github.com/dvgis/dc-vue-next) | |||||
| ```js | ```js | ||||
| // vue.config.js | // vue.config.js | ||||
| module.exports = { | module.exports = { | ||||
| // 其他配置 | // 其他配置 | ||||
| chainWebpack: config => { | |||||
| config.resolve.alias.set('dvgis', path.resolve(__dirname, dvgisDist)) | |||||
| chainWebpack: (config) => { | |||||
| config.plugin('copy').use(CopywebpackPlugin, [ | config.plugin('copy').use(CopywebpackPlugin, [ | ||||
| { | { | ||||
| patterns: [ | patterns: [ | ||||
| to: path.join(__dirname, 'dist', 'libs/dc-sdk/resources'), | to: path.join(__dirname, 'dist', 'libs/dc-sdk/resources'), | ||||
| }, | }, | ||||
| ], | ], | ||||
| } | |||||
| }, | |||||
| ]) | ]) | ||||
| } | |||||
| }, | |||||
| } | } | ||||
| ``` | ``` | ||||
| ## 开始 | ## 开始 | ||||
| ```js | ```js | ||||
| ## 文档 | ## 文档 | ||||
| [DC Sdk Api](https://resource.dvgis.cn/dc-api) | |||||
| [DC Sdk Api](https://resource.dvgis.cn/dc-docs/v2.x/zh) | |||||
| [Cesium Api](https://cesium.com/docs/cesiumjs-ref-doc/) | [Cesium Api](https://cesium.com/docs/cesiumjs-ref-doc/) | ||||
| | 模块名称 | 状态 | 描述 | | | 模块名称 | 状态 | 描述 | | ||||
| | :------ | :------: | :------ | | | :------ | :------: | :------ | | ||||
| | [dc-plugins](https://github.com/dvgis/dc-plugins) | <img src="https://img.shields.io/npm/v/@dvgis/dc-plugins?logo=npm" /> | DC插件模块,包括场景动画、漫游以及一些额外的材质 | | |||||
| | [dc-overlay](https://github.com/dvgis/dc-overlay) | <img src="https://img.shields.io/npm/v/@dvgis/dc-overlay?logo=npm" /> | DC要素模块,包括球体、柱体、军标、水面等 | | |||||
| | [dc-plot](https://github.com/dvgis/dc-plot) | <img src="https://img.shields.io/npm/v/@dvgis/dc-plot?logo=npm" /> | DC标绘模块,用于要素的标绘和编辑 | | |||||
| | [dc-chart](https://github.com/dvgis/dc-chart) | <img src="https://img.shields.io/npm/v/@dvgis/dc-chart?logo=npm" /> | DC图表模块,用于在三维场景中添加Echarts功能 | | | [dc-chart](https://github.com/dvgis/dc-chart) | <img src="https://img.shields.io/npm/v/@dvgis/dc-chart?logo=npm" /> | DC图表模块,用于在三维场景中添加Echarts功能 | | ||||
| | [dc-mapv](https://github.com/dvgis/dc-mapv) | <img src="https://img.shields.io/npm/v/@dvgis/dc-mapv?logo=npm" /> | DC大数据模块,用于在三维场景中添加Mapv功能 | | | [dc-mapv](https://github.com/dvgis/dc-mapv) | <img src="https://img.shields.io/npm/v/@dvgis/dc-mapv?logo=npm" /> | DC大数据模块,用于在三维场景中添加Mapv功能 | | ||||
| | [dc-ui](https://github.com/dvgis/dc-ui) | <img src="https://img.shields.io/npm/v/@dvgis/dc-ui?logo=npm" /> | DC基于Vue2.x组件开发框架,将DC功能Vue模块化 | | | [dc-ui](https://github.com/dvgis/dc-ui) | <img src="https://img.shields.io/npm/v/@dvgis/dc-ui?logo=npm" /> | DC基于Vue2.x组件开发框架,将DC功能Vue模块化 | | ||||
| | dc-analysis | <img src="https://img.shields.io/npm/v/@dvgis/dc-analysis?logo=npm" /> | DC分析模块,包括视频融合,位置编辑、测量等 | | |||||
| | dc-ui-next | <img src="https://img.shields.io/npm/v/@dvgis/dc-ui-next?logo=npm" /> | DC基于Vue3.x组件开发框架,将DC功能Vue模块化 | | | dc-ui-next | <img src="https://img.shields.io/npm/v/@dvgis/dc-ui-next?logo=npm" /> | DC基于Vue3.x组件开发框架,将DC功能Vue模块化 | | ||||
| ## QQ 群 | ## QQ 群 |
| # DC-Chart | |||||
| # DC-SDK | |||||
| <p> | <p> | ||||
| <img src="https://img.shields.io/github/workflow/status/dvgis/dc-sdk/publish"/> | |||||
| <img src="https://img.shields.io/badge/license-Apache%202-blue"/> | <img src="https://img.shields.io/badge/license-Apache%202-blue"/> | ||||
| <img src="https://img.shields.io/github/package-json/v/dvgis/dc-chart?color=orange&logo=github" /> | |||||
| <img src="https://img.shields.io/npm/dw/@dvgis/dc-chart?logo=npm"/> | |||||
| <img src="https://img.shields.io/npm/v/@dvgis/dc-sdk?color=orange&logo=npm" /> | |||||
| <img src="https://img.shields.io/npm/dt/@dvgis/dc-sdk?logo=npm"/> | |||||
| </p> | </p> | ||||
| [**🇨🇳 中文**](./README_zh.md) | [**🇬🇧English**](./README.md) | |||||
| **_`DC-SDK`_** is based on the open source project **_`Cesium`_** for the second development of two three-dimensional **_`WebGis`_** application framework , the framework optimizes the use of **_`Cesium`_** and adds some additional features , designed for developers to quickly build **_`WebGis`_** application. | |||||
| > DC-Chart is a product of integration of dc-sdk and Echarts. Mainly used to add statistical charts of Echarts to 3D scenes. Gis the statistical chart | |||||
| ## Home | |||||
| > [Home Page](http://dc.dvgis.cn) | |||||
| > http://dc.dvgis.cn | |||||
| ```warning | ```warning | ||||
| Tips:This SDK is JS+GIS framework package. Developers need to have some front-end technology and GIS related technology | Tips:This SDK is JS+GIS framework package. Developers need to have some front-end technology and GIS related technology | ||||
| ## Installation | ## Installation | ||||
| > CDN | |||||
| `NPM / YARN` **_`(Recommend)`_** | |||||
| ```html | |||||
| <!--Echarts Package--> | |||||
| <script src="***/echarts.min.js"></script> | |||||
| <!--Basic Package--> | |||||
| <script src="libs/dc-sdk/dc.base.min.js"></script> | |||||
| <!--Core Package--> | |||||
| <script src="libs/dc-sdk/dc.core.min.js"></script> | |||||
| <!--Chart Package--> | |||||
| <script src="libs/dc-chart/dc.chart.min.js"></script> | |||||
| <!--Main Style Sheet --> | |||||
| <link href="libs/dc-sdk/dc.core.min.css" rel="stylesheet" type="text/css" /> | |||||
| Installing with NPM or YARN is recommended and it works seamlessly with webpack. | |||||
| ```node | |||||
| yarn add @dvgis/dc-sdk | |||||
| ------------------------- | |||||
| npm install @dvgis/dc-sdk | |||||
| ``` | ``` | ||||
| > NPM / YARN | |||||
| ```js | |||||
| import DC from '@dvgis/dc-sdk/dist/dc.base.min' | |||||
| import DcCore from '@dvgis/dc-sdk/dist/dc.core.min' | |||||
| import DcChart from '@dvgis/dc-sdk/dist/dc.chart.min' | |||||
| import DcMapv from '@dvgis/dc-sdk/dist/dc.mapv.min' | |||||
| import '@dvgis/dc-sdk/dist/dc.core.min.css' | |||||
| ``` | |||||
| ```shell | |||||
| yarn add echarts @dvgis/dc-sdk @dvgis/dc-plugins | |||||
| npm install echarts @dvgis/dc-sdk @dvgis/dc-plugins | |||||
| `NPM / YARN` **_`(On-demand)`_** | |||||
| ```node | |||||
| yarn add @dvgis/dc-base | |||||
| yarn add @dvgis/dc-core | |||||
| yarn add @dvgis/dc-chart | |||||
| yarn add @dvgis/dc-mapv | |||||
| ------------------------- | |||||
| npm install @dvgis/dc-base | |||||
| npm install @dvgis/dc-core | |||||
| npm install @dvgis/dc-chart | |||||
| npm install @dvgis/dc-mapv | |||||
| ``` | ``` | ||||
| ```js | ```js | ||||
| global.echarts = require('echarts') //Echarts Package | |||||
| import DC from 'dvgis/dc-sdk/dist/dc.base.min' //Basic Package | |||||
| import DcCore from 'dvgis/dc-sdk/dist/dc.core.min' //Core Package | |||||
| import DcChart from 'dvgis/dc-chart/dist/dc.chart.min' //Chart Package | |||||
| import 'dvgis/dc-sdk/dist/dc.core.min.css' // Main Style Sheet | |||||
| import DC from '@dvgis/dc-base' | |||||
| import DcCore from '@dvgis/dc-core' | |||||
| import DcChart from '@dvgis/dc-chart' | |||||
| import DcMapv from '@dvgis/dc-mapv' | |||||
| import '@dvgis/dc-core/dist/dc.core.min.css' | |||||
| ``` | ``` | ||||
| ## Setting | |||||
| `CDN` | |||||
| > Vue | |||||
| [Resources 下载链接](https://github.com/dvgis/dc-sdk/tree/master/dist) | |||||
| ```js | |||||
| // vue.config.js | |||||
| ```html | |||||
| <script src="https://cdn.jsdelivr.net/npm/@dvgis/dc-sdk/dist/dc.base.min.js"></script> | |||||
| <script src="https://cdn.jsdelivr.net/npm/@dvgis/dc-sdk/dist/dc.core.min.js"></script> | |||||
| <script src="https://cdn.jsdelivr.net/npm/@dvgis/dc-sdk/dist/dc.chart.min.js"></script> | |||||
| <script src="https://cdn.jsdelivr.net/npm/@dvgis/dc-sdk/dist/dc.mapv.min.js"></script> | |||||
| <link | |||||
| href="https://cdn.jsdelivr.net/npm/@dvgis/dc-sdk/dist/dc.core.min.css" | |||||
| rel="stylesheet" | |||||
| type="text/css" | |||||
| /> | |||||
| ``` | |||||
| ``` | |||||
| Please put the resources in the project root directory libs/dc-sdk, if you put it in other directory, the framework will not run properly. | |||||
| ``` | |||||
| ## Configuration | |||||
| > The configuration is mainly used in the `NPM / YARN` way | |||||
| Since the DC framework sets `CESIUM_BASE_URL` to `JSON.stringify('. /libs/dc-sdk/resources/')`, you need to copy `Cesium` static resource files: `Assets`, `Workers`, `ThirdParty` to the `libs/dc-sdk/resources` directory of the project to ensure that the 3D scene can be rendered properly. | |||||
| `Webpack` | |||||
| [Project Template](https://github.com/cavencj/dc-vue-app) | |||||
| ```js | |||||
| // webpack.config.js | |||||
| const path = require('path') | const path = require('path') | ||||
| const CopywebpackPlugin = require('copy-webpack-plugin') | const CopywebpackPlugin = require('copy-webpack-plugin') | ||||
| const dvgisDist = './node_modules/@dvgis' | const dvgisDist = './node_modules/@dvgis' | ||||
| module.exports = { | module.exports = { | ||||
| // other settings | |||||
| chainWebpack: config => { | |||||
| config.resolve.alias.set('dvgis', path.resolve(__dirname, dvgisDist)) | |||||
| plugins: [ | |||||
| new CopyWebpackPlugin([ | |||||
| { | |||||
| from: path.join(dvgisDist, 'dc-sdk/dist/resources'), | |||||
| to: 'libs/dc-sdk/resources', | |||||
| }, | |||||
| ]), | |||||
| ], | |||||
| } | |||||
| ``` | |||||
| `Vue2.x` | |||||
| [Project Template](https://github.com/dvgis/dc-vue) | |||||
| ```js | |||||
| // vue.config.js | |||||
| const path = require('path') | |||||
| const CopywebpackPlugin = require('copy-webpack-plugin') | |||||
| const dvgisDist = './node_modules/@dvgis' | |||||
| module.exports = { | |||||
| chainWebpack: (config) => { | |||||
| config.plugin('copy').use(CopywebpackPlugin, [ | config.plugin('copy').use(CopywebpackPlugin, [ | ||||
| [ | [ | ||||
| { | { | ||||
| from: path.join(dvgisDist, 'dc-sdk/dist/resources'), | from: path.join(dvgisDist, 'dc-sdk/dist/resources'), | ||||
| to: 'libs/dc-sdk/resources' | |||||
| } | |||||
| ] | |||||
| to: 'libs/dc-sdk/resources', | |||||
| }, | |||||
| ], | |||||
| ]) | |||||
| }, | |||||
| } | |||||
| ``` | |||||
| `Vue3.x` | |||||
| [Project Template](https://github.com/dvgis/dc-vue-next) | |||||
| ```js | |||||
| // vue.config.js | |||||
| const path = require('path') | |||||
| const CopywebpackPlugin = require('copy-webpack-plugin') | |||||
| const dvgisDist = './node_modules/@dvgis' | |||||
| module.exports = { | |||||
| chainWebpack: (config) => { | |||||
| config.plugin('copy').use(CopywebpackPlugin, [ | |||||
| { | |||||
| patterns: [ | |||||
| { | |||||
| from: path.join(dvgisDist, 'dc-sdk/dist/resources'), | |||||
| to: path.join(__dirname, 'dist', 'libs/dc-sdk/resources'), | |||||
| }, | |||||
| ], | |||||
| }, | |||||
| ]) | ]) | ||||
| } | |||||
| }, | |||||
| } | } | ||||
| ``` | ``` | ||||
| ## Start | ## Start | ||||
| ```js | ```js | ||||
| DC.use(DcCore) | |||||
| DC.use(DcChart) | |||||
| global.DC = DC | |||||
| DC.use(DcCore) // node | |||||
| DC.ready(() => { | DC.ready(() => { | ||||
| 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 | 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 | ||||
| }) | }) | ||||
| ## Documentation | ## Documentation | ||||
| [DC Api](https://resource.dvgis.cn/dc-api) | |||||
| [DC Sdk Api](https://resource.dvgis.cn/dc-api/v2.x) | |||||
| [Cesium Api](https://cesium.com/docs/cesiumjs-ref-doc/) | [Cesium Api](https://cesium.com/docs/cesiumjs-ref-doc/) | ||||
| ## Demo | ## Demo | ||||
| |  |  |  |  | | |||||
| | :----------------------------------------------------------: | :-------------------------------------------------------------: | :----------------------------------------------------------: | :-------------------------------------------------------------: | | |||||
| |  |  |  | | | |||||
| |  |  |  |  | | |||||
| | :-----------------------------------------------------------: | :-----------------------------------------------------------: | :------------------------------------------------------------------: | :--------------------------------------------------------------: | | |||||
| |  |  |  |  | | |||||
| |  |  |  |  | | |||||
| [More>>](http://dc.dvgis.cn/#/examples) | [More>>](http://dc.dvgis.cn/#/examples) | ||||
| ## Copyright statement | |||||
| ## Ecosystem | |||||
| | Module | Status | Description | | |||||
| | :------ | :------: | :------ | | |||||
| | [dc-chart](https://github.com/dvgis/dc-chart) | <img src="https://img.shields.io/npm/v/@dvgis/dc-chart?logo=npm" /> | dc chart module for adding ECharts functionality in 3d scenes | | |||||
| | [dc-mapv](https://github.com/dvgis/dc-mapv) | <img src="https://img.shields.io/npm/v/@dvgis/dc-mapv?logo=npm" /> | dc big-data module for adding MAPV functions in 3d scenes | | |||||
| | [dc-ui](https://github.com/dvgis/dc-ui) | <img src="https://img.shields.io/npm/v/@dvgis/dc-ui?logo=npm" /> | dc components for Vue2.x | | |||||
| | dc-analysis | <img src="https://img.shields.io/npm/v/@dvgis/dc-analysis?logo=npm" /> | dc analysis module, including camera-video, position-editor, measure, etc | | |||||
| | dc-ui-next | <img src="https://img.shields.io/npm/v/@dvgis/dc-ui-next?logo=npm" /> | dc components for Vue3.x | | |||||
| ## QQ Group | |||||
| <p> | |||||
| <img src="http://dc.dvgis.cn/examples/images/base/q1.png?v=2" style="width:60px;height:60px" title="数字视觉"/> | |||||
| <img src="http://dc.dvgis.cn/examples/images/base/q2.png?v=6" style="width:60px;height:60px" title="Cesium开心农场"/> | |||||
| </p> | |||||
| ## Copyright | |||||
| ```warning | ```warning | ||||
| 1. The framework is a basic platform, completely open source, which can be modified and reconstructed by any individual or institution without our authorization. | 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: | |||||
| 2. We are not responsible for any problems arising from the modification of the framework by individuals and organizations. | |||||
| 3. Some industrial plug-ins and tools will be added in the later stage, and the code will be open source appropriately. | |||||
| 4. The package released by us may be used permanently and free of charge by any person or organization subject to: | |||||
| 1) complete package reference; | 1) complete package reference; | ||||
| 2) reserve this copyright information in the console output | 2) reserve this copyright information in the console output | ||||
| We reserve the right of final interpretation of this copyright information. | We reserve the right of final interpretation of this copyright information. | ||||
| ``` | ``` | ||||
| ## Support | |||||
| > if dc-sdk can bring benefits to you, please support it ~ | |||||
| <p> | |||||
| <img src="http://dc.dvgis.cn/examples/images/base/sponsor.jpg?v=2" style="width:60px;height:60px" title="数字视觉"/> | |||||
| </p> | |||||
| ## Thanks | ## Thanks |
| # DC-Chart | |||||
| # DC-SDK | |||||
| <p> | <p> | ||||
| <img src="https://img.shields.io/github/workflow/status/dvgis/dc-sdk/publish"/> | |||||
| <img src="https://img.shields.io/badge/license-Apache%202-blue"/> | <img src="https://img.shields.io/badge/license-Apache%202-blue"/> | ||||
| <img src="https://img.shields.io/github/package-json/v/dvgis/dc-chart?color=orange&logo=github" /> | |||||
| <img src="https://img.shields.io/npm/dw/@dvgis/dc-chart?logo=npm"/> | |||||
| <img src="https://img.shields.io/npm/v/@dvgis/dc-sdk?color=orange&logo=npm" /> | |||||
| <img src="https://img.shields.io/npm/dt/@dvgis/dc-sdk?logo=npm"/> | |||||
| </p> | </p> | ||||
| [**🇨🇳 中文**](./README_zh.md) | [**🇬🇧English**](./README.md) | |||||
| **_`DC-SDK`_** is based on the open source project **_`Cesium`_** for the second development of two three-dimensional **_`WebGis`_** application framework , the framework optimizes the use of **_`Cesium`_** and adds some additional features , designed for developers to quickly build **_`WebGis`_** application. | |||||
| > DC-Chart is a product of integration of dc-sdk and Echarts. Mainly used to add statistical charts of Echarts to 3D scenes. Gis the statistical chart | |||||
| ## Home | |||||
| > [Home Page](http://dc.dvgis.cn) | |||||
| > http://dc.dvgis.cn | |||||
| ```warning | ```warning | ||||
| Tips:This SDK is JS+GIS framework package. Developers need to have some front-end technology and GIS related technology | Tips:This SDK is JS+GIS framework package. Developers need to have some front-end technology and GIS related technology | ||||
| ## Installation | ## Installation | ||||
| > CDN | |||||
| `NPM / YARN` **_`(Recommend)`_** | |||||
| ```html | |||||
| <!--Echarts Package--> | |||||
| <script src="***/echarts.min.js"></script> | |||||
| <!--Basic Package--> | |||||
| <script src="libs/dc-sdk/dc.base.min.js"></script> | |||||
| <!--Core Package--> | |||||
| <script src="libs/dc-sdk/dc.core.min.js"></script> | |||||
| <!--Chart Package--> | |||||
| <script src="libs/dc-chart/dc.chart.min.js"></script> | |||||
| <!--Main Style Sheet --> | |||||
| <link href="libs/dc-sdk/dc.core.min.css" rel="stylesheet" type="text/css" /> | |||||
| Installing with NPM or YARN is recommended and it works seamlessly with webpack. | |||||
| ```node | |||||
| yarn add @dvgis/dc-sdk | |||||
| ------------------------- | |||||
| npm install @dvgis/dc-sdk | |||||
| ``` | ``` | ||||
| > NPM / YARN | |||||
| ```js | |||||
| import DC from '@dvgis/dc-sdk/dist/dc.base.min' | |||||
| import DcCore from '@dvgis/dc-sdk/dist/dc.core.min' | |||||
| import DcChart from '@dvgis/dc-sdk/dist/dc.chart.min' | |||||
| import DcMapv from '@dvgis/dc-sdk/dist/dc.mapv.min' | |||||
| import '@dvgis/dc-sdk/dist/dc.core.min.css' | |||||
| ``` | |||||
| ```shell | |||||
| yarn add echarts @dvgis/dc-sdk @dvgis/dc-plugins | |||||
| npm install echarts @dvgis/dc-sdk @dvgis/dc-plugins | |||||
| `NPM / YARN` **_`(On-demand)`_** | |||||
| ```node | |||||
| yarn add @dvgis/dc-base | |||||
| yarn add @dvgis/dc-core | |||||
| yarn add @dvgis/dc-chart | |||||
| yarn add @dvgis/dc-mapv | |||||
| ------------------------- | |||||
| npm install @dvgis/dc-base | |||||
| npm install @dvgis/dc-core | |||||
| npm install @dvgis/dc-chart | |||||
| npm install @dvgis/dc-mapv | |||||
| ``` | ``` | ||||
| ```js | ```js | ||||
| global.echarts = require('echarts') //Echarts Package | |||||
| import DC from 'dvgis/dc-sdk/dist/dc.base.min' //Basic Package | |||||
| import DcCore from 'dvgis/dc-sdk/dist/dc.core.min' //Core Package | |||||
| import DcChart from 'dvgis/dc-chart/dist/dc.chart.min' //Chart Package | |||||
| import 'dvgis/dc-sdk/dist/dc.core.min.css' // Main Style Sheet | |||||
| import DC from '@dvgis/dc-base' | |||||
| import DcCore from '@dvgis/dc-core' | |||||
| import DcChart from '@dvgis/dc-chart' | |||||
| import DcMapv from '@dvgis/dc-mapv' | |||||
| import '@dvgis/dc-core/dist/dc.core.min.css' | |||||
| ``` | ``` | ||||
| ## Setting | |||||
| `CDN` | |||||
| > Vue | |||||
| [Resources](https://github.com/dvgis/dc-sdk/releases) | |||||
| ```js | |||||
| // vue.config.js | |||||
| ```html | |||||
| <script src="https://cdn.jsdelivr.net/npm/@dvgis/dc-sdk/dist/dc.base.min.js"></script> | |||||
| <script src="https://cdn.jsdelivr.net/npm/@dvgis/dc-sdk/dist/dc.core.min.js"></script> | |||||
| <script src="https://cdn.jsdelivr.net/npm/@dvgis/dc-sdk/dist/dc.chart.min.js"></script> | |||||
| <script src="https://cdn.jsdelivr.net/npm/@dvgis/dc-sdk/dist/dc.mapv.min.js"></script> | |||||
| <link | |||||
| href="https://cdn.jsdelivr.net/npm/@dvgis/dc-sdk/dist/dc.core.min.css" | |||||
| rel="stylesheet" | |||||
| type="text/css" | |||||
| /> | |||||
| ``` | |||||
| ``` | |||||
| Please put the resources in the project root directory libs/dc-sdk, if you put it in other directory, the framework will not run properly. | |||||
| ``` | |||||
| ## Configuration | |||||
| > The configuration is mainly used in the `NPM / YARN` way | |||||
| Since the DC framework sets `CESIUM_BASE_URL` to `JSON.stringify('. /libs/dc-sdk/resources/')`, you need to copy `Cesium` static resource files: `Assets`, `Workers`, `ThirdParty` to the `libs/dc-sdk/resources` directory of the project to ensure that the 3D scene can be rendered properly. | |||||
| `Webpack` | |||||
| [Project Template](https://github.com/cavencj/dc-vue-app) | |||||
| ```js | |||||
| // webpack.config.js | |||||
| const path = require('path') | const path = require('path') | ||||
| const CopywebpackPlugin = require('copy-webpack-plugin') | const CopywebpackPlugin = require('copy-webpack-plugin') | ||||
| const dvgisDist = './node_modules/@dvgis' | const dvgisDist = './node_modules/@dvgis' | ||||
| module.exports = { | module.exports = { | ||||
| // other settings | |||||
| chainWebpack: config => { | |||||
| config.resolve.alias.set('dvgis', path.resolve(__dirname, dvgisDist)) | |||||
| plugins: [ | |||||
| new CopyWebpackPlugin([ | |||||
| { | |||||
| from: path.join(dvgisDist, 'dc-sdk/dist/resources'), | |||||
| to: 'libs/dc-sdk/resources', | |||||
| }, | |||||
| ]), | |||||
| ], | |||||
| } | |||||
| ``` | |||||
| `Vue2.x` | |||||
| [Project Template](https://github.com/dvgis/dc-vue) | |||||
| ```js | |||||
| // vue.config.js | |||||
| const path = require('path') | |||||
| const CopywebpackPlugin = require('copy-webpack-plugin') | |||||
| const dvgisDist = './node_modules/@dvgis' | |||||
| module.exports = { | |||||
| chainWebpack: (config) => { | |||||
| config.plugin('copy').use(CopywebpackPlugin, [ | config.plugin('copy').use(CopywebpackPlugin, [ | ||||
| [ | [ | ||||
| { | { | ||||
| from: path.join(dvgisDist, 'dc-sdk/dist/resources'), | from: path.join(dvgisDist, 'dc-sdk/dist/resources'), | ||||
| to: 'libs/dc-sdk/resources' | |||||
| } | |||||
| ] | |||||
| to: 'libs/dc-sdk/resources', | |||||
| }, | |||||
| ], | |||||
| ]) | |||||
| }, | |||||
| } | |||||
| ``` | |||||
| `Vue3.x` | |||||
| [Project Template](https://github.com/dvgis/dc-vue-next) | |||||
| ```js | |||||
| // vue.config.js | |||||
| const path = require('path') | |||||
| const CopywebpackPlugin = require('copy-webpack-plugin') | |||||
| const dvgisDist = './node_modules/@dvgis' | |||||
| module.exports = { | |||||
| chainWebpack: (config) => { | |||||
| config.plugin('copy').use(CopywebpackPlugin, [ | |||||
| { | |||||
| patterns: [ | |||||
| { | |||||
| from: path.join(dvgisDist, 'dc-sdk/dist/resources'), | |||||
| to: path.join(__dirname, 'dist', 'libs/dc-sdk/resources'), | |||||
| }, | |||||
| ], | |||||
| }, | |||||
| ]) | ]) | ||||
| } | |||||
| }, | |||||
| } | } | ||||
| ``` | ``` | ||||
| ## Start | ## Start | ||||
| ```js | ```js | ||||
| DC.use(DcCore) | |||||
| DC.use(DcChart) | |||||
| global.DC = DC | |||||
| DC.use(DcCore) // node | |||||
| DC.ready(() => { | DC.ready(() => { | ||||
| 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 | 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 | ||||
| }) | }) | ||||
| ## Documentation | ## Documentation | ||||
| [DC Api](https://resource.dvgis.cn/dc-api) | |||||
| [DC Sdk Api](https://resource.dvgis.cn/dc-api/v2.x) | |||||
| [Cesium Api](https://cesium.com/docs/cesiumjs-ref-doc/) | [Cesium Api](https://cesium.com/docs/cesiumjs-ref-doc/) | ||||
| ## Demo | ## Demo | ||||
| |  |  |  |  | | |||||
| | :----------------------------------------------------------: | :-------------------------------------------------------------: | :----------------------------------------------------------: | :-------------------------------------------------------------: | | |||||
| |  |  |  | | | |||||
| |  |  |  |  | | |||||
| | :-----------------------------------------------------------: | :-----------------------------------------------------------: | :------------------------------------------------------------------: | :--------------------------------------------------------------: | | |||||
| |  |  |  |  | | |||||
| |  |  |  |  | | |||||
| [More>>](http://dc.dvgis.cn/#/examples) | [More>>](http://dc.dvgis.cn/#/examples) | ||||
| ## Copyright statement | |||||
| ## Ecosystem | |||||
| | Module | Status | Description | | |||||
| | :------ | :------: | :------ | | |||||
| | [dc-chart](https://github.com/dvgis/dc-chart) | <img src="https://img.shields.io/npm/v/@dvgis/dc-chart?logo=npm" /> | dc chart module for adding ECharts functionality in 3d scenes | | |||||
| | [dc-mapv](https://github.com/dvgis/dc-mapv) | <img src="https://img.shields.io/npm/v/@dvgis/dc-mapv?logo=npm" /> | dc big-data module for adding MAPV functions in 3d scenes | | |||||
| | [dc-ui](https://github.com/dvgis/dc-ui) | <img src="https://img.shields.io/npm/v/@dvgis/dc-ui?logo=npm" /> | dc components for Vue2.x | | |||||
| | dc-analysis | <img src="https://img.shields.io/npm/v/@dvgis/dc-analysis?logo=npm" /> | dc analysis module, including camera-video, position-editor, measure, etc | | |||||
| | dc-ui-next | <img src="https://img.shields.io/npm/v/@dvgis/dc-ui-next?logo=npm" /> | dc components for Vue3.x | | |||||
| ## QQ Group | |||||
| <p> | |||||
| <img src="http://dc.dvgis.cn/examples/images/base/q1.png?v=2" style="width:60px;height:60px" title="数字视觉"/> | |||||
| <img src="http://dc.dvgis.cn/examples/images/base/q2.png?v=6" style="width:60px;height:60px" title="Cesium开心农场"/> | |||||
| </p> | |||||
| ## Copyright | |||||
| ```warning | ```warning | ||||
| 1. The framework is a basic platform, completely open source, which can be modified and reconstructed by any individual or institution without our authorization. | 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: | |||||
| 2. We are not responsible for any problems arising from the modification of the framework by individuals and organizations. | |||||
| 3. Some industrial plug-ins and tools will be added in the later stage, and the code will be open source appropriately. | |||||
| 4. The package released by us may be used permanently and free of charge by any person or organization subject to: | |||||
| 1) complete package reference; | 1) complete package reference; | ||||
| 2) reserve this copyright information in the console output | 2) reserve this copyright information in the console output | ||||
| We reserve the right of final interpretation of this copyright information. | We reserve the right of final interpretation of this copyright information. | ||||
| ``` | ``` | ||||
| ## Support | |||||
| > if dc-sdk can bring benefits to you, please support it ~ | |||||
| <p> | |||||
| <img src="http://dc.dvgis.cn/examples/images/base/sponsor.jpg?v=2" style="width:60px;height:60px" title="数字视觉"/> | |||||
| </p> | |||||
| ## Thanks | ## Thanks |
| <img src="https://img.shields.io/github/workflow/status/dvgis/dc-sdk/publish"/> | <img src="https://img.shields.io/github/workflow/status/dvgis/dc-sdk/publish"/> | ||||
| <img src="https://img.shields.io/badge/license-Apache%202-blue"/> | <img src="https://img.shields.io/badge/license-Apache%202-blue"/> | ||||
| <img src="https://img.shields.io/npm/v/@dvgis/dc-sdk?color=orange&logo=npm" /> | <img src="https://img.shields.io/npm/v/@dvgis/dc-sdk?color=orange&logo=npm" /> | ||||
| <img src="https://img.shields.io/npm/dm/@dvgis/dc-sdk?logo=npm"/> | |||||
| <img src="https://img.shields.io/npm/dt/@dvgis/dc-sdk?logo=npm"/> | |||||
| </p> | </p> | ||||
| [**🇨🇳 中文**](./README_zh.md) | [**🇬🇧English**](./README.md) | |||||
| > DC-SDK is based on Cesium for secondary development of 2, 3D all-in-one WebGis application framework, the framework optimizes the use of Cesium and add some additional features, designed for developers to quickly build WebGis applications. | |||||
| **_`DC-SDK`_** is based on the open source project **_`Cesium`_** for the second development of two three-dimensional **_`WebGis`_** application framework , the framework optimizes the use of **_`Cesium`_** and adds some additional features , designed for developers to quickly build **_`WebGis`_** application. | |||||
| ## Home | ## Home | ||||
| > http://dc.dvgis.cn | > http://dc.dvgis.cn | ||||
| ```warningH | |||||
| ```warning | |||||
| Tips:This SDK is JS+GIS framework package. Developers need to have some front-end technology and GIS related technology | Tips:This SDK is JS+GIS framework package. Developers need to have some front-end technology and GIS related technology | ||||
| ``` | ``` | ||||
| ## Installation | ## Installation | ||||
| `CDN` | |||||
| `NPM / YARN` **_`(Recommend)`_** | |||||
| ```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> | |||||
| <!--Main Style Sheet --> | |||||
| <link href="libs/dc-sdk/dc.core.min.css" rel="stylesheet" type="text/css" /> | |||||
| ``` | |||||
| Installing with NPM or YARN is recommended and it works seamlessly with webpack. | |||||
| `NPM / YARN` | |||||
| ```shell | |||||
| ```node | |||||
| yarn add @dvgis/dc-sdk | yarn add @dvgis/dc-sdk | ||||
| ------------------------- | |||||
| npm install @dvgis/dc-sdk | npm install @dvgis/dc-sdk | ||||
| ``` | ``` | ||||
| ```js | ```js | ||||
| import DC from '@dvgis/dc-base' //Basic Package | |||||
| import DcCore from '@dvgis/dc-core' //Core Package | |||||
| import '@dvgis/dc-core/dist/dc.core.min.css' // Main Style Sheet | |||||
| import DC from '@dvgis/dc-sdk/dist/dc.base.min' | |||||
| import DcCore from '@dvgis/dc-sdk/dist/dc.core.min' | |||||
| import DcChart from '@dvgis/dc-sdk/dist/dc.chart.min' | |||||
| import DcMapv from '@dvgis/dc-sdk/dist/dc.mapv.min' | |||||
| import '@dvgis/dc-sdk/dist/dc.core.min.css' | |||||
| ``` | |||||
| `NPM / YARN` **_`(On-demand)`_** | |||||
| ```node | |||||
| yarn add @dvgis/dc-base | |||||
| yarn add @dvgis/dc-core | |||||
| yarn add @dvgis/dc-chart | |||||
| yarn add @dvgis/dc-mapv | |||||
| ------------------------- | |||||
| npm install @dvgis/dc-base | |||||
| npm install @dvgis/dc-core | |||||
| npm install @dvgis/dc-chart | |||||
| npm install @dvgis/dc-mapv | |||||
| ``` | |||||
| ```js | |||||
| import DC from '@dvgis/dc-base' | |||||
| import DcCore from '@dvgis/dc-core' | |||||
| import DcChart from '@dvgis/dc-chart' | |||||
| import DcMapv from '@dvgis/dc-mapv' | |||||
| import '@dvgis/dc-core/dist/dc.core.min.css' | |||||
| ``` | |||||
| `CDN` | |||||
| [Resources](https://github.com/dvgis/dc-sdk/releases) | |||||
| ```html | |||||
| <script src="https://cdn.jsdelivr.net/npm/@dvgis/dc-sdk/dist/dc.base.min.js"></script> | |||||
| <script src="https://cdn.jsdelivr.net/npm/@dvgis/dc-sdk/dist/dc.core.min.js"></script> | |||||
| <script src="https://cdn.jsdelivr.net/npm/@dvgis/dc-sdk/dist/dc.chart.min.js"></script> | |||||
| <script src="https://cdn.jsdelivr.net/npm/@dvgis/dc-sdk/dist/dc.mapv.min.js"></script> | |||||
| <link | |||||
| href="https://cdn.jsdelivr.net/npm/@dvgis/dc-sdk/dist/dc.core.min.css" | |||||
| rel="stylesheet" | |||||
| type="text/css" | |||||
| /> | |||||
| ``` | ``` | ||||
| ## Setting | |||||
| ``` | |||||
| Please put the resources in the project root directory libs/dc-sdk, if you put it in other directory, the framework will not run properly. | |||||
| ``` | |||||
| ## Configuration | |||||
| > The configuration is mainly used in the `NPM / YARN` way | |||||
| Since the DC framework sets `CESIUM_BASE_URL` to `JSON.stringify('. /libs/dc-sdk/resources/')`, you need to copy `Cesium` static resource files: `Assets`, `Workers`, `ThirdParty` to the `libs/dc-sdk/resources` directory of the project to ensure that the 3D scene can be rendered properly. | |||||
| `Webpack` | `Webpack` | ||||
| ```js | |||||
| // webpack.config.js | |||||
| [Project Template](https://github.com/cavencj/dc-vue-app) | |||||
| ```js | |||||
| // webpack.config.js | |||||
| const path = require('path') | const path = require('path') | ||||
| const CopywebpackPlugin = require('copy-webpack-plugin') | const CopywebpackPlugin = require('copy-webpack-plugin') | ||||
| const dvgisDist = './node_modules/@dvgis' | const dvgisDist = './node_modules/@dvgis' | ||||
| module.exports = { | module.exports = { | ||||
| // other settings | |||||
| plugins:[ | |||||
| plugins: [ | |||||
| new CopyWebpackPlugin([ | new CopyWebpackPlugin([ | ||||
| { | |||||
| { | |||||
| from: path.join(dvgisDist, 'dc-sdk/dist/resources'), | from: path.join(dvgisDist, 'dc-sdk/dist/resources'), | ||||
| to: 'libs/dc-sdk/resources' | |||||
| } | |||||
| ]) | |||||
| ] | |||||
| to: 'libs/dc-sdk/resources', | |||||
| }, | |||||
| ]), | |||||
| ], | |||||
| } | } | ||||
| ``` | ``` | ||||
| `Vue2.x` | `Vue2.x` | ||||
| [Project Template](https://github.com/dvgis/dc-vue) | |||||
| ```js | ```js | ||||
| // vue.config.js | // vue.config.js | ||||
| const path = require('path') | const path = require('path') | ||||
| const CopywebpackPlugin = require('copy-webpack-plugin') | const CopywebpackPlugin = require('copy-webpack-plugin') | ||||
| const dvgisDist = './node_modules/@dvgis' | const dvgisDist = './node_modules/@dvgis' | ||||
| module.exports = { | module.exports = { | ||||
| // other settings | |||||
| chainWebpack: config => { | |||||
| config.resolve.alias.set('dvgis', path.resolve(__dirname, dvgisDist)) | |||||
| chainWebpack: (config) => { | |||||
| config.plugin('copy').use(CopywebpackPlugin, [ | config.plugin('copy').use(CopywebpackPlugin, [ | ||||
| [ | [ | ||||
| { | { | ||||
| from: path.join(dvgisDist, 'dc-sdk/dist/resources'), | from: path.join(dvgisDist, 'dc-sdk/dist/resources'), | ||||
| to: 'libs/dc-sdk/resources' | |||||
| } | |||||
| ] | |||||
| to: 'libs/dc-sdk/resources', | |||||
| }, | |||||
| ], | |||||
| ]) | ]) | ||||
| } | |||||
| }, | |||||
| } | } | ||||
| ``` | ``` | ||||
| `Vue3.x` | `Vue3.x` | ||||
| [Project Template](https://github.com/dvgis/dc-vue-next) | |||||
| ```js | ```js | ||||
| // vue.config.js | // vue.config.js | ||||
| const path = require('path') | const path = require('path') | ||||
| const CopywebpackPlugin = require('copy-webpack-plugin') | const CopywebpackPlugin = require('copy-webpack-plugin') | ||||
| const dvgisDist = './node_modules/@dvgis' | const dvgisDist = './node_modules/@dvgis' | ||||
| module.exports = { | module.exports = { | ||||
| // other settings | |||||
| chainWebpack: config => { | |||||
| config.resolve.alias.set('dvgis', path.resolve(__dirname, dvgisDist)) | |||||
| chainWebpack: (config) => { | |||||
| config.plugin('copy').use(CopywebpackPlugin, [ | config.plugin('copy').use(CopywebpackPlugin, [ | ||||
| { | { | ||||
| patterns: [ | patterns: [ | ||||
| to: path.join(__dirname, 'dist', 'libs/dc-sdk/resources'), | to: path.join(__dirname, 'dist', 'libs/dc-sdk/resources'), | ||||
| }, | }, | ||||
| ], | ], | ||||
| } | |||||
| }, | |||||
| ]) | ]) | ||||
| } | |||||
| }, | |||||
| } | } | ||||
| ``` | ``` | ||||
| ## Start | ## Start | ||||
| ```js | ```js | ||||
| <img src="http://dc.dvgis.cn/examples/images/base/q2.png?v=6" style="width:60px;height:60px" title="Cesium开心农场"/> | <img src="http://dc.dvgis.cn/examples/images/base/q2.png?v=6" style="width:60px;height:60px" title="Cesium开心农场"/> | ||||
| </p> | </p> | ||||
| ## Copyright | ## Copyright | ||||
| ```warning | ```warning |
| # DC-Mapv | |||||
| # DC-SDK | |||||
| <p> | <p> | ||||
| <img src="https://img.shields.io/github/workflow/status/dvgis/dc-sdk/publish"/> | |||||
| <img src="https://img.shields.io/badge/license-Apache%202-blue"/> | <img src="https://img.shields.io/badge/license-Apache%202-blue"/> | ||||
| <img src="https://img.shields.io/github/package-json/v/dvgis/dc-mapv?color=orange&logo=github" /> | |||||
| <img src="https://img.shields.io/npm/dw/@dvgis/dc-mapv?logo=npm"/> | |||||
| <img src="https://img.shields.io/npm/v/@dvgis/dc-sdk?color=orange&logo=npm" /> | |||||
| <img src="https://img.shields.io/npm/dt/@dvgis/dc-sdk?logo=npm"/> | |||||
| </p> | </p> | ||||
| [**🇨🇳 中文**](./README_zh.md) | [**🇬🇧English**](./README.md) | |||||
| **_`DC-SDK`_** is based on the open source project **_`Cesium`_** for the second development of two three-dimensional **_`WebGis`_** application framework , the framework optimizes the use of **_`Cesium`_** and adds some additional features , designed for developers to quickly build **_`WebGis`_** application. | |||||
| > DC-Mapv is a product integrated with dc-sdk and baidu Mapv. It is mainly used to display big data in 3D scenes. | |||||
| ## Home | |||||
| > [Home Page](http://dc.dvgis.cn) | |||||
| > http://dc.dvgis.cn | |||||
| ```warning | ```warning | ||||
| Tips:This SDK is JS+GIS framework package. Developers need to have some front-end technology and GIS related technology | Tips:This SDK is JS+GIS framework package. Developers need to have some front-end technology and GIS related technology | ||||
| ## Installation | ## Installation | ||||
| > CDN | |||||
| `NPM / YARN` **_`(Recommend)`_** | |||||
| ```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> | |||||
| <!--Mapv Package--> | |||||
| <script src="libs/dc-mapv/dc.mapv.min.js"></script> | |||||
| <!--Main Style Sheet --> | |||||
| <link href="libs/dc-sdk/dc.core.min.css" rel="stylesheet" type="text/css" /> | |||||
| Installing with NPM or YARN is recommended and it works seamlessly with webpack. | |||||
| ```node | |||||
| yarn add @dvgis/dc-sdk | |||||
| ------------------------- | |||||
| npm install @dvgis/dc-sdk | |||||
| ``` | |||||
| ```js | |||||
| import DC from '@dvgis/dc-sdk/dist/dc.base.min' | |||||
| import DcCore from '@dvgis/dc-sdk/dist/dc.core.min' | |||||
| import DcChart from '@dvgis/dc-sdk/dist/dc.chart.min' | |||||
| import DcMapv from '@dvgis/dc-sdk/dist/dc.mapv.min' | |||||
| import '@dvgis/dc-sdk/dist/dc.core.min.css' | |||||
| ``` | ``` | ||||
| > NPM / YARN | |||||
| `NPM / YARN` **_`(On-demand)`_** | |||||
| ```node | ```node | ||||
| yarn add @dvgis/dc-sdk @dvgis/dc-mapv | |||||
| npm install @dvgis/dc-sdk @dvgis/dc-mapv | |||||
| yarn add @dvgis/dc-base | |||||
| yarn add @dvgis/dc-core | |||||
| yarn add @dvgis/dc-chart | |||||
| yarn add @dvgis/dc-mapv | |||||
| ------------------------- | |||||
| npm install @dvgis/dc-base | |||||
| npm install @dvgis/dc-core | |||||
| npm install @dvgis/dc-chart | |||||
| npm install @dvgis/dc-mapv | |||||
| ``` | ``` | ||||
| ```js | ```js | ||||
| import DC from 'dvgis/dc-sdk/dist/dc.base.min' //Basic Package | |||||
| import DcCore from 'dvgis/dc-sdk/dist/dc.core.min' //Core Package | |||||
| import DcMapv from 'dvgis/dc-mapv/dist/dc.mapv.min' //Mapv Package | |||||
| import 'dvgis/dc-sdk/dist/dc.core.min.css' // Main Style Sheet | |||||
| import DC from '@dvgis/dc-base' | |||||
| import DcCore from '@dvgis/dc-core' | |||||
| import DcChart from '@dvgis/dc-chart' | |||||
| import DcMapv from '@dvgis/dc-mapv' | |||||
| import '@dvgis/dc-core/dist/dc.core.min.css' | |||||
| ``` | ``` | ||||
| ## Setting | |||||
| `CDN` | |||||
| > Vue | |||||
| [Resources](https://github.com/dvgis/dc-sdk/releases) | |||||
| ```js | |||||
| // vue.config.js | |||||
| ```html | |||||
| <script src="https://cdn.jsdelivr.net/npm/@dvgis/dc-sdk/dist/dc.base.min.js"></script> | |||||
| <script src="https://cdn.jsdelivr.net/npm/@dvgis/dc-sdk/dist/dc.core.min.js"></script> | |||||
| <script src="https://cdn.jsdelivr.net/npm/@dvgis/dc-sdk/dist/dc.chart.min.js"></script> | |||||
| <script src="https://cdn.jsdelivr.net/npm/@dvgis/dc-sdk/dist/dc.mapv.min.js"></script> | |||||
| <link | |||||
| href="https://cdn.jsdelivr.net/npm/@dvgis/dc-sdk/dist/dc.core.min.css" | |||||
| rel="stylesheet" | |||||
| type="text/css" | |||||
| /> | |||||
| ``` | |||||
| ``` | |||||
| Please put the resources in the project root directory libs/dc-sdk, if you put it in other directory, the framework will not run properly. | |||||
| ``` | |||||
| ## Configuration | |||||
| > The configuration is mainly used in the `NPM / YARN` way | |||||
| Since the DC framework sets `CESIUM_BASE_URL` to `JSON.stringify('. /libs/dc-sdk/resources/')`, you need to copy `Cesium` static resource files: `Assets`, `Workers`, `ThirdParty` to the `libs/dc-sdk/resources` directory of the project to ensure that the 3D scene can be rendered properly. | |||||
| `Webpack` | |||||
| [Project Template](https://github.com/cavencj/dc-vue-app) | |||||
| ```js | |||||
| // webpack.config.js | |||||
| const path = require('path') | const path = require('path') | ||||
| const CopywebpackPlugin = require('copy-webpack-plugin') | const CopywebpackPlugin = require('copy-webpack-plugin') | ||||
| const dvgis = './node_modules/@dvgis' | |||||
| const dvgisDist = './node_modules/@dvgis' | |||||
| module.exports = { | module.exports = { | ||||
| // other settings | |||||
| plugins: [ | |||||
| new CopyWebpackPlugin([ | |||||
| { | |||||
| from: path.join(dvgisDist, 'dc-sdk/dist/resources'), | |||||
| to: 'libs/dc-sdk/resources', | |||||
| }, | |||||
| ]), | |||||
| ], | |||||
| } | |||||
| ``` | |||||
| `Vue2.x` | |||||
| [Project Template](https://github.com/dvgis/dc-vue) | |||||
| ```js | |||||
| // vue.config.js | |||||
| const path = require('path') | |||||
| const CopywebpackPlugin = require('copy-webpack-plugin') | |||||
| const dvgisDist = './node_modules/@dvgis' | |||||
| module.exports = { | |||||
| chainWebpack: (config) => { | chainWebpack: (config) => { | ||||
| config.resolve.alias.set('dvgis', path.resolve(__dirname, dvgisDist)) | |||||
| config.plugin('copy').use(CopywebpackPlugin, [ | config.plugin('copy').use(CopywebpackPlugin, [ | ||||
| [ | [ | ||||
| { | { | ||||
| } | } | ||||
| ``` | ``` | ||||
| ## Documentation | |||||
| `Vue3.x` | |||||
| [Mapv Api](https://github.com/huiyan-fe/mapv/blob/master/API.md) | |||||
| [Project Template](https://github.com/dvgis/dc-vue-next) | |||||
| ```js | |||||
| // vue.config.js | |||||
| const path = require('path') | |||||
| const CopywebpackPlugin = require('copy-webpack-plugin') | |||||
| const dvgisDist = './node_modules/@dvgis' | |||||
| module.exports = { | |||||
| chainWebpack: (config) => { | |||||
| config.plugin('copy').use(CopywebpackPlugin, [ | |||||
| { | |||||
| patterns: [ | |||||
| { | |||||
| from: path.join(dvgisDist, 'dc-sdk/dist/resources'), | |||||
| to: path.join(__dirname, 'dist', 'libs/dc-sdk/resources'), | |||||
| }, | |||||
| ], | |||||
| }, | |||||
| ]) | |||||
| }, | |||||
| } | |||||
| ``` | |||||
| [DC-Mapv Api](http://resource.dvgis.cn/dc-api/mapv/) | |||||
| ## Start | |||||
| ```js | |||||
| global.DC = DC | |||||
| DC.use(DcCore) // node | |||||
| DC.ready(() => { | |||||
| 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 | |||||
| }) | |||||
| ``` | |||||
| ## Documentation | |||||
| [DC Sdk Api](https://resource.dvgis.cn/dc-api/v2.x) | |||||
| [Cesium Api](https://cesium.com/docs/cesiumjs-ref-doc/) | [Cesium Api](https://cesium.com/docs/cesiumjs-ref-doc/) | ||||
| ## Demo | ## Demo | ||||
| |  |  |  |  | | |||||
| | :------------------------------------------------------------: | :---------------------------------------------------------------: | :---------------------------------------------------------------: | :-------------------------------------------------------------: | | |||||
| |  |  |  |  | | |||||
| |  |  | | | |||||
| |  |  |  |  | | |||||
| | :-----------------------------------------------------------: | :-----------------------------------------------------------: | :------------------------------------------------------------------: | :--------------------------------------------------------------: | | |||||
| |  |  |  |  | | |||||
| |  |  |  |  | | |||||
| [More>>](http://dc.dvgis.cn/#/examples) | [More>>](http://dc.dvgis.cn/#/examples) | ||||
| ## Copyright statement | |||||
| ## Ecosystem | |||||
| | Module | Status | Description | | |||||
| | :------ | :------: | :------ | | |||||
| | [dc-chart](https://github.com/dvgis/dc-chart) | <img src="https://img.shields.io/npm/v/@dvgis/dc-chart?logo=npm" /> | dc chart module for adding ECharts functionality in 3d scenes | | |||||
| | [dc-mapv](https://github.com/dvgis/dc-mapv) | <img src="https://img.shields.io/npm/v/@dvgis/dc-mapv?logo=npm" /> | dc big-data module for adding MAPV functions in 3d scenes | | |||||
| | [dc-ui](https://github.com/dvgis/dc-ui) | <img src="https://img.shields.io/npm/v/@dvgis/dc-ui?logo=npm" /> | dc components for Vue2.x | | |||||
| | dc-analysis | <img src="https://img.shields.io/npm/v/@dvgis/dc-analysis?logo=npm" /> | dc analysis module, including camera-video, position-editor, measure, etc | | |||||
| | dc-ui-next | <img src="https://img.shields.io/npm/v/@dvgis/dc-ui-next?logo=npm" /> | dc components for Vue3.x | | |||||
| ## QQ Group | |||||
| <p> | |||||
| <img src="http://dc.dvgis.cn/examples/images/base/q1.png?v=2" style="width:60px;height:60px" title="数字视觉"/> | |||||
| <img src="http://dc.dvgis.cn/examples/images/base/q2.png?v=6" style="width:60px;height:60px" title="Cesium开心农场"/> | |||||
| </p> | |||||
| ## Copyright | |||||
| ```warning | ```warning | ||||
| 1. The framework is a basic platform, completely open source, which can be modified and reconstructed by any individual or institution without our authorization. | 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: | |||||
| 2. We are not responsible for any problems arising from the modification of the framework by individuals and organizations. | |||||
| 3. Some industrial plug-ins and tools will be added in the later stage, and the code will be open source appropriately. | |||||
| 4. The package released by us may be used permanently and free of charge by any person or organization subject to: | |||||
| 1) complete package reference; | 1) complete package reference; | ||||
| 2) reserve this copyright information in the console output | 2) reserve this copyright information in the console output | ||||
| We reserve the right of final interpretation of this copyright information. | We reserve the right of final interpretation of this copyright information. | ||||
| ``` | ``` | ||||
| ## Support | |||||
| > if dc-sdk can bring benefits to you, please support it ~ | |||||
| <p> | |||||
| <img src="http://dc.dvgis.cn/examples/images/base/sponsor.jpg?v=2" style="width:60px;height:60px" title="数字视觉"/> | |||||
| </p> | |||||
| ## Thanks | ## Thanks |
| # DC-Mapv | |||||
| <p> | |||||
| <img src="https://img.shields.io/badge/license-Apache%202-blue"/> | |||||
| <img src="https://img.shields.io/github/package-json/v/dvgis/dc-mapv?color=orange&logo=github" /> | |||||
| <img src="https://img.shields.io/npm/dw/@dvgis/dc-mapv?logo=npm"/> | |||||
| </p> | |||||
| [**🇨🇳 中文**](./README_zh.md) | [**🇬🇧English**](./README.md) | |||||
| > DC-Mapv 是 DC-SDK 与 百度 Mapv 融合的产品。主要用于在 3D 场景中展现大数据。 | |||||
| > [主页](http://dc.dvgis.cn) | |||||
| ```warning | |||||
| Tips:This SDK is JS+GIS framework package. Developers need to have some front-end technology and GIS related technology | |||||
| ``` | |||||
| ## 安装 | |||||
| > CDN | |||||
| ```html | |||||
| <!--基础包--> | |||||
| <script src="libs/dc-sdk/dc.base.min.js"></script> | |||||
| <!--核心包--> | |||||
| <script src="libs/dc-sdk/dc.core.min.js"></script> | |||||
| <!--Mapv 包--> | |||||
| <script src="libs/dc-sdk/dc.mapv.min.js"></script> | |||||
| <!--主要样式--> | |||||
| <link href="libs/dc-sdk/dc.core.min.css" rel="stylesheet" type="text/css" /> | |||||
| ``` | |||||
| > NPM / YARN | |||||
| ```node | |||||
| yarn add @dvgis/dc-sdk @dvgis/dc-mapv | |||||
| npm install @dvgis/dc-sdk @dvgis/dc-mapv | |||||
| ``` | |||||
| ```js | |||||
| import DC from 'dvgis/dc-sdk/dist/dc.base.min' //基础包 | |||||
| import DcCore from 'dvgis/dc-sdk/dist/dc.core.min' //核心包 | |||||
| import DcMapv from 'dvgis/dc-mapv/dist/dc.plugins.min' //Mapv 包 | |||||
| import 'dvgis/dc-sdk/dist/dc.core.min.css' // 主要样式 | |||||
| ``` | |||||
| ## 配置 | |||||
| > Vue | |||||
| ```js | |||||
| // vue.config.js | |||||
| const path = require('path') | |||||
| const CopywebpackPlugin = require('copy-webpack-plugin') | |||||
| const dvgis = './node_modules/@dvgis' | |||||
| module.exports = { | |||||
| // 其他配置 | |||||
| chainWebpack: (config) => { | |||||
| config.resolve.alias.set('dvgis', path.resolve(__dirname, dvgisDist)) | |||||
| config.plugin('copy').use(CopywebpackPlugin, [ | |||||
| [ | |||||
| { | |||||
| from: path.join(dvgisDist, 'dc-sdk/dist/resources'), | |||||
| to: 'libs/dc-sdk/resources', | |||||
| }, | |||||
| ], | |||||
| ]) | |||||
| }, | |||||
| } | |||||
| ``` | |||||
| ## 文档 | |||||
| [Cesium Api](https://cesium.com/docs/cesiumjs-ref-doc/) | |||||
| [Mapv Api](https://github.com/huiyan-fe/mapv/blob/master/API.md) | |||||
| [DC-Mapv Api](http://resource.dvgis.cn/dc-api/mapv/) | |||||
| ## 示例 | |||||
| |  |  |  |  | | |||||
| | :------------------------------------------------------------: | :---------------------------------------------------------------: | :---------------------------------------------------------------: | :-------------------------------------------------------------: | | |||||
| |  |  |  |  | | |||||
| |  |  | | | |||||
| [More>>](http://dc.dvgis.cn/#/examples) | |||||
| ## 版权声明 | |||||
| ```warning | |||||
| 1.框架是一个基本平台,完全开源,任何个人和机构可以修改、重构,无需经过我方授权。 | |||||
| 2.后期会添加一系列针对性的插件和工具,会适量的开源。 | |||||
| 3.任何个人和机构在遵守下列条件的前提下可以永久免费使用: | |||||
| 1)程序包完整引用; | |||||
| 2)保留此版权信息在控制台输出 | |||||
| 我方保留对此版权信息的最终解释权。 | |||||
| ``` | |||||
| ## 感谢 |
| <img src="https://img.shields.io/github/workflow/status/dvgis/dc-sdk/publish"/> | <img src="https://img.shields.io/github/workflow/status/dvgis/dc-sdk/publish"/> | ||||
| <img src="https://img.shields.io/badge/license-Apache%202-blue"/> | <img src="https://img.shields.io/badge/license-Apache%202-blue"/> | ||||
| <img src="https://img.shields.io/npm/v/@dvgis/dc-sdk?color=orange&logo=npm" /> | <img src="https://img.shields.io/npm/v/@dvgis/dc-sdk?color=orange&logo=npm" /> | ||||
| <img src="https://img.shields.io/npm/dm/@dvgis/dc-sdk?logo=npm"/> | |||||
| <img src="https://img.shields.io/npm/dt/@dvgis/dc-sdk?logo=npm"/> | |||||
| </p> | </p> | ||||
| [**🇨🇳 中文**](./README_zh.md) | [**🇬🇧English**](./README.md) | |||||
| > DC-SDK is based on Cesium for secondary development of 2, 3D all-in-one WebGis application framework, the framework optimizes the use of Cesium and add some additional features, designed for developers to quickly build WebGis applications. | |||||
| **_`DC-SDK`_** is based on the open source project **_`Cesium`_** for the second development of two three-dimensional **_`WebGis`_** application framework , the framework optimizes the use of **_`Cesium`_** and adds some additional features , designed for developers to quickly build **_`WebGis`_** application. | |||||
| ## Home | ## Home | ||||
| > http://dc.dvgis.cn | > http://dc.dvgis.cn | ||||
| ```warningH | |||||
| ```warning | |||||
| Tips:This SDK is JS+GIS framework package. Developers need to have some front-end technology and GIS related technology | Tips:This SDK is JS+GIS framework package. Developers need to have some front-end technology and GIS related technology | ||||
| ``` | ``` | ||||
| ## Installation | ## Installation | ||||
| `CDN` | |||||
| `NPM / YARN` **_`(Recommend)`_** | |||||
| ```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> | |||||
| <!--Main Style Sheet --> | |||||
| <link href="libs/dc-sdk/dc.core.min.css" rel="stylesheet" type="text/css" /> | |||||
| ``` | |||||
| Installing with NPM or YARN is recommended and it works seamlessly with webpack. | |||||
| `NPM / YARN` | |||||
| ```shell | |||||
| ```node | |||||
| yarn add @dvgis/dc-sdk | yarn add @dvgis/dc-sdk | ||||
| ------------------------- | |||||
| npm install @dvgis/dc-sdk | npm install @dvgis/dc-sdk | ||||
| ``` | ``` | ||||
| ```js | ```js | ||||
| import DC from '@dvgis/dc-base' //Basic Package | |||||
| import DcCore from '@dvgis/dc-core' //Core Package | |||||
| import '@dvgis/dc-core/dist/dc.core.min.css' // Main Style Sheet | |||||
| import DC from '@dvgis/dc-sdk/dist/dc.base.min' | |||||
| import DcCore from '@dvgis/dc-sdk/dist/dc.core.min' | |||||
| import DcChart from '@dvgis/dc-sdk/dist/dc.chart.min' | |||||
| import DcMapv from '@dvgis/dc-sdk/dist/dc.mapv.min' | |||||
| import '@dvgis/dc-sdk/dist/dc.core.min.css' | |||||
| ``` | |||||
| `NPM / YARN` **_`(On-demand)`_** | |||||
| ```node | |||||
| yarn add @dvgis/dc-base | |||||
| yarn add @dvgis/dc-core | |||||
| yarn add @dvgis/dc-chart | |||||
| yarn add @dvgis/dc-mapv | |||||
| ------------------------- | |||||
| npm install @dvgis/dc-base | |||||
| npm install @dvgis/dc-core | |||||
| npm install @dvgis/dc-chart | |||||
| npm install @dvgis/dc-mapv | |||||
| ``` | |||||
| ```js | |||||
| import DC from '@dvgis/dc-base' | |||||
| import DcCore from '@dvgis/dc-core' | |||||
| import DcChart from '@dvgis/dc-chart' | |||||
| import DcMapv from '@dvgis/dc-mapv' | |||||
| import '@dvgis/dc-core/dist/dc.core.min.css' | |||||
| ``` | |||||
| `CDN` | |||||
| [Resources](https://github.com/dvgis/dc-sdk/releases) | |||||
| ```html | |||||
| <script src="https://cdn.jsdelivr.net/npm/@dvgis/dc-sdk/dist/dc.base.min.js"></script> | |||||
| <script src="https://cdn.jsdelivr.net/npm/@dvgis/dc-sdk/dist/dc.core.min.js"></script> | |||||
| <script src="https://cdn.jsdelivr.net/npm/@dvgis/dc-sdk/dist/dc.chart.min.js"></script> | |||||
| <script src="https://cdn.jsdelivr.net/npm/@dvgis/dc-sdk/dist/dc.mapv.min.js"></script> | |||||
| <link | |||||
| href="https://cdn.jsdelivr.net/npm/@dvgis/dc-sdk/dist/dc.core.min.css" | |||||
| rel="stylesheet" | |||||
| type="text/css" | |||||
| /> | |||||
| ``` | ``` | ||||
| ## Setting | |||||
| ``` | |||||
| Please put the resources in the project root directory libs/dc-sdk, if you put it in other directory, the framework will not run properly. | |||||
| ``` | |||||
| ## Configuration | |||||
| > The configuration is mainly used in the `NPM / YARN` way | |||||
| Since the DC framework sets `CESIUM_BASE_URL` to `JSON.stringify('. /libs/dc-sdk/resources/')`, you need to copy `Cesium` static resource files: `Assets`, `Workers`, `ThirdParty` to the `libs/dc-sdk/resources` directory of the project to ensure that the 3D scene can be rendered properly. | |||||
| `Webpack` | `Webpack` | ||||
| ```js | |||||
| // webpack.config.js | |||||
| [Project Template](https://github.com/cavencj/dc-vue-app) | |||||
| ```js | |||||
| // webpack.config.js | |||||
| const path = require('path') | const path = require('path') | ||||
| const CopywebpackPlugin = require('copy-webpack-plugin') | const CopywebpackPlugin = require('copy-webpack-plugin') | ||||
| const dvgisDist = './node_modules/@dvgis' | const dvgisDist = './node_modules/@dvgis' | ||||
| module.exports = { | module.exports = { | ||||
| // other settings | |||||
| plugins:[ | |||||
| plugins: [ | |||||
| new CopyWebpackPlugin([ | new CopyWebpackPlugin([ | ||||
| { | |||||
| { | |||||
| from: path.join(dvgisDist, 'dc-sdk/dist/resources'), | from: path.join(dvgisDist, 'dc-sdk/dist/resources'), | ||||
| to: 'libs/dc-sdk/resources' | |||||
| } | |||||
| ]) | |||||
| ] | |||||
| to: 'libs/dc-sdk/resources', | |||||
| }, | |||||
| ]), | |||||
| ], | |||||
| } | } | ||||
| ``` | ``` | ||||
| `Vue2.x` | `Vue2.x` | ||||
| [Project Template](https://github.com/dvgis/dc-vue) | |||||
| ```js | ```js | ||||
| // vue.config.js | // vue.config.js | ||||
| const path = require('path') | const path = require('path') | ||||
| const CopywebpackPlugin = require('copy-webpack-plugin') | const CopywebpackPlugin = require('copy-webpack-plugin') | ||||
| const dvgisDist = './node_modules/@dvgis' | const dvgisDist = './node_modules/@dvgis' | ||||
| module.exports = { | module.exports = { | ||||
| // other settings | |||||
| chainWebpack: config => { | |||||
| config.resolve.alias.set('dvgis', path.resolve(__dirname, dvgisDist)) | |||||
| chainWebpack: (config) => { | |||||
| config.plugin('copy').use(CopywebpackPlugin, [ | config.plugin('copy').use(CopywebpackPlugin, [ | ||||
| [ | [ | ||||
| { | { | ||||
| from: path.join(dvgisDist, 'dc-sdk/dist/resources'), | from: path.join(dvgisDist, 'dc-sdk/dist/resources'), | ||||
| to: 'libs/dc-sdk/resources' | |||||
| } | |||||
| ] | |||||
| to: 'libs/dc-sdk/resources', | |||||
| }, | |||||
| ], | |||||
| ]) | ]) | ||||
| } | |||||
| }, | |||||
| } | } | ||||
| ``` | ``` | ||||
| `Vue3.x` | `Vue3.x` | ||||
| [Project Template](https://github.com/dvgis/dc-vue-next) | |||||
| ```js | ```js | ||||
| // vue.config.js | // vue.config.js | ||||
| const path = require('path') | const path = require('path') | ||||
| const CopywebpackPlugin = require('copy-webpack-plugin') | const CopywebpackPlugin = require('copy-webpack-plugin') | ||||
| const dvgisDist = './node_modules/@dvgis' | const dvgisDist = './node_modules/@dvgis' | ||||
| module.exports = { | module.exports = { | ||||
| // other settings | |||||
| chainWebpack: config => { | |||||
| config.resolve.alias.set('dvgis', path.resolve(__dirname, dvgisDist)) | |||||
| chainWebpack: (config) => { | |||||
| config.plugin('copy').use(CopywebpackPlugin, [ | config.plugin('copy').use(CopywebpackPlugin, [ | ||||
| { | { | ||||
| patterns: [ | patterns: [ | ||||
| to: path.join(__dirname, 'dist', 'libs/dc-sdk/resources'), | to: path.join(__dirname, 'dist', 'libs/dc-sdk/resources'), | ||||
| }, | }, | ||||
| ], | ], | ||||
| } | |||||
| }, | |||||
| ]) | ]) | ||||
| } | |||||
| }, | |||||
| } | } | ||||
| ``` | ``` | ||||
| ## Start | ## Start | ||||
| ```js | ```js | ||||
| <img src="http://dc.dvgis.cn/examples/images/base/q2.png?v=6" style="width:60px;height:60px" title="Cesium开心农场"/> | <img src="http://dc.dvgis.cn/examples/images/base/q2.png?v=6" style="width:60px;height:60px" title="Cesium开心农场"/> | ||||
| </p> | </p> | ||||
| ## Copyright | ## Copyright | ||||
| ```warning | ```warning |