@mapgis/webclient-vue-cesium 10.5.5-1 → 10.5.5-6

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.
Files changed (124) hide show
  1. package/README.md +46 -49
  2. package/dist-libs/webclient-vue-cesium.common.js +191087 -0
  3. package/dist-libs/webclient-vue-cesium.css +1 -1
  4. package/dist-libs/webclient-vue-cesium.umd.js +191097 -0
  5. package/dist-libs/webclient-vue-cesium.umd.min.js +204 -194
  6. package/docs/.vuepress/config.js +47 -46
  7. package/docs/README.md +5 -4
  8. package/docs/api/analysis/Aspect.md +236 -0
  9. package/docs/api/analysis/Contour.md +240 -0
  10. package/docs/api/analysis/CutFill.md +306 -0
  11. package/docs/api/analysis/DynamicSection.md +336 -0
  12. package/docs/api/analysis/Excavate.md +3 -11
  13. package/docs/api/analysis/Flood.md +177 -200
  14. package/docs/api/analysis/HeightLimited.md +7 -4
  15. package/docs/api/analysis/ParticleEffects.md +549 -0
  16. package/docs/api/analysis/Profile.md +464 -0
  17. package/docs/api/analysis/Shadow.md +76 -13
  18. package/docs/api/analysis/Sightline.md +66 -13
  19. package/docs/api/analysis/Skyline.md +144 -29
  20. package/docs/api/analysis/Slope.md +236 -0
  21. package/docs/api/analysis/Viewshed.md +100 -21
  22. package/docs/api/layer/IGServer/IgsDocLayer.md +10 -0
  23. package/docs/api/layer/IGServer/IgsFeatureLayer.md +253 -0
  24. package/docs/api/layer/IGServer/IgsTileLayer.md +11 -0
  25. package/docs/api/layer/OGC/CesiumOgcWmsLayer.md +20 -19
  26. package/docs/api/layer/OGC/Wms.png +0 -0
  27. package/docs/api/layer/marker/DynamicMarker.md +81 -0
  28. package/docs/api/layer/marker/dynamicmarker.png +0 -0
  29. package/docs/api/layer/marker/selects.png +0 -0
  30. package/docs/api/layer/vectortile/vectortile.md +10 -0
  31. package/docs/api/m3d/image/layer_control_1.png +0 -0
  32. package/docs/api/m3d/image/layer_control_2.png +0 -0
  33. package/docs/api/m3d/image/layer_control_3.png +0 -0
  34. package/docs/api/m3d/m3d.md +13 -2
  35. package/docs/api/service/comprehensiveQuery/comprehensiveQuery.md +946 -0
  36. package/docs/api/ui/draw.md +68 -40
  37. package/docs/api/ui/link.md +8 -1
  38. package/docs/api/ui/marker.md +19 -1
  39. package/docs/api/ui/measure.md +82 -10
  40. package/docs/api/ui/table.md +6 -6
  41. package/docs/guide/README.md +26 -23
  42. package/docs/guide/basemap.md +35 -33
  43. package/docs/guide/markers&popups.md +46 -53
  44. package/docs/plugin_components/create_storybook.md +241 -0
  45. package/docs/plugin_components/img.png +0 -0
  46. package/docs/plugin_components/img_1.png +0 -0
  47. package/docs/plugin_components/img_10.png +0 -0
  48. package/docs/plugin_components/img_2.png +0 -0
  49. package/docs/plugin_components/img_3.png +0 -0
  50. package/docs/plugin_components/img_4.png +0 -0
  51. package/docs/plugin_components/img_5.png +0 -0
  52. package/docs/plugin_components/img_6.png +0 -0
  53. package/docs/plugin_components/img_7.png +0 -0
  54. package/docs/plugin_components/img_8.png +0 -0
  55. package/docs/version/diff.md +4 -4
  56. package/docs/version/version.md +81 -0
  57. package/package.json +5 -5
  58. package/src/cdn/cdn_component.js +62 -0
  59. package/src/component.js +20 -2
  60. package/src/components/Analysis/Aspect.vue +318 -0
  61. package/src/components/Analysis/Contour.vue +257 -0
  62. package/src/components/Analysis/CutFill.vue +581 -0
  63. package/src/components/Analysis/DynamicCutting.vue +98 -59
  64. package/src/components/Analysis/DynamicSection.vue +494 -0
  65. package/src/components/Analysis/Excavate.vue +133 -87
  66. package/src/components/Analysis/Flood.vue +395 -487
  67. package/src/components/Analysis/Flood.vue-- +630 -0
  68. package/src/components/Analysis/HeightLimited.vue +66 -47
  69. package/src/components/Analysis/ModelFlatten.vue +2 -2
  70. package/src/components/Analysis/Profile.vue +503 -0
  71. package/src/components/Analysis/Shadow.vue +220 -309
  72. package/src/components/Analysis/Sightline.vue +393 -375
  73. package/src/components/Analysis/SkyLine.vue +283 -93
  74. package/src/components/Analysis/Slope.vue +317 -0
  75. package/src/components/Analysis/Viewshed.vue +806 -373
  76. package/src/components/Analysis/skyline2dChartOptions.js +66 -0
  77. package/src/components/DataSource/Geojson/GeoJsonDataSource.vue +201 -3
  78. package/src/components/Layer/GeoJSON/GeoJsonLayer.vue +345 -0
  79. package/src/components/Layer/IGServer/IgsFeatureLayer.vue +227 -0
  80. package/src/components/Layer/Marker/DynamicMarkerLayer.vue +487 -0
  81. package/src/components/Layer/Marker/Marker3dPro.vue +196 -0
  82. package/src/components/Layer/Marker/Marker3dSetPro.vue +67 -0
  83. package/src/components/Layer/VectorTile/VectorTileLayer.vue +117 -33
  84. package/src/components/Layer/VectorTile/VectorTileOptions.js +1 -1
  85. package/src/components/M3D/3DTilesetOptions.js +23 -1
  86. package/src/components/M3D/G3D.vue +150 -0
  87. package/src/components/M3D/M3d.vue +142 -32
  88. package/src/components/M3D/M3dSet.vue +118 -0
  89. package/src/components/M3D/M3dType.js +24 -0
  90. package/src/components/Overlay/Mapv3dLayer.vue +2 -0
  91. package/src/components/Overlay/ParticleEffects.vue +545 -0
  92. package/src/components/Overlay/mapv/MapvBaseLayer.js +351 -172
  93. package/src/components/Overlay/mapv/MapvLayer.js +372 -324
  94. package/src/components/Overlay/mapv/SuperCluster.js +611 -0
  95. package/src/components/Overlay/themeLayer/heater/CesiumHeater.vue +152 -0
  96. package/src/components/Overlay/themeLayer/heater/MapvHeater.vue +161 -0
  97. package/src/components/UI/Controls/Draw/Draw.vue +320 -92
  98. package/src/components/UI/Controls/Legend/Legend.vue +55 -51
  99. package/src/components/UI/Controls/Link/Link.vue +59 -37
  100. package/src/components/UI/Controls/Measure/Measure.vue +75 -33
  101. package/src/components/UI/Controls/Measure/components/MeasureResult.vue +71 -0
  102. package/src/components/UI/Controls/Measure/components/MeasureSetting.vue +63 -0
  103. package/src/components/UI/Controls/Measure/components/MeasureTool.vue +155 -0
  104. package/src/components/UI/Geojson/Popup.vue +101 -0
  105. package/src/components/UI/Marker/Marker.vue +185 -48
  106. package/src/components/UI/Popup/Popup.vue +21 -64
  107. package/src/components/Utils/common/color-util.js +159 -0
  108. package/src/components/Utils/util.js +311 -231
  109. package/src/components/WebGlobe/manager.js +81 -3
  110. package/src/components/WebGlobe/mixins/withPrivateMethods.js +4 -2
  111. package/src/components/WebGlobe/util.js +173 -0
  112. package/src/components/service/comprehensive-query/ComprehensiveQuery.vue +156 -0
  113. package/src/components/service/comprehensive-query/PlaceNameCesium.vue +102 -0
  114. package/src/components/service/comprehensive-query/util/catalog/document.js +626 -0
  115. package/src/components/service/comprehensive-query/util/feature/arcgis-feature-query.js +448 -0
  116. package/src/components/service/comprehensive-query/util/feature/feature-convert.js +408 -0
  117. package/src/components/service/comprehensive-query/util/feature/feature-edit.js +50 -0
  118. package/src/components/service/comprehensive-query/util/feature/feature-geojson.js +100 -0
  119. package/src/components/service/comprehensive-query/util/feature/feature-query.js +723 -0
  120. package/src/components/service/comprehensive-query/util/feature/feature.js +1 -0
  121. package/src/components/service/comprehensive-query/util/feature/index.js +9 -0
  122. package/src/components/service/comprehensive-query/util/objects/geometry.js +58 -0
  123. package/src/components/Overlay/Mapv.vue +0 -142
  124. package/src/components/Overlay/MapvHeater.vue +0 -98
