cesium_dev_kit 1.0.63 → 1.0.65

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.
package/README.md CHANGED
@@ -45,6 +45,8 @@ import { initCesium } from 'cesium_dev_kit'
45
45
 
46
46
  ## 使用
47
47
 
48
+ ### 1、引入所有模块
49
+
48
50
  ```javaScript
49
51
  // test.vue
50
52
  <template>
@@ -92,6 +94,70 @@ export default {
92
94
  </script>
93
95
  ```
94
96
 
97
+ ### 2、按需引入
98
+
99
+ ```javaScript
100
+ // test.vue
101
+ <template>
102
+ <div id="cesiumContainer"
103
+ class="map3d-contaner"></div>
104
+ </template>
105
+ <script>
106
+ import { Draw } from 'cesium_dev_kit'
107
+ export default {
108
+ mounted() {
109
+ this.initMap()
110
+ },
111
+ methods: {
112
+ initMap() {
113
+ const tempData = [
114
+ {
115
+ id: 3,
116
+ name: '高德地图02',
117
+ type: 'UrlTemplateImageryProvider',
118
+ classConfig: {
119
+ url: 'https://webst02.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}',
120
+ },
121
+ interfaceConfig: {},
122
+ offset: '0,0',
123
+ invertswitch: 0,
124
+ filterRGB: '#ffffff',
125
+ showswitch: 1,
126
+ weigh: 13,
127
+ createtime: 1624346908,
128
+ updatetime: 1647395260,
129
+ }]
130
+
131
+ const drawObj = new Draw({
132
+ cesiumGlobal: Cesium, // 全局Cesium对象
133
+ containerId: 'cesiumContainer', // 容器id
134
+ viewerConfig: { // 同官方的viewer配置相同
135
+ infoBox: false,
136
+ shouldAnimate: true,
137
+ },
138
+ extraConfig: {// 其他配置
139
+ logo:true, // 是否显示logo
140
+ depthTest:true // 是否开启深度测试
141
+ },
142
+ MapImageryList: tempData // 底图配置
143
+ defaultStatic // 默认服务器地址以及材质等基础信息配置,具体请参考src\views\example\defaultStaticConf\index.js
144
+ })
145
+
146
+ this.c_viewer = drawObj.viewer
147
+ this.draw = drawObj.draw
148
+ this.draw.setDefSceneConfig()
149
+ this.draw.setBloomLightScene()
150
+ this.load3dTiles(drawObj.viewer)
151
+
152
+ this.StraightArrowObj = drawObj.straightArrowObj
153
+ this.AttackArrowObj = drawObj.attackArrowObj
154
+ this.PincerArrowObj = drawObj.pincerArrowObj
155
+ }
156
+ }
157
+ }
158
+ </script>
159
+ ```
160
+
95
161
  ### 如需在 H5 中使用
96
162
 
97
163
  - html 中直接引入 index.umd.js