Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

README.md 6.3KB

před 4 roky
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. # DC-SDK
  2. <p>
  3. <img src="https://img.shields.io/github/workflow/status/dvgis/dc-sdk/publish"/>
  4. <img src="https://img.shields.io/badge/license-Apache%202-blue"/>
  5. <img src="https://img.shields.io/npm/v/@dvgis/dc-sdk?color=orange&logo=npm" />
  6. <img src="https://img.shields.io/npm/dm/@dvgis/dc-sdk?logo=npm"/>
  7. </p>
  8. [**🇨🇳 中文**](./README_zh.md) | [**🇬🇧English**](./README.md)
  9. > 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.
  10. ## Home
  11. > http://dc.dvgis.cn
  12. ```warningH
  13. Tips:This SDK is JS+GIS framework package. Developers need to have some front-end technology and GIS related technology
  14. ```
  15. ## Installation
  16. `CDN`
  17. ```html
  18. <!--Basic Package-->
  19. <script src="libs/dc-sdk/dc.base.min.js"></script>
  20. <!--Core Package-->
  21. <script src="libs/dc-sdk/dc.core.min.js"></script>
  22. <!--Main Style Sheet -->
  23. <link href="libs/dc-sdk/dc.core.min.css" rel="stylesheet" type="text/css" />
  24. ```
  25. `NPM / YARN`
  26. ```shell
  27. yarn add @dvgis/dc-sdk
  28. npm install @dvgis/dc-sdk
  29. ```
  30. ```js
  31. import DC from '@dvgis/dc-base' //Basic Package
  32. import DcCore from '@dvgis/dc-core' //Core Package
  33. import '@dvgis/dc-core/dist/dc.core.min.css' // Main Style Sheet
  34. ```
  35. ## Setting
  36. `Webpack`
  37. ```js
  38. // webpack.config.js
  39. const path = require('path')
  40. const CopywebpackPlugin = require('copy-webpack-plugin')
  41. const dvgisDist = './node_modules/@dvgis'
  42. module.exports = {
  43. // other settings
  44. plugins:[
  45. new CopyWebpackPlugin([
  46. {
  47. from: path.join(dvgisDist, 'dc-sdk/dist/resources'),
  48. to: 'libs/dc-sdk/resources'
  49. }
  50. ])
  51. ]
  52. }
  53. ```
  54. `Vue2.x`
  55. ```js
  56. // vue.config.js
  57. const path = require('path')
  58. const CopywebpackPlugin = require('copy-webpack-plugin')
  59. const dvgisDist = './node_modules/@dvgis'
  60. module.exports = {
  61. // other settings
  62. chainWebpack: config => {
  63. config.resolve.alias.set('dvgis', path.resolve(__dirname, dvgisDist))
  64. config.plugin('copy').use(CopywebpackPlugin, [
  65. [
  66. {
  67. from: path.join(dvgisDist, 'dc-sdk/dist/resources'),
  68. to: 'libs/dc-sdk/resources'
  69. }
  70. ]
  71. ])
  72. }
  73. }
  74. ```
  75. `Vue3.x`
  76. ```js
  77. // vue.config.js
  78. const path = require('path')
  79. const CopywebpackPlugin = require('copy-webpack-plugin')
  80. const dvgisDist = './node_modules/@dvgis'
  81. module.exports = {
  82. // other settings
  83. chainWebpack: config => {
  84. config.resolve.alias.set('dvgis', path.resolve(__dirname, dvgisDist))
  85. config.plugin('copy').use(CopywebpackPlugin, [
  86. {
  87. patterns: [
  88. {
  89. from: path.join(dvgisDist, 'dc-sdk/dist/resources'),
  90. to: path.join(__dirname, 'dist', 'libs/dc-sdk/resources'),
  91. },
  92. ],
  93. }
  94. ])
  95. }
  96. }
  97. ```
  98. ## Start
  99. ```js
  100. global.DC = DC
  101. DC.use(DcCore) // node
  102. DC.ready(() => {
  103. 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
  104. })
  105. ```
  106. ## Documentation
  107. [DC Sdk Api](https://resource.dvgis.cn/dc-api/v2.x)
  108. [Cesium Api](https://cesium.com/docs/cesiumjs-ref-doc/)
  109. ## Demo
  110. | ![picture](http://dc.dvgis.cn/examples/images/baselayer/baidu.png?v=1) | ![picture](http://dc.dvgis.cn/examples/images/baselayer/tdt.png?v=1) | ![picture](http://dc.dvgis.cn/examples/images/baselayer/arcgis.png?v=2) | ![picture](http://dc.dvgis.cn/examples/images/mini-scene/china.gif) |
  111. | :-----------------------------------------------------------: | :-----------------------------------------------------------: | :------------------------------------------------------------------: | :--------------------------------------------------------------: |
  112. | ![picture](http://dc.dvgis.cn/examples/images/mini-scene/dfmz.gif) | ![picture](http://dc.dvgis.cn/examples/images/mini-scene/factory.gif?v=1) | ![picture](http://dc.dvgis.cn/examples/images/layer/cluster_circle.gif) | ![picture](http://dc.dvgis.cn/examples/images/model/shp_custom_shader.gif) |
  113. | ![picture](http://dc.dvgis.cn/examples/images/overlay/polyline_image_trail.gif) | ![picture](http://dc.dvgis.cn/examples/images/overlay/wall_trail.gif?v=1) | ![picture](http://dc.dvgis.cn/examples/images/overlay/water.gif?v=2) | ![picture](http://dc.dvgis.cn/examples/images/overlay/plot-overlay.png) |
  114. [More>>](http://dc.dvgis.cn/#/examples)
  115. ## Ecosystem
  116. | Module | Status | Description |
  117. | :------ | :------: | :------ |
  118. | [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 |
  119. | [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 |
  120. | [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 |
  121. | 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 |
  122. | dc-ui-next | <img src="https://img.shields.io/npm/v/@dvgis/dc-ui-next?logo=npm" /> | dc components for Vue3.x |
  123. ## QQ Group
  124. <p>
  125. <img src="http://dc.dvgis.cn/examples/images/base/q1.png?v=2" style="width:60px;height:60px" title="数字视觉"/>
  126. <img src="http://dc.dvgis.cn/examples/images/base/q2.png?v=6" style="width:60px;height:60px" title="Cesium开心农场"/>
  127. </p>
  128. ## Copyright
  129. ```warning
  130. 1. The framework is a basic platform, completely open source, which can be modified and reconstructed by any individual or institution without our authorization.
  131. 2. We are not responsible for any problems arising from the modification of the framework by individuals and organizations.
  132. 3. Some industrial plug-ins and tools will be added in the later stage, and the code will be open source appropriately.
  133. 4. The package released by us may be used permanently and free of charge by any person or organization subject to:
  134. 1) complete package reference;
  135. 2) reserve this copyright information in the console output
  136. We reserve the right of final interpretation of this copyright information.
  137. ```
  138. ## Support
  139. > if dc-sdk can bring benefits to you, please support it ~
  140. <p>
  141. <img src="http://dc.dvgis.cn/examples/images/base/sponsor.jpg?v=2" style="width:60px;height:60px" title="数字视觉"/>
  142. </p>
  143. ## Thanks