@@ -1,60 +1,175 @@
1
- # 天际线分析
2
-
3
1
  > mapgis-3d-skyline
4
2
 
5
3
  ## 属性
4
+ ### `vueKey`
6
5
 
7
- [comment]: <> (### `index`)
6
+ - **类型:** `String`
7
+ - **可选**
8
+ - **非侦听属性**
9
+ - **默认值:** `default`
10
+ - **描述:**
8
11
 
9
- [comment]: <> (- **类型:** `Number`)
12
+ ```
13
+ mapgis-web-scene组件的ID,当使用多个mapgis-web-scene组件时,需要指定该值,来唯一标识mapgis-web-scene组件,
14
+ 同时mapgis-web-scene插槽中的组件也需要传入相同的vueKey,让组件知道应该作用于哪一个mapgis-web-scene。
15
+ ```
10
16
 
11
- [comment]: <> (- **默认值:** `0`)
17
+ ### `vueIndex`
12
18
 
13
- [comment]: <> (- **非侦听属性**)
19
+ - **类型:** `Number`
20
+ - **可选**
21
+ - **非侦听属性**
22
+ - **描述:**
14
23
 
15
- [comment]: <> (- **描述:** 图层的索引值,表示第几个图层)
24
+ ```
25
+ 当mapgis-web-scene插槽中使用了多个相同组件时,例如多个mapgis-3d-igs-doc-layer组件,用来区分组件的标识符。
26
+ ```
16
27
 
17
- ### `position`
28
+ ### `skylineWidth`
29
+
30
+ - **类型:** `Number`
31
+ - **可选**
32
+ - **侦听属性**
33
+ - **默认值:** 2
34
+ - **描述:** 天际线宽度
35
+
36
+ ### `skylineColor`
18
37
 
19
38
  - **类型:** `String`
20
- - **默认值:** `right`
21
- - **非侦听属性**
22
- - **描述:** 分析面板的位置(right:右边 | left: 左边)
39
+ - **可选**
40
+ - **侦听属性**
41
+ - **默认值:** rgb(255,0,0)
42
+ - **描述:** 天际线颜色
43
+
44
+
45
+ ## 事件
46
+
47
+ ### `@load`
48
+
49
+ - **Description:** 在 Skyline组件 加载完毕后发送该事件
50
+ - **Payload** 天际线分析对象
51
+
52
+
53
+ ### `@success`
54
+
55
+ - **Description:** 在天际线分析结束后发送该事件
56
+
57
+ ### `@showAnalysis2d`
58
+
59
+ - **Description:** 在点击二维天际线echarts图表分析后 发送该事件
60
+ - **Payload** 二维天际线图表echarts对象
61
+
62
+ ### `@remove`
63
+
64
+ - **Description:** 在移除分析对象和分析结果后,发送该事件
65
+
66
+ ### `@unload`
67
+
68
+ - **Description:** 在销毁组件后,发送该事件
69
+
23
70
 
24
71
  ## 示例
25
72
 
26
73
  ```vue
27
74
  <template>
28
- <mapgis-web-scene
29
- style="height:90vh"
30
- lib-path="statics/libs/cdn/cesium/Cesium.js"
31
- plugin-path="statics/libs/cdn/zondyclient/webclient-cesium-plugin.min.js"
32
- >
33
- <mapgis-3d-raster-layer
34
- url="http://t0.tianditu.com/DataServer?T=vec_w&L={z}&Y={y}&X={x}&tk=9c157e9585486c02edf817d2ecbc7752"
35
- ></mapgis-3d-raster-layer>
36
- <mapgis-3d-igs-m3d
37
- :autoReset="autoReset"
38
- :maximumScreenSpaceError="maximumScreenSpaceError"
39
- :url="m3dUrl"
40
- />
41
- <mapgis-3d-skyline></mapgis-3d-skyline>
75
+ <mapgis-web-scene style="height:95vh">
76
+ <mapgis-3d-raster-layer :url="url"/>
77
+ <mapgis-3d-igs-m3d :autoReset="autoReset" :maximumScreenSpaceError="maximumScreenSpaceError" :url="m3dUrl"/>
78
+ <mapgis-ui-card customPosition="top-left">
79
+ <mapgis-3d-skyline
80
+ :skylineWidth='skylineWidth'
81
+ :skylineColor='skylineColor'
82
+ @load='load'
83
+ @remove='remove'
84
+ @showAnalysis2d='showAnalysis2d'>
85
+ </mapgis-3d-skyline>
86
+ </mapgis-ui-card>
87
+ <!-- <mapgis-window-wrapper :visible='skyline2dVisible'>-->
88
+ <mapgis-ui-window
89
+ @window-size='onSkyline2dWindowSize'
90
+ :visible.sync='skyline2dVisible'
91
+ :min-width='300'
92
+ :max-height='300'
93
+ anchor='bottom-left'
94
+ title='二维天际线'
95
+ >
96
+ <div ref='skyline2dChart'>
97
+ <div id='skyline-2d-chart' style="width:300px;height:230px"/>
98
+ </div>
99
+ </mapgis-ui-window>
100
+ <!-- </mapgis-window-wrapper>-->
42
101
  </mapgis-web-scene>
43
102
  </template>
44
103
 
45
104
  <script>
105
+ import * as echarts from "echarts";
106
+
46
107
  export default {
47
108
  name: "cesiumSkyline.vue",
48
109
  data() {
49
110
  return {
111
+ url: "http://t0.tianditu.com/DataServer?T=vec_w&L={z}&Y={y}&X={x}&tk=9c157e9585486c02edf817d2ecbc7752",
50
112
  m3dUrl: "http://develop.smaryun.com:6163/igs/rest/g3d/ZondyModels",
51
113
  autoReset: true,
52
- maximumScreenSpaceError: 6,
53
- vueIndex: 22
114
+ maximumScreenSpaceError: 8,
115
+ skyline2dChart: null,
116
+ skyline2dVisible: false,
117
+ skyLineAnalysis: null,
118
+ skylineWidth: 2,
119
+ skylineColor: "rgb(255,0,0)",
54
120
  };
55
- }
121
+ },
122
+ methods: {
123
+ /**
124
+ * 二维天际线图表弹框size变化
125
+ * @param mode
126
+ */
127
+ onSkyline2dWindowSize(mode) {
128
+ this.$nextTick(() => {
129
+ if (this.skyline2dChart) {
130
+ const width =
131
+ mode === "max" ? this.$refs.skyline2dChart.clientWidth : 300;
132
+ this.skyline2dChart.resize({ width });
133
+ }
134
+ });
135
+ },
136
+ remove() {
137
+ this.hideAnalysis2d();
138
+ },
139
+
140
+ load(skyLineAnalysis) {
141
+ this.skyLineAnalysis = skyLineAnalysis;
142
+ },
143
+
144
+ /**
145
+ * 展示二维天际线
146
+ * todo 绘制完成回调添加二维坐标点 #143
147
+ */
148
+ showAnalysis2d(skyline2dChart) {
149
+ this.skyline2dVisible = true;
150
+ this.skyline2dChart = skyline2dChart;
151
+ },
152
+
153
+ /**
154
+ * 隐藏二维天际线
155
+ */
156
+ hideAnalysis2d() {
157
+ this.skyline2dVisible = false;
158
+ },
159
+ },
56
160
  };
57
161
  </script>
58
162
 
59
- <style scoped></style>
163
+ <style scoped>
164
+ .storybook-ui-card {
165
+ position: absolute;
166
+ top: 10px;
167
+ left: 10px;
168
+ z-index: 1000;
169
+ }
170
+ #skyline-2d-chart {
171
+ height: 300px;
172
+ width: 230px;
173
+ }
174
+ </style>
60
175
  ```
@@ -0,0 +1,236 @@
1
+ > mapgis-3d-analysis-slope
2
+
3
+ ## 属性
4
+
5
+ ### `vueKey`
6
+
7
+ - **类型:** `String`
8
+ - **可选**
9
+ - **非侦听属性**
10
+ - **默认值:** `default`
11
+ - **描述:** mapgis-web-scene 组件的 ID,当使用多个 mapgis-web-scene 组件时,需要指定该值,来唯一标识 mapgis-web-scene 组件,同时 mapgis-web-scene 插槽中的组件也需要传入相同的 vueKey,让组件知道应该作用于哪一个 mapgis-web-scene。
12
+
13
+ ### `vueIndex`
14
+
15
+ - **类型:** `Number`
16
+ - **可选**
17
+ - **非侦听属性**
18
+ - **默认值:** `(Math.random() * 100000000).toFixed(0)`随机计算值
19
+ - **描述:** 当 mapgis-web-scene 插槽中使用了多个相同组件时,例如多个 mapgis-3d-igs-doc-layer 组件,用来区分组件的标识符。
20
+
21
+ ### `rampColors`
22
+
23
+ - **类型:** `Array`
24
+ - **可选**
25
+ - **侦听属性**
26
+ - **描述:** 坡度分析角度颜色数组
27
+ - **默认值:**
28
+
29
+ ```
30
+ [
31
+ { min: 0, max: 15, color: "rgba(244, 67, 54, 0.5)" },
32
+ { min: 15, max: 30, color: "rgba(233, 30, 99, 0.5)" },
33
+ { min: 30, max: 45, color: "rgba(156, 39, 176, 0.5)" },
34
+ { min: 45, max: 60, color: "rgba(255, 235, 59, 0.5)" },
35
+ { min: 60, max: 75, color: "rgba(96, 125, 139, 0.5)" },
36
+ { min: 75, max: 90, color: "rgba(76, 175, 80, 0.5)" }
37
+ ]
38
+ ```
39
+
40
+ ## 方法
41
+
42
+ ### `analysis`
43
+
44
+ - **Description:** 坡度分析
45
+
46
+ ### `remove`
47
+
48
+ - **Description:** 移除坡度分析对象,移除坡度分析结果。
49
+
50
+ ## 事件
51
+
52
+ ### `@load`
53
+
54
+ - **Description:** 在 Slope 加载完毕后发送该事件
55
+ - **Payload** 坡度分析对象
56
+
57
+ ## 示例
58
+
59
+ ### 非插槽方式
60
+
61
+ ```vue
62
+ <template>
63
+ <mapgis-web-scene style="{height: '100vh'}" v-on:load="handleLoad">
64
+ <mapgis-3d-ogc-wmts-layer
65
+ :baseUrl="url"
66
+ :wmtsLayer="layer"
67
+ :tileMatrixSet="tileMatrixSet"
68
+ :format="format"
69
+ :tilingScheme="tilingScheme"
70
+ :token="token"
71
+ ></mapgis-3d-ogc-wmts-layer>
72
+ <mapgis-3d-igs-terrain :url="terrainUrl" :requestVertexNormals="true" />
73
+ <mapgis-ui-card class="storybook-ui-card">
74
+ <mapgis-3d-analysis-slope :rampColors="rampColors" />
75
+ </mapgis-ui-card>
76
+ </mapgis-web-scene>
77
+ </template>
78
+
79
+ <script>
80
+ export default {
81
+ data() {
82
+ return {
83
+ url: "http://t0.tianditu.gov.cn/img_c/wmts",
84
+ //地形url TODO这里地址打包的时候改一下
85
+ terrainUrl: "http://192.168.21.191:6163/igs/rest/g3d/terrain",
86
+ tileMatrixSet: "c",
87
+ tilingScheme: "EPSG:4326",
88
+ layer: "img",
89
+ format: "tiles",
90
+ token: {
91
+ key: "tk",
92
+ value: "2ddaabf906d4b5418aed0078e1657029"
93
+ },
94
+ rampColors: [
95
+ { min: 0, max: 15, color: "rgba(244, 67, 54, 0.5)" },
96
+ { min: 15, max: 30, color: "rgba(233, 30, 99, 0.5)" },
97
+ { min: 30, max: 45, color: "rgba(156, 39, 176, 0.5)" },
98
+ { min: 45, max: 60, color: "rgba(255, 235, 59, 0.5)" },
99
+ { min: 60, max: 75, color: "rgba(96, 125, 139, 0.5)" },
100
+ { min: 75, max: 90, color: "rgba(76, 175, 80, 0.5)" }
101
+ ]
102
+ };
103
+ },
104
+ methods: {
105
+ handleLoad(e) {
106
+ const { component, Cesium } = e;
107
+ Cesium.Ion.defaultAccessToken =
108
+ "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJiM2Q0ZGMxYy1iZGZkLTQ4OWItODlhMy1iOWNkMDE0M2U3YWEiLCJpZCI6NTEzNSwiaWF0IjoxNjA2MjE0OTkyfQ.2aktNrUASlLsPwSFtkgKBTQLJTAnOTyjgKDRQmnafiE";
109
+ const { webGlobe } = component;
110
+ webGlobe.viewer.camera.setView({
111
+ direction: {
112
+ x: 0.4680575394156845,
113
+ y: -0.8267033643312148,
114
+ z: 0.31222377744109403
115
+ },
116
+ position: {
117
+ x: -674271.5790185562,
118
+ y: 5530042.656916835,
119
+ z: 3232882.3357299212
120
+ }
121
+ });
122
+ //构造视图功能管理对象(视图)
123
+ var sceneManager = new CesiumZondy.Manager.SceneManager({
124
+ viewer: webGlobe.viewer
125
+ });
126
+ //视点跳转(经度,纬度,视角高度,方位角,俯仰角,翻滚角)
127
+ sceneManager.flyToEx(121, 24, {
128
+ height: 5900,
129
+ heading: 60,
130
+ pitch: -16,
131
+ roll: 0
132
+ });
133
+ }
134
+ }
135
+ };
136
+ </script>
137
+ ```
138
+
139
+ ## 自定义界面-插槽方式
140
+
141
+ ```vue
142
+ <template>
143
+ <mapgis-web-scene style="{height: '100vh'}" v-on:load="handleLoad">
144
+ <mapgis-3d-ogc-wmts-layer
145
+ :baseUrl="url"
146
+ :wmtsLayer="layer"
147
+ :tileMatrixSet="tileMatrixSet"
148
+ :format="format"
149
+ :tilingScheme="tilingScheme"
150
+ :token="token"
151
+ ></mapgis-3d-ogc-wmts-layer>
152
+ <mapgis-3d-igs-terrain :url="terrainUrl" :requestVertexNormals="true" />
153
+ <mapgis-ui-card class="storybook-ui-card">
154
+ <mapgis-3d-analysis-slope :rampColors="rampColors" @load="load">
155
+ <!-- 这里是自定义的界面-->
156
+ <div>
157
+ <button @click="analysis">分析</button>
158
+ <button @click="remove">清除</button>
159
+ </div>
160
+ </mapgis-3d-analysis-slope>
161
+ </mapgis-ui-card>
162
+ </mapgis-web-scene>
163
+ </template>
164
+
165
+ <script>
166
+ export default {
167
+ data() {
168
+ return {
169
+ url: "http://t0.tianditu.gov.cn/img_c/wmts",
170
+ //地形url TODO这里地址打包的时候改一下
171
+ terrainUrl: "http://192.168.21.191:6163/igs/rest/g3d/terrain",
172
+ tileMatrixSet: "c",
173
+ tilingScheme: "EPSG:4326",
174
+ layer: "img",
175
+ format: "tiles",
176
+ token: {
177
+ key: "tk",
178
+ value: "2ddaabf906d4b5418aed0078e1657029"
179
+ },
180
+ rampColors: [
181
+ { min: 0, max: 15, color: "rgba(244, 67, 54, 0.5)" },
182
+ { min: 15, max: 30, color: "rgba(233, 30, 99, 0.5)" },
183
+ { min: 30, max: 45, color: "rgba(156, 39, 176, 0.5)" },
184
+ { min: 45, max: 60, color: "rgba(255, 235, 59, 0.5)" },
185
+ { min: 60, max: 75, color: "rgba(96, 125, 139, 0.5)" },
186
+ { min: 75, max: 90, color: "rgba(76, 175, 80, 0.5)" }
187
+ ],
188
+ slopeAnalysis: null
189
+ };
190
+ },
191
+ methods: {
192
+ handleLoad(e) {
193
+ const { component, Cesium } = e;
194
+ Cesium.Ion.defaultAccessToken =
195
+ "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJiM2Q0ZGMxYy1iZGZkLTQ4OWItODlhMy1iOWNkMDE0M2U3YWEiLCJpZCI6NTEzNSwiaWF0IjoxNjA2MjE0OTkyfQ.2aktNrUASlLsPwSFtkgKBTQLJTAnOTyjgKDRQmnafiE";
196
+ const { webGlobe } = component;
197
+ webGlobe.viewer.camera.setView({
198
+ direction: {
199
+ x: 0.4680575394156845,
200
+ y: -0.8267033643312148,
201
+ z: 0.31222377744109403
202
+ },
203
+ position: {
204
+ x: -674271.5790185562,
205
+ y: 5530042.656916835,
206
+ z: 3232882.3357299212
207
+ }
208
+ });
209
+ //构造视图功能管理对象(视图)
210
+ var sceneManager = new CesiumZondy.Manager.SceneManager({
211
+ viewer: webGlobe.viewer
212
+ });
213
+ //视点跳转(经度,纬度,视角高度,方位角,俯仰角,翻滚角)
214
+ sceneManager.flyToEx(121, 24, {
215
+ height: 5900,
216
+ heading: 60,
217
+ pitch: -16,
218
+ roll: 0
219
+ });
220
+ },
221
+ //坡度分析组件加载完毕事件
222
+ load(slopeAnalysis) {
223
+ this.slopeAnalysis = slopeAnalysis;
224
+ },
225
+ //开始坡度分析
226
+ analysis() {
227
+ this.slopeAnalysis.analysis();
228
+ },
229
+ //移除坡度分析
230
+ remove() {
231
+ this.slopeAnalysis.remove();
232
+ }
233
+ }
234
+ };
235
+ </script>
236
+ ```
@@ -1,41 +1,108 @@
1
- # 可视域分析
2
-
3
1
  > mapgis-3d-viewshed
4
2
 
5
3
  ## 属性
6
4
 
7
- [comment]: <> (### `index`)
5
+ ### `vueKey`
6
+
7
+ - **类型:** `String`
8
+ - **可选**
9
+ - **非侦听属性**
10
+ - **默认值:** `default`
11
+ - **描述:**
12
+
13
+ ```
14
+ mapgis-web-scene组件的ID,当使用多个mapgis-web-scene组件时,需要指定该值,来唯一标识mapgis-web-scene组件,
15
+ 同时mapgis-web-scene插槽中的组件也需要传入相同的vueKey,让组件知道应该作用于哪一个mapgis-web-scene。
16
+ ```
17
+
18
+ ### `vueIndex`
19
+
20
+ - **类型:** `Number`
21
+ - **可选**
22
+ - **非侦听属性**
23
+ - **描述:**
24
+
25
+ ```
26
+ 当mapgis-web-scene插槽中使用了多个相同组件时,例如多个mapgis-3d-igs-doc-layer组件,用来区分组件的标识符。
27
+ ```
28
+
29
+ ### `horizontAngle`
30
+
31
+ - **类型:** `Number`
32
+ - **可选**
33
+ - **侦听属性**
34
+ - **默认值:** `60`
35
+ - **描述:** 观察点的水平视角
8
36
 
9
- [comment]: <> (- **类型:** `Number`)
37
+ ### `verticalAngle`
10
38
 
11
- [comment]: <> (- **默认值:** `0`)
39
+ - **类型:** `Number`
40
+ - **可选**
41
+ - **侦听属性**
42
+ - **默认值:** `60`
43
+ - **描述:** 观察点的垂直视角
12
44
 
13
- [comment]: <> (- **非侦听属性**)
45
+ ### `exHeight`
14
46
 
15
- [comment]: <> (- **描述:** 图层的索引值,表示第几个图层)
47
+ - **类型:** `Number`
48
+ - **可选**
49
+ - **侦听属性**
50
+ - **默认值:** `1.85`
51
+ - **描述:** 观察点的附加高度,单位为米
16
52
 
17
- ### `position`
53
+ ### `unVisibleColor`
18
54
 
19
55
  - **类型:** `String`
20
- - **默认值:** `right`
21
- - **非侦听属性**
22
- - **描述:** 分析面板的位置(right:右边 | left: 左边)
56
+ - **可选**
57
+ - **侦听属性**
58
+ - **默认值:** `#ff0000`
59
+ - **描述:** 不可视区域颜色,可以传16进制或者rgba任意形式颜色
60
+
61
+ ### `visibleColor`
62
+
63
+ - **类型:** `String`
64
+ - **可选**
65
+ - **侦听属性**
66
+ - **默认值:** `#00ff00`
67
+ - **描述:** 可视区域颜色,可以传16进制或者rgba任意形式颜色
68
+
69
+ ### `maskColor`
70
+
71
+ - **类型:** `String`
72
+ - **可选**
73
+ - **侦听属性**
74
+ - **默认值:** `rgba(37, 218, 169, 0.2)`
75
+ - **描述:** 可视遮罩颜色,可以传16进制或者rgba任意形式颜色
76
+
77
+ ## 事件
78
+
79
+ ### `@load`
80
+
81
+ - **Description:** 在 Viewshed组件 加载完毕后发送该事件
82
+ - **Payload** 可视域分析对象
23
83
 
24
84
  ## 示例
25
85
 
26
86
  ```vue
87
+
27
88
  <template>
28
89
  <mapgis-web-scene
29
- libPath="cesium/Cesium.js"
30
- pluginPath="cesium/webclient-cesium-plugin.min.js"
90
+ libPath="cesium/Cesium.js"
91
+ pluginPath="cesium/webclient-cesium-plugin.min.js"
31
92
  >
32
- <mapgis-3d-raster-layer :url="url" />
93
+ <mapgis-3d-raster-layer :url="url"/>
33
94
  <mapgis-3d-igs-m3d
34
- :autoReset="autoReset"
35
- :maximumScreenSpaceError="maximumScreenSpaceError"
36
- :url="m3dUrl"
95
+ :autoReset="autoReset"
96
+ :maximumScreenSpaceError="maximumScreenSpaceError"
97
+ :url="m3dUrl"
37
98
  />
38
- <mapgis-3d-viewshed></mapgis-3d-viewshed>
99
+ <mapgis-ui-card class="storybook-ui-card">
100
+ <mapgis-3d-viewshed
101
+ :horizontAngle="horizontAngle"
102
+ :maskColor="maskColor"
103
+ :visibleColor="visibleColor">
104
+ </mapgis-3d-viewshed>
105
+ </mapgis-ui-card>
39
106
  </mapgis-web-scene>
40
107
  </template>
41
108
 
@@ -44,12 +111,24 @@ export default {
44
111
  data() {
45
112
  return {
46
113
  url:
47
- "http://t0.tianditu.com/DataServer?T=vec_w&L={z}&Y={y}&X={x}&tk=9c157e9585486c02edf817d2ecbc7752",
114
+ "http://t0.tianditu.com/DataServer?T=vec_w&L={z}&Y={y}&X={x}&tk=9c157e9585486c02edf817d2ecbc7752",
48
115
  m3dUrl: "http://develop.smaryun.com:6163/igs/rest/g3d/ZondyModels",
49
116
  autoReset: true,
50
- maximumScreenSpaceError: 8
117
+ maximumScreenSpaceError: 8,
118
+ horizontAngle: 70,
119
+ maskColor: 'rgba(37, 218, 169, 0.2)',
120
+ visibleColor: '#00ff00',
121
+ unVisibleColor: '#ff0000'
51
122
  };
52
- }
123
+ },
53
124
  };
54
125
  </script>
126
+ <style scoped>
127
+ .storybook-ui-card {
128
+ position: absolute;
129
+ top: 10px;
130
+ left: 10px;
131
+ z-index: 1000;
132
+ }
133
+ </style>
55
134
  ```
@@ -63,6 +63,16 @@
63
63
  > value: "9c157e9585486c02edf817d2ecbc7752" <br/>
64
64
  > }
65
65
 
66
+
67
+ ### `layerStyle`
68
+
69
+ - **类型:** `Object`
70
+ - **可选**
71
+ - **侦听属性**
72
+ - **描述:** 控制地图的显隐、透明度以及顺序,有如下值:
73
+ > visible Boolean 控制图层显示或隐藏,不会重新加载图层,true:显示图层、fales:隐藏图层 <br/>
74
+ > opacity Number 控制图层透明度,会重新加载图层,0 - 1 之间的数字,0:隐藏,1:显示 <br/>
75
+ > zIndex Number 控制图层顺序,会重新加载图层,类似 css 里面的 z-index,从 1 开始的数字 <br/>
66
76
  ## 示例
67
77
 
68
78
  ### 加载 4326 地图