@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.
- package/README.md +46 -49
- package/dist-libs/webclient-vue-cesium.common.js +191087 -0
- package/dist-libs/webclient-vue-cesium.css +1 -1
- package/dist-libs/webclient-vue-cesium.umd.js +191097 -0
- package/dist-libs/webclient-vue-cesium.umd.min.js +204 -194
- package/docs/.vuepress/config.js +47 -46
- package/docs/README.md +5 -4
- package/docs/api/analysis/Aspect.md +236 -0
- package/docs/api/analysis/Contour.md +240 -0
- package/docs/api/analysis/CutFill.md +306 -0
- package/docs/api/analysis/DynamicSection.md +336 -0
- package/docs/api/analysis/Excavate.md +3 -11
- package/docs/api/analysis/Flood.md +177 -200
- package/docs/api/analysis/HeightLimited.md +7 -4
- package/docs/api/analysis/ParticleEffects.md +549 -0
- package/docs/api/analysis/Profile.md +464 -0
- package/docs/api/analysis/Shadow.md +76 -13
- package/docs/api/analysis/Sightline.md +66 -13
- package/docs/api/analysis/Skyline.md +144 -29
- package/docs/api/analysis/Slope.md +236 -0
- package/docs/api/analysis/Viewshed.md +100 -21
- package/docs/api/layer/IGServer/IgsDocLayer.md +10 -0
- package/docs/api/layer/IGServer/IgsFeatureLayer.md +253 -0
- package/docs/api/layer/IGServer/IgsTileLayer.md +11 -0
- package/docs/api/layer/OGC/CesiumOgcWmsLayer.md +20 -19
- package/docs/api/layer/OGC/Wms.png +0 -0
- package/docs/api/layer/marker/DynamicMarker.md +81 -0
- package/docs/api/layer/marker/dynamicmarker.png +0 -0
- package/docs/api/layer/marker/selects.png +0 -0
- package/docs/api/layer/vectortile/vectortile.md +10 -0
- package/docs/api/m3d/image/layer_control_1.png +0 -0
- package/docs/api/m3d/image/layer_control_2.png +0 -0
- package/docs/api/m3d/image/layer_control_3.png +0 -0
- package/docs/api/m3d/m3d.md +13 -2
- package/docs/api/service/comprehensiveQuery/comprehensiveQuery.md +946 -0
- package/docs/api/ui/draw.md +68 -40
- package/docs/api/ui/link.md +8 -1
- package/docs/api/ui/marker.md +19 -1
- package/docs/api/ui/measure.md +82 -10
- package/docs/api/ui/table.md +6 -6
- package/docs/guide/README.md +26 -23
- package/docs/guide/basemap.md +35 -33
- package/docs/guide/markers&popups.md +46 -53
- package/docs/plugin_components/create_storybook.md +241 -0
- package/docs/plugin_components/img.png +0 -0
- package/docs/plugin_components/img_1.png +0 -0
- package/docs/plugin_components/img_10.png +0 -0
- package/docs/plugin_components/img_2.png +0 -0
- package/docs/plugin_components/img_3.png +0 -0
- package/docs/plugin_components/img_4.png +0 -0
- package/docs/plugin_components/img_5.png +0 -0
- package/docs/plugin_components/img_6.png +0 -0
- package/docs/plugin_components/img_7.png +0 -0
- package/docs/plugin_components/img_8.png +0 -0
- package/docs/version/diff.md +4 -4
- package/docs/version/version.md +81 -0
- package/package.json +5 -5
- package/src/cdn/cdn_component.js +62 -0
- package/src/component.js +20 -2
- package/src/components/Analysis/Aspect.vue +318 -0
- package/src/components/Analysis/Contour.vue +257 -0
- package/src/components/Analysis/CutFill.vue +581 -0
- package/src/components/Analysis/DynamicCutting.vue +98 -59
- package/src/components/Analysis/DynamicSection.vue +494 -0
- package/src/components/Analysis/Excavate.vue +133 -87
- package/src/components/Analysis/Flood.vue +395 -487
- package/src/components/Analysis/Flood.vue-- +630 -0
- package/src/components/Analysis/HeightLimited.vue +66 -47
- package/src/components/Analysis/ModelFlatten.vue +2 -2
- package/src/components/Analysis/Profile.vue +503 -0
- package/src/components/Analysis/Shadow.vue +220 -309
- package/src/components/Analysis/Sightline.vue +393 -375
- package/src/components/Analysis/SkyLine.vue +283 -93
- package/src/components/Analysis/Slope.vue +317 -0
- package/src/components/Analysis/Viewshed.vue +806 -373
- package/src/components/Analysis/skyline2dChartOptions.js +66 -0
- package/src/components/DataSource/Geojson/GeoJsonDataSource.vue +201 -3
- package/src/components/Layer/GeoJSON/GeoJsonLayer.vue +345 -0
- package/src/components/Layer/IGServer/IgsFeatureLayer.vue +227 -0
- package/src/components/Layer/Marker/DynamicMarkerLayer.vue +487 -0
- package/src/components/Layer/Marker/Marker3dPro.vue +196 -0
- package/src/components/Layer/Marker/Marker3dSetPro.vue +67 -0
- package/src/components/Layer/VectorTile/VectorTileLayer.vue +117 -33
- package/src/components/Layer/VectorTile/VectorTileOptions.js +1 -1
- package/src/components/M3D/3DTilesetOptions.js +23 -1
- package/src/components/M3D/G3D.vue +150 -0
- package/src/components/M3D/M3d.vue +142 -32
- package/src/components/M3D/M3dSet.vue +118 -0
- package/src/components/M3D/M3dType.js +24 -0
- package/src/components/Overlay/Mapv3dLayer.vue +2 -0
- package/src/components/Overlay/ParticleEffects.vue +545 -0
- package/src/components/Overlay/mapv/MapvBaseLayer.js +351 -172
- package/src/components/Overlay/mapv/MapvLayer.js +372 -324
- package/src/components/Overlay/mapv/SuperCluster.js +611 -0
- package/src/components/Overlay/themeLayer/heater/CesiumHeater.vue +152 -0
- package/src/components/Overlay/themeLayer/heater/MapvHeater.vue +161 -0
- package/src/components/UI/Controls/Draw/Draw.vue +320 -92
- package/src/components/UI/Controls/Legend/Legend.vue +55 -51
- package/src/components/UI/Controls/Link/Link.vue +59 -37
- package/src/components/UI/Controls/Measure/Measure.vue +75 -33
- package/src/components/UI/Controls/Measure/components/MeasureResult.vue +71 -0
- package/src/components/UI/Controls/Measure/components/MeasureSetting.vue +63 -0
- package/src/components/UI/Controls/Measure/components/MeasureTool.vue +155 -0
- package/src/components/UI/Geojson/Popup.vue +101 -0
- package/src/components/UI/Marker/Marker.vue +185 -48
- package/src/components/UI/Popup/Popup.vue +21 -64
- package/src/components/Utils/common/color-util.js +159 -0
- package/src/components/Utils/util.js +311 -231
- package/src/components/WebGlobe/manager.js +81 -3
- package/src/components/WebGlobe/mixins/withPrivateMethods.js +4 -2
- package/src/components/WebGlobe/util.js +173 -0
- package/src/components/service/comprehensive-query/ComprehensiveQuery.vue +156 -0
- package/src/components/service/comprehensive-query/PlaceNameCesium.vue +102 -0
- package/src/components/service/comprehensive-query/util/catalog/document.js +626 -0
- package/src/components/service/comprehensive-query/util/feature/arcgis-feature-query.js +448 -0
- package/src/components/service/comprehensive-query/util/feature/feature-convert.js +408 -0
- package/src/components/service/comprehensive-query/util/feature/feature-edit.js +50 -0
- package/src/components/service/comprehensive-query/util/feature/feature-geojson.js +100 -0
- package/src/components/service/comprehensive-query/util/feature/feature-query.js +723 -0
- package/src/components/service/comprehensive-query/util/feature/feature.js +1 -0
- package/src/components/service/comprehensive-query/util/feature/index.js +9 -0
- package/src/components/service/comprehensive-query/util/objects/geometry.js +58 -0
- package/src/components/Overlay/Mapv.vue +0 -142
- package/src/components/Overlay/MapvHeater.vue +0 -98
|
@@ -0,0 +1,464 @@
|
|
|
1
|
+
> mapgis-3d-analysis-profile
|
|
2
|
+
|
|
3
|
+
<span style="color:red;fontsize=5px;">注意:必须在外部定义一个 div,并通过 echartsDivId 参数将 div 的 id 传入组件,用于显示剖面信息(echarts 图表)</span>
|
|
4
|
+
|
|
5
|
+
## 属性
|
|
6
|
+
|
|
7
|
+
### `vueKey`
|
|
8
|
+
|
|
9
|
+
- **类型:** `String`
|
|
10
|
+
- **可选**
|
|
11
|
+
- **非侦听属性**
|
|
12
|
+
- **默认值:** `default`
|
|
13
|
+
- **描述:** mapgis-web-scene 组件的 ID,当使用多个 mapgis-web-scene 组件时,需要指定该值,来唯一标识 mapgis-web-scene 组件,同时 mapgis-web-scene 插槽中的组件也需要传入相同的 vueKey,让组件知道应该作用于哪一个 mapgis-web-scene。
|
|
14
|
+
|
|
15
|
+
### `vueIndex`
|
|
16
|
+
|
|
17
|
+
- **类型:** `Number`
|
|
18
|
+
- **可选**
|
|
19
|
+
- **非侦听属性**
|
|
20
|
+
- **默认值:** `(Math.random() * 100000000).toFixed(0)`随机计算值
|
|
21
|
+
- **描述:** 当 mapgis-web-scene 插槽中使用了多个相同组件时,例如多个 mapgis-3d-igs-doc-layer 组件,用来区分组件的标识符。
|
|
22
|
+
|
|
23
|
+
### `profileType`
|
|
24
|
+
|
|
25
|
+
- **类型:** `Number`
|
|
26
|
+
- **可选**
|
|
27
|
+
- **非侦听属性**
|
|
28
|
+
- **默认值:** `0`
|
|
29
|
+
- **描述:** 分析类型,0 代表地形,1 代表地形和模型兼容
|
|
30
|
+
|
|
31
|
+
### `polylineGroundColor`
|
|
32
|
+
|
|
33
|
+
- **类型:** `String`
|
|
34
|
+
- **可选**
|
|
35
|
+
- **侦听属性**
|
|
36
|
+
- **默认值:** `rgb(255,0,0)`
|
|
37
|
+
- **描述:** 剖切线颜色
|
|
38
|
+
|
|
39
|
+
### `samplePrecision`
|
|
40
|
+
|
|
41
|
+
- **类型:** `Number`
|
|
42
|
+
- **可选**
|
|
43
|
+
- **侦听属性**
|
|
44
|
+
- **默认值:** `2`
|
|
45
|
+
- **描述:** 采样精度(采样间隔,平面距离,单位米,模型推荐为 0.2,地形推荐为 2)
|
|
46
|
+
|
|
47
|
+
### `showPolygon`
|
|
48
|
+
|
|
49
|
+
- **类型:** `Boolean`
|
|
50
|
+
- **可选**
|
|
51
|
+
- **侦听属性**
|
|
52
|
+
- **默认值:** `false`
|
|
53
|
+
- **描述:** 是否显示剖面
|
|
54
|
+
|
|
55
|
+
### `pointColor`
|
|
56
|
+
|
|
57
|
+
- **类型:** `String`
|
|
58
|
+
- **可选**
|
|
59
|
+
- **侦听属性**
|
|
60
|
+
- **默认值:** `rgb(0,255,0)`
|
|
61
|
+
- **描述:** 交互点颜色(关闭剖面的时候生效)
|
|
62
|
+
|
|
63
|
+
### `polyLineColor`
|
|
64
|
+
|
|
65
|
+
- **类型:** `String`
|
|
66
|
+
- **可选**
|
|
67
|
+
- **侦听属性**
|
|
68
|
+
- **默认值:** `rgb(0,255,0)`
|
|
69
|
+
- **描述:** 交互线颜色(开启剖面的时候生效)
|
|
70
|
+
|
|
71
|
+
### `polygonColor`
|
|
72
|
+
|
|
73
|
+
- **类型:** `String`
|
|
74
|
+
- **可选**
|
|
75
|
+
- **侦听属性**
|
|
76
|
+
- **默认值:** `rgb(0,0,255)`
|
|
77
|
+
- **描述:** 剖面颜色
|
|
78
|
+
|
|
79
|
+
### `polygonHeight`
|
|
80
|
+
|
|
81
|
+
- **类型:** `Number`
|
|
82
|
+
- **可选**
|
|
83
|
+
- **侦听属性**
|
|
84
|
+
- **默认值:** `100`
|
|
85
|
+
- **描述:** 剖面高度
|
|
86
|
+
|
|
87
|
+
### `useMask`
|
|
88
|
+
|
|
89
|
+
- **类型:** `Boolean`
|
|
90
|
+
- **可选**
|
|
91
|
+
- **默认值:** `true`
|
|
92
|
+
- **非侦听属性**
|
|
93
|
+
- **描述:** 是否使用内置的遮罩层
|
|
94
|
+
|
|
95
|
+
### `echartsDivId`
|
|
96
|
+
|
|
97
|
+
- **类型:** `String`
|
|
98
|
+
- **必选**
|
|
99
|
+
- **非侦听属性**
|
|
100
|
+
- **描述:** 剖面信息显示容器的 id
|
|
101
|
+
|
|
102
|
+
### `echartsOptions`
|
|
103
|
+
|
|
104
|
+
- **类型:** `Object`
|
|
105
|
+
- **可选**
|
|
106
|
+
- **非侦听属性**
|
|
107
|
+
- **描述:** 二维剖面显示样式
|
|
108
|
+
- **默认值:**
|
|
109
|
+
|
|
110
|
+
```
|
|
111
|
+
{
|
|
112
|
+
tooltip: {
|
|
113
|
+
trigger: "axis",
|
|
114
|
+
axisPointer: {
|
|
115
|
+
type: "line",
|
|
116
|
+
lineStyle: {
|
|
117
|
+
color: "#41aeff",
|
|
118
|
+
type: "solid"
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
confine: true, // 是否将 tooltip 框限制在图表的区域内。
|
|
122
|
+
backgroundColor: "rgba(255, 255, 255, 0.8)"
|
|
123
|
+
},
|
|
124
|
+
title: {
|
|
125
|
+
show: false
|
|
126
|
+
},
|
|
127
|
+
grid: {
|
|
128
|
+
top: 25,
|
|
129
|
+
left: 60,
|
|
130
|
+
right: 20,
|
|
131
|
+
bottom: 20,
|
|
132
|
+
contentLabel: false
|
|
133
|
+
},
|
|
134
|
+
calculable: true,
|
|
135
|
+
xAxis: [
|
|
136
|
+
{
|
|
137
|
+
show: false,
|
|
138
|
+
type: "value",
|
|
139
|
+
max: "dataMax"
|
|
140
|
+
}
|
|
141
|
+
],
|
|
142
|
+
yAxis: [
|
|
143
|
+
{
|
|
144
|
+
type: "value",
|
|
145
|
+
splitLine: {
|
|
146
|
+
lineStyle: {
|
|
147
|
+
color: "#d9d9d9",
|
|
148
|
+
type: "dotted"
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
axisTick: {
|
|
152
|
+
show: false
|
|
153
|
+
},
|
|
154
|
+
axisLine: {
|
|
155
|
+
show: false
|
|
156
|
+
},
|
|
157
|
+
axisLabel: {
|
|
158
|
+
formatter: value => {
|
|
159
|
+
const texts = [];
|
|
160
|
+
if (value > 999) {
|
|
161
|
+
const text = (Number(value) / 1000).toFixed(2);
|
|
162
|
+
texts.push(`${text}km`);
|
|
163
|
+
} else {
|
|
164
|
+
texts.push(`${parseInt(value)}m`);
|
|
165
|
+
}
|
|
166
|
+
return texts;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
],
|
|
171
|
+
series: [
|
|
172
|
+
{
|
|
173
|
+
type: "line",
|
|
174
|
+
smooth: true, // 建议地形平滑显示二维剖面,模型取消平滑
|
|
175
|
+
itemStyle: {
|
|
176
|
+
color: "#40a9ff"
|
|
177
|
+
},
|
|
178
|
+
markPoint: {
|
|
179
|
+
symbol: "circle",
|
|
180
|
+
symbolSize: 15,
|
|
181
|
+
label: { position: "top" },
|
|
182
|
+
data: [
|
|
183
|
+
{ type: "max", name: "最高点" },
|
|
184
|
+
{ type: "min", name: "最低点" }
|
|
185
|
+
]
|
|
186
|
+
},
|
|
187
|
+
areaStyle: {}
|
|
188
|
+
}
|
|
189
|
+
]
|
|
190
|
+
}
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
## 方法
|
|
194
|
+
|
|
195
|
+
### `analysis`
|
|
196
|
+
|
|
197
|
+
- **Description:** 剖面分析
|
|
198
|
+
|
|
199
|
+
### `remove`
|
|
200
|
+
|
|
201
|
+
- **Description:** 移除剖面分析对象,移除剖面分析结果,关闭二维剖面显示
|
|
202
|
+
|
|
203
|
+
## 事件
|
|
204
|
+
|
|
205
|
+
### `@load`
|
|
206
|
+
|
|
207
|
+
- **Description:** 在 Profile 加载完毕后发送该事件
|
|
208
|
+
- **Payload** 剖面分析对象
|
|
209
|
+
|
|
210
|
+
### `@start`
|
|
211
|
+
|
|
212
|
+
- **Description:** 在剖面分析绘制完后,开始分析前发送该事件
|
|
213
|
+
|
|
214
|
+
### `@success`
|
|
215
|
+
|
|
216
|
+
- **Description:** 在剖面分析结束后发送该事件
|
|
217
|
+
|
|
218
|
+
### `@remove`
|
|
219
|
+
|
|
220
|
+
- **Description:** 在移除分析对象和分析结果后,发送该事件
|
|
221
|
+
|
|
222
|
+
## 示例
|
|
223
|
+
|
|
224
|
+
### 非插槽方式
|
|
225
|
+
|
|
226
|
+
```vue
|
|
227
|
+
<template>
|
|
228
|
+
<mapgis-web-scene style="{height: '100vh'}" v-on:load="handleLoad">
|
|
229
|
+
<mapgis-3d-ogc-wmts-layer
|
|
230
|
+
:baseUrl="url"
|
|
231
|
+
:wmtsLayer="layer"
|
|
232
|
+
:tileMatrixSet="tileMatrixSet"
|
|
233
|
+
:format="format"
|
|
234
|
+
:tilingScheme="tilingScheme"
|
|
235
|
+
:token="token"
|
|
236
|
+
></mapgis-3d-ogc-wmts-layer>
|
|
237
|
+
<mapgis-3d-igs-terrain :url="terrainUrl" :requestVertexNormals="true" />
|
|
238
|
+
<mapgis-ui-card customPosition="top-right">
|
|
239
|
+
<mapgis-3d-analysis-profile
|
|
240
|
+
:profileType="profileType"
|
|
241
|
+
:polygonHeight="polygonHeight"
|
|
242
|
+
:polygonColor="polygonColor"
|
|
243
|
+
:polyLineColor="polyLineColor"
|
|
244
|
+
:pointColor="pointColor"
|
|
245
|
+
:polylineGroundColor="polylineGroundColor"
|
|
246
|
+
:showPolygon="showPolygon"
|
|
247
|
+
:samplePrecision="samplePrecision"
|
|
248
|
+
:echartsDivId="'profileChart'"
|
|
249
|
+
@success="success"
|
|
250
|
+
@remove="remove"
|
|
251
|
+
/>
|
|
252
|
+
</mapgis-ui-card>
|
|
253
|
+
<mapgis-ui-window
|
|
254
|
+
:visible.sync="profile2dVisible"
|
|
255
|
+
:min-width="400"
|
|
256
|
+
:max-height="250"
|
|
257
|
+
anchor="bottom-left"
|
|
258
|
+
title="剖面信息"
|
|
259
|
+
>
|
|
260
|
+
<div
|
|
261
|
+
id="profileChart"
|
|
262
|
+
style="width: 380px; height: 180px; float: right"
|
|
263
|
+
></div>
|
|
264
|
+
</mapgis-ui-window>
|
|
265
|
+
</mapgis-web-scene>
|
|
266
|
+
</template>
|
|
267
|
+
|
|
268
|
+
<script>
|
|
269
|
+
export default {
|
|
270
|
+
name: "profile-example.vue",
|
|
271
|
+
data() {
|
|
272
|
+
return {
|
|
273
|
+
url: "http://t0.tianditu.gov.cn/img_c/wmts",
|
|
274
|
+
//地形url TODO这里地址打包的时候改一下
|
|
275
|
+
terrainUrl: "http://192.168.21.191:6163/igs/rest/g3d/terrain",
|
|
276
|
+
tileMatrixSet: "c",
|
|
277
|
+
tilingScheme: "EPSG:4326",
|
|
278
|
+
layer: "img",
|
|
279
|
+
format: "tiles",
|
|
280
|
+
token: {
|
|
281
|
+
key: "tk",
|
|
282
|
+
value: "2ddaabf906d4b5418aed0078e1657029"
|
|
283
|
+
},
|
|
284
|
+
profileType: 0,
|
|
285
|
+
polygonHeight: 100,
|
|
286
|
+
polygonColor: "rgb(0,0,255)",
|
|
287
|
+
polyLineColor: "rgb(0,255,0)",
|
|
288
|
+
pointColor: "rgb(0,255,0)",
|
|
289
|
+
polylineGroundColor: "rgb(255,0,0)",
|
|
290
|
+
showPolygon: false,
|
|
291
|
+
samplePrecision: 2,
|
|
292
|
+
profile2dVisible: false
|
|
293
|
+
};
|
|
294
|
+
},
|
|
295
|
+
methods: {
|
|
296
|
+
handleLoad(e) {
|
|
297
|
+
const { component, Cesium } = e;
|
|
298
|
+
Cesium.Ion.defaultAccessToken =
|
|
299
|
+
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJiM2Q0ZGMxYy1iZGZkLTQ4OWItODlhMy1iOWNkMDE0M2U3YWEiLCJpZCI6NTEzNSwiaWF0IjoxNjA2MjE0OTkyfQ.2aktNrUASlLsPwSFtkgKBTQLJTAnOTyjgKDRQmnafiE";
|
|
300
|
+
const { webGlobe } = component;
|
|
301
|
+
webGlobe.viewer.camera.setView({
|
|
302
|
+
direction: {
|
|
303
|
+
x: 0.4680575394156845,
|
|
304
|
+
y: -0.8267033643312148,
|
|
305
|
+
z: 0.31222377744109403
|
|
306
|
+
},
|
|
307
|
+
position: {
|
|
308
|
+
x: -674271.5790185562,
|
|
309
|
+
y: 5530042.656916835,
|
|
310
|
+
z: 3232882.3357299212
|
|
311
|
+
}
|
|
312
|
+
});
|
|
313
|
+
//构造视图功能管理对象(视图)
|
|
314
|
+
var sceneManager = new CesiumZondy.Manager.SceneManager({
|
|
315
|
+
viewer: webGlobe.viewer
|
|
316
|
+
});
|
|
317
|
+
//视点跳转(经度,纬度,视角高度,方位角,俯仰角,翻滚角)
|
|
318
|
+
sceneManager.flyToEx(121, 24, {
|
|
319
|
+
height: 5900,
|
|
320
|
+
heading: 60,
|
|
321
|
+
pitch: -16,
|
|
322
|
+
roll: 0
|
|
323
|
+
});
|
|
324
|
+
},
|
|
325
|
+
success() {
|
|
326
|
+
this.profile2dVisible = true;
|
|
327
|
+
},
|
|
328
|
+
remove() {
|
|
329
|
+
this.profile2dVisible = false;
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
};
|
|
333
|
+
</script>
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
### 自定义界面-插槽方式
|
|
337
|
+
|
|
338
|
+
```vue
|
|
339
|
+
<template>
|
|
340
|
+
<mapgis-web-scene style="{height: '100vh'}" v-on:load="handleLoad">
|
|
341
|
+
<mapgis-3d-ogc-wmts-layer
|
|
342
|
+
:baseUrl="url"
|
|
343
|
+
:wmtsLayer="layer"
|
|
344
|
+
:tileMatrixSet="tileMatrixSet"
|
|
345
|
+
:format="format"
|
|
346
|
+
:tilingScheme="tilingScheme"
|
|
347
|
+
:token="token"
|
|
348
|
+
></mapgis-3d-ogc-wmts-layer>
|
|
349
|
+
<mapgis-3d-igs-terrain :url="terrainUrl" :requestVertexNormals="true" />
|
|
350
|
+
<mapgis-3d-analysis-profile
|
|
351
|
+
:profileType="profileType"
|
|
352
|
+
:position="position"
|
|
353
|
+
:polygonHeight="polygonHeight"
|
|
354
|
+
:polygonColor="polygonColor"
|
|
355
|
+
:polyLineColor="polyLineColor"
|
|
356
|
+
:pointColor="pointColor"
|
|
357
|
+
:polylineGroundColor="polylineGroundColor"
|
|
358
|
+
:showPolygon="showPolygon"
|
|
359
|
+
:samplePrecision="samplePrecision"
|
|
360
|
+
:echartsDivId="'profileChart'"
|
|
361
|
+
@success="success"
|
|
362
|
+
@load="load"
|
|
363
|
+
>
|
|
364
|
+
<!-- 这里是自定义的界面-->
|
|
365
|
+
<div>
|
|
366
|
+
<button @click="analysis">分析</button>
|
|
367
|
+
<button @click="remove">清除</button>
|
|
368
|
+
</div>
|
|
369
|
+
</mapgis-3d-analysis-profile>
|
|
370
|
+
</mapgis-ui-card>
|
|
371
|
+
<mapgis-ui-window
|
|
372
|
+
:visible.sync="profile2dVisible"
|
|
373
|
+
:min-width="400"
|
|
374
|
+
:max-height="250"
|
|
375
|
+
anchor="bottom-left"
|
|
376
|
+
title="剖面信息"
|
|
377
|
+
>
|
|
378
|
+
<div
|
|
379
|
+
id="profileChart"
|
|
380
|
+
style="width: 380px; height: 180px; float: right"
|
|
381
|
+
></div>
|
|
382
|
+
</mapgis-ui-window>
|
|
383
|
+
</mapgis-web-scene>
|
|
384
|
+
</template>
|
|
385
|
+
|
|
386
|
+
<script>
|
|
387
|
+
export default {
|
|
388
|
+
name: "profile-example.vue",
|
|
389
|
+
data() {
|
|
390
|
+
return {
|
|
391
|
+
url: "http://t0.tianditu.gov.cn/img_c/wmts",
|
|
392
|
+
//地形url TODO这里地址打包的时候改一下
|
|
393
|
+
terrainUrl: "http://192.168.21.191:6163/igs/rest/g3d/terrain",
|
|
394
|
+
tileMatrixSet: "c",
|
|
395
|
+
tilingScheme: "EPSG:4326",
|
|
396
|
+
layer: "img",
|
|
397
|
+
format: "tiles",
|
|
398
|
+
token: {
|
|
399
|
+
key: "tk",
|
|
400
|
+
value: "2ddaabf906d4b5418aed0078e1657029"
|
|
401
|
+
},
|
|
402
|
+
position: "left",
|
|
403
|
+
profileType: 0,
|
|
404
|
+
polygonHeight: 100,
|
|
405
|
+
polygonColor: "rgb(0,0,255)",
|
|
406
|
+
polyLineColor: "rgb(0,255,0)",
|
|
407
|
+
pointColor: "rgb(0,255,0)",
|
|
408
|
+
polylineGroundColor: "rgb(255,0,0)",
|
|
409
|
+
showPolygon: false,
|
|
410
|
+
samplePrecision: 2,
|
|
411
|
+
profileAnalysis: null,//剖面分析组件对象
|
|
412
|
+
profile2dVisible:false //显示剖面信息
|
|
413
|
+
};
|
|
414
|
+
},
|
|
415
|
+
methods: {
|
|
416
|
+
handleLoad(e) {
|
|
417
|
+
const { component, Cesium } = e;
|
|
418
|
+
Cesium.Ion.defaultAccessToken =
|
|
419
|
+
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJiM2Q0ZGMxYy1iZGZkLTQ4OWItODlhMy1iOWNkMDE0M2U3YWEiLCJpZCI6NTEzNSwiaWF0IjoxNjA2MjE0OTkyfQ.2aktNrUASlLsPwSFtkgKBTQLJTAnOTyjgKDRQmnafiE";
|
|
420
|
+
const { webGlobe } = component;
|
|
421
|
+
webGlobe.viewer.camera.setView({
|
|
422
|
+
direction: {
|
|
423
|
+
x: 0.4680575394156845,
|
|
424
|
+
y: -0.8267033643312148,
|
|
425
|
+
z: 0.31222377744109403
|
|
426
|
+
},
|
|
427
|
+
position: {
|
|
428
|
+
x: -674271.5790185562,
|
|
429
|
+
y: 5530042.656916835,
|
|
430
|
+
z: 3232882.3357299212
|
|
431
|
+
}
|
|
432
|
+
});
|
|
433
|
+
//构造视图功能管理对象(视图)
|
|
434
|
+
var sceneManager = new CesiumZondy.Manager.SceneManager({
|
|
435
|
+
viewer: webGlobe.viewer
|
|
436
|
+
});
|
|
437
|
+
//视点跳转(经度,纬度,视角高度,方位角,俯仰角,翻滚角)
|
|
438
|
+
sceneManager.flyToEx(121, 24, {
|
|
439
|
+
height: 5900,
|
|
440
|
+
heading: 60,
|
|
441
|
+
pitch: -16,
|
|
442
|
+
roll: 0
|
|
443
|
+
});
|
|
444
|
+
},
|
|
445
|
+
//剖面分析组件加载完毕事件
|
|
446
|
+
load(profileAnalysis) {
|
|
447
|
+
this.profileAnalysis = profileAnalysis;
|
|
448
|
+
},
|
|
449
|
+
//开始剖面分析
|
|
450
|
+
analysis() {
|
|
451
|
+
this.profileAnalysis.analysis();
|
|
452
|
+
},
|
|
453
|
+
//移除剖面分析
|
|
454
|
+
remove() {
|
|
455
|
+
this.profileAnalysis.remove();
|
|
456
|
+
this.profile2dVisible = false;
|
|
457
|
+
},
|
|
458
|
+
success() {
|
|
459
|
+
this.profile2dVisible = true;
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
};
|
|
463
|
+
</script>
|
|
464
|
+
```
|
|
@@ -1,16 +1,7 @@
|
|
|
1
|
-
# 阴影分析
|
|
2
|
-
|
|
3
1
|
> mapgis-3d-shadow
|
|
4
2
|
|
|
5
3
|
## 属性
|
|
6
4
|
|
|
7
|
-
### `position`
|
|
8
|
-
|
|
9
|
-
- **类型:** `String`
|
|
10
|
-
- **默认值:** `right`
|
|
11
|
-
- **非侦听属性**
|
|
12
|
-
- **描述:** 分析面板的位置(right:右边 | left: 左边)
|
|
13
|
-
|
|
14
5
|
### `vueKey`
|
|
15
6
|
|
|
16
7
|
- **类型:** `String`
|
|
@@ -35,6 +26,58 @@ mapgis-web-scene组件的ID,当使用多个mapgis-web-scene组件时,需要
|
|
|
35
26
|
当mapgis-web-scene插槽中使用了多个相同组件时,例如多个mapgis-3d-igs-doc-layer组件,用来区分组件的标识符。
|
|
36
27
|
```
|
|
37
28
|
|
|
29
|
+
### `shadowColor`
|
|
30
|
+
|
|
31
|
+
- **类型:** `String`
|
|
32
|
+
- **可选**
|
|
33
|
+
- **侦听属性**
|
|
34
|
+
- **默认值:** `rgba(0,255,0,255)`
|
|
35
|
+
- **描述:** 阴影部分颜色
|
|
36
|
+
|
|
37
|
+
### `sunColor`
|
|
38
|
+
|
|
39
|
+
- **类型:** `String`
|
|
40
|
+
- **可选**
|
|
41
|
+
- **侦听属性**
|
|
42
|
+
- **默认值:** `rgba(255,0,0,255)`
|
|
43
|
+
- **描述:** 非阴影部分颜色
|
|
44
|
+
|
|
45
|
+
### `minHeight`
|
|
46
|
+
- **类型:** `Number`
|
|
47
|
+
- **可选**
|
|
48
|
+
- **侦听属性**
|
|
49
|
+
- **默认值:** `0`
|
|
50
|
+
- **描述:** 底部高程,单位为米
|
|
51
|
+
|
|
52
|
+
### `stretchHeight`
|
|
53
|
+
- **类型:** `Number`
|
|
54
|
+
- **可选**
|
|
55
|
+
- **侦听属性**
|
|
56
|
+
- **默认值:** `0`
|
|
57
|
+
- **描述:** 拉伸高度,单位为米
|
|
58
|
+
|
|
59
|
+
## 方法
|
|
60
|
+
|
|
61
|
+
### `removeAll`
|
|
62
|
+
|
|
63
|
+
- **Description:** 移除阴影分析对象,移除阴影分析结果和日照分析结果。
|
|
64
|
+
|
|
65
|
+
## 事件
|
|
66
|
+
|
|
67
|
+
### `@load`
|
|
68
|
+
|
|
69
|
+
- **Description:** 在 Shadow组件 加载完毕后发送该事件
|
|
70
|
+
- **Payload** 阴影分析对象
|
|
71
|
+
|
|
72
|
+
### `@analysisBegin`
|
|
73
|
+
|
|
74
|
+
- **Description:** 在阴影分析绘制完后,开始分析前发送该事件
|
|
75
|
+
|
|
76
|
+
### `@success`
|
|
77
|
+
|
|
78
|
+
- **Description:** 在阴影分析结束后发送该事件
|
|
79
|
+
|
|
80
|
+
|
|
38
81
|
## 示例
|
|
39
82
|
|
|
40
83
|
```vue
|
|
@@ -51,7 +94,13 @@ mapgis-web-scene组件的ID,当使用多个mapgis-web-scene组件时,需要
|
|
|
51
94
|
:url="m3dUrl"
|
|
52
95
|
:vue-index="vueIndex"
|
|
53
96
|
/>
|
|
54
|
-
<mapgis-
|
|
97
|
+
<mapgis-ui-card class="storybook-ui-card">
|
|
98
|
+
<mapgis-3d-shadow
|
|
99
|
+
:vue-index="vueIndex"
|
|
100
|
+
:shadowColor="shadowColor"
|
|
101
|
+
:sunColor="sunColor"
|
|
102
|
+
@load="load"></mapgis-3d-shadow>
|
|
103
|
+
</mapgis-ui-card>
|
|
55
104
|
</mapgis-web-scene>
|
|
56
105
|
</div>
|
|
57
106
|
</template>
|
|
@@ -65,12 +114,26 @@ export default {
|
|
|
65
114
|
// m3dUrl:"http://develop.smaryun.com:6163/igs/rest/g3d/DaYanTa",
|
|
66
115
|
autoReset: true,
|
|
67
116
|
maximumScreenSpaceError: 6,
|
|
68
|
-
vueIndex: 22
|
|
117
|
+
vueIndex: 22,
|
|
118
|
+
shadowColor:'#2E8B57',
|
|
119
|
+
sunColor:'#FFA500',
|
|
120
|
+
shadowAnalysis:undefined
|
|
69
121
|
};
|
|
70
122
|
},
|
|
71
|
-
methods: {
|
|
123
|
+
methods: {
|
|
124
|
+
load(shadowAnalysis){
|
|
125
|
+
this.shadowAnalysis = shadowAnalysis;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
72
128
|
};
|
|
73
129
|
</script>
|
|
74
130
|
|
|
75
|
-
<style scoped
|
|
131
|
+
<style scoped>
|
|
132
|
+
.storybook-ui-card {
|
|
133
|
+
position: absolute;
|
|
134
|
+
top: 10px;
|
|
135
|
+
left: 10px;
|
|
136
|
+
z-index: 1000;
|
|
137
|
+
}
|
|
138
|
+
</style>
|
|
76
139
|
```
|
|
@@ -1,25 +1,61 @@
|
|
|
1
|
-
# 通视分析
|
|
2
|
-
|
|
3
1
|
> mapgis-3d-sightline
|
|
4
2
|
|
|
5
3
|
## 属性
|
|
6
4
|
|
|
7
|
-
|
|
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
|
+
- **描述:**
|
|
8
24
|
|
|
9
|
-
|
|
25
|
+
```
|
|
26
|
+
当mapgis-web-scene插槽中使用了多个相同组件时,例如多个mapgis-3d-igs-doc-layer组件,用来区分组件的标识符。
|
|
27
|
+
```
|
|
10
28
|
|
|
11
|
-
|
|
29
|
+
### `exHeight`
|
|
12
30
|
|
|
13
|
-
|
|
31
|
+
- **类型:** `Number`
|
|
32
|
+
- **可选**
|
|
33
|
+
- **侦听属性**
|
|
34
|
+
- **默认值:** `1.85`
|
|
35
|
+
- **描述:** 观察点的附加高度,单位为米
|
|
14
36
|
|
|
15
|
-
|
|
37
|
+
### `unVisibleColor`
|
|
38
|
+
|
|
39
|
+
- **类型:** `String`
|
|
40
|
+
- **可选**
|
|
41
|
+
- **侦听属性**
|
|
42
|
+
- **默认值:** `#ff0000`
|
|
43
|
+
- **描述:** 不可视区域颜色,可以传 16 进制或者 rgba 任意形式颜色
|
|
16
44
|
|
|
17
|
-
### `
|
|
45
|
+
### `visibleColor`
|
|
18
46
|
|
|
19
47
|
- **类型:** `String`
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
48
|
+
- **可选**
|
|
49
|
+
- **侦听属性**
|
|
50
|
+
- **默认值:** `#008000`
|
|
51
|
+
- **描述:** 可视区域颜色,可以传 16 进制或者 rgba 任意形式颜色
|
|
52
|
+
|
|
53
|
+
## 事件
|
|
54
|
+
|
|
55
|
+
### `@load`
|
|
56
|
+
|
|
57
|
+
- **Description:** 在 Sightline 组件 加载完毕后发送该事件
|
|
58
|
+
- **Payload** 通视分析对象
|
|
23
59
|
|
|
24
60
|
## 示例
|
|
25
61
|
|
|
@@ -35,7 +71,13 @@
|
|
|
35
71
|
:maximumScreenSpaceError="maximumScreenSpaceError"
|
|
36
72
|
:url="m3dUrl"
|
|
37
73
|
/>
|
|
38
|
-
<mapgis-
|
|
74
|
+
<mapgis-ui-card class="storybook-ui-card">
|
|
75
|
+
<mapgis-3d-sightline
|
|
76
|
+
:exHeight="exHeight"
|
|
77
|
+
:visibleColor="visibleColor"
|
|
78
|
+
:unVisibleColor="unVisibleColor"
|
|
79
|
+
></mapgis-3d-sightline>
|
|
80
|
+
</mapgis-ui-card>
|
|
39
81
|
</mapgis-web-scene>
|
|
40
82
|
</template>
|
|
41
83
|
|
|
@@ -47,9 +89,20 @@ export default {
|
|
|
47
89
|
"http://t0.tianditu.com/DataServer?T=vec_w&L={z}&Y={y}&X={x}&tk=9c157e9585486c02edf817d2ecbc7752",
|
|
48
90
|
m3dUrl: "http://develop.smaryun.com:6163/igs/rest/g3d/ZondyModels",
|
|
49
91
|
autoReset: true,
|
|
50
|
-
maximumScreenSpaceError: 8
|
|
92
|
+
maximumScreenSpaceError: 8,
|
|
93
|
+
exHeight: 2.0,
|
|
94
|
+
visibleColor: "#2E8B57",
|
|
95
|
+
unVisibleColor: "#FFA500"
|
|
51
96
|
};
|
|
52
97
|
}
|
|
53
98
|
};
|
|
54
99
|
</script>
|
|
100
|
+
<style scoped>
|
|
101
|
+
.storybook-ui-card {
|
|
102
|
+
position: absolute;
|
|
103
|
+
top: 10px;
|
|
104
|
+
left: 10px;
|
|
105
|
+
z-index: 1000;
|
|
106
|
+
}
|
|
107
|
+
</style>
|
|
55
108
|
```
|