@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
package/docs/.vuepress/config.js
CHANGED
|
@@ -11,8 +11,8 @@ module.exports = {
|
|
|
11
11
|
"/": {
|
|
12
12
|
lang: "zh-CN",
|
|
13
13
|
title: "中地数码",
|
|
14
|
-
description: "@mapgis/webclient-vue-cesium"
|
|
15
|
-
}
|
|
14
|
+
description: "@mapgis/webclient-vue-cesium",
|
|
15
|
+
},
|
|
16
16
|
},
|
|
17
17
|
themeConfig: {
|
|
18
18
|
locales: {
|
|
@@ -27,25 +27,25 @@ module.exports = {
|
|
|
27
27
|
serviceWorker: {
|
|
28
28
|
updatePopup: {
|
|
29
29
|
message: "发现新内容可用.",
|
|
30
|
-
buttonText: "刷新"
|
|
31
|
-
}
|
|
30
|
+
buttonText: "刷新",
|
|
31
|
+
},
|
|
32
32
|
},
|
|
33
33
|
// 当前 locale 的 algolia docsearch 选项
|
|
34
34
|
algolia: {},
|
|
35
35
|
nav: [
|
|
36
36
|
{
|
|
37
37
|
text: "向导",
|
|
38
|
-
link: "/guide/"
|
|
38
|
+
link: "/guide/",
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
text: "API",
|
|
42
|
-
link: "/api/"
|
|
42
|
+
link: "/api/",
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
45
|
text: "WebClient",
|
|
46
|
-
link: "http://develop.smaryun.com"
|
|
46
|
+
link: "http://develop.smaryun.com",
|
|
47
47
|
},
|
|
48
|
-
{ text: "开源", link: "https://github.com/MapGIS/WebClient-Vue" }
|
|
48
|
+
{ text: "开源", link: "https://github.com/MapGIS/WebClient-Vue" },
|
|
49
49
|
],
|
|
50
50
|
sidebar: [
|
|
51
51
|
{
|
|
@@ -55,8 +55,8 @@ module.exports = {
|
|
|
55
55
|
["/guide/", "快速上手"],
|
|
56
56
|
["/guide/introduction.md", "产品介绍"],
|
|
57
57
|
["/guide/basemap.md", "基础地图"],
|
|
58
|
-
["/guide/wms&map&doc.md", "子图层控制"]
|
|
59
|
-
]
|
|
58
|
+
["/guide/wms&map&doc.md", "子图层控制"],
|
|
59
|
+
],
|
|
60
60
|
},
|
|
61
61
|
{
|
|
62
62
|
title: "组件",
|
|
@@ -64,13 +64,13 @@ module.exports = {
|
|
|
64
64
|
children: [
|
|
65
65
|
{
|
|
66
66
|
title: "场景",
|
|
67
|
-
collapsable: false
|
|
67
|
+
collapsable: false,
|
|
68
68
|
},
|
|
69
69
|
["/api/", "地图场景"],
|
|
70
70
|
|
|
71
71
|
{
|
|
72
72
|
title: "场景子组件",
|
|
73
|
-
collapsable: false
|
|
73
|
+
collapsable: false,
|
|
74
74
|
},
|
|
75
75
|
["/api/ui/popup.md", "气泡"],
|
|
76
76
|
["/api/ui/marker.md", "标记点"],
|
|
@@ -86,7 +86,7 @@ module.exports = {
|
|
|
86
86
|
|
|
87
87
|
{
|
|
88
88
|
title: "图层",
|
|
89
|
-
collapsable: false
|
|
89
|
+
collapsable: false,
|
|
90
90
|
},
|
|
91
91
|
["/api/layer/IGServer/IgsVectorLayer.md", "IGS二维矢量"],
|
|
92
92
|
["/api/layer/IGServer/IgsDocLayer.md", "IGS地图文档"],
|
|
@@ -104,17 +104,18 @@ module.exports = {
|
|
|
104
104
|
["/api/m3d/m3d.md", "M3D"],
|
|
105
105
|
|
|
106
106
|
["/api/datasource/geojson.md", "GeoJSON"],
|
|
107
|
+
["/api/layer/marker/DynamicMarker.md", "动态注记"],
|
|
107
108
|
|
|
108
109
|
{
|
|
109
110
|
title: "可视化",
|
|
110
|
-
collapsable: false
|
|
111
|
+
collapsable: false,
|
|
111
112
|
},
|
|
112
113
|
["/api/Overlay/Echarts.md", "Echarts"],
|
|
113
114
|
["/api/Overlay/Mapv.md", "MapV"],
|
|
114
115
|
|
|
115
116
|
{
|
|
116
117
|
title: "空间分析",
|
|
117
|
-
collapsable: false
|
|
118
|
+
collapsable: false,
|
|
118
119
|
},
|
|
119
120
|
["/api/analysis/Viewshed.md", "可视域分析"],
|
|
120
121
|
["/api/analysis/Sightline.md", "通视分析"],
|
|
@@ -124,8 +125,8 @@ module.exports = {
|
|
|
124
125
|
// ["/api/analysis/Fill.md", "填挖方分析"],
|
|
125
126
|
["/api/analysis/HeightLimited.md", "限高分析"],
|
|
126
127
|
["/api/analysis/Shadow.md", "阴影分析"],
|
|
127
|
-
["/api/analysis/Skyline.md", "天际线分析"]
|
|
128
|
-
]
|
|
128
|
+
["/api/analysis/Skyline.md", "天际线分析"],
|
|
129
|
+
],
|
|
129
130
|
},
|
|
130
131
|
{
|
|
131
132
|
title: "组件开发",
|
|
@@ -134,60 +135,60 @@ module.exports = {
|
|
|
134
135
|
["/plugin_components/", "使用组件"],
|
|
135
136
|
[
|
|
136
137
|
"/plugin_components/plugin_components_development.md",
|
|
137
|
-
"创建组件"
|
|
138
|
-
]
|
|
139
|
-
|
|
138
|
+
"创建组件",
|
|
139
|
+
],
|
|
140
|
+
["/plugin_components/create_storybook.md", "创建Storybook示例"],
|
|
141
|
+
],
|
|
140
142
|
},
|
|
141
143
|
{
|
|
142
144
|
title: "版本",
|
|
143
145
|
collapsable: false,
|
|
144
|
-
children: [
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
146
|
+
children: [
|
|
147
|
+
["/version/version.md", "更新说明"],
|
|
148
|
+
["/version/diff.md", "版本对比"],
|
|
149
|
+
],
|
|
150
|
+
},
|
|
151
|
+
],
|
|
152
|
+
},
|
|
153
|
+
},
|
|
149
154
|
},
|
|
150
155
|
serviceWorker: true,
|
|
151
156
|
head: [
|
|
152
157
|
[
|
|
153
158
|
"script",
|
|
154
159
|
{
|
|
155
|
-
src:
|
|
156
|
-
|
|
157
|
-
}
|
|
160
|
+
src: "https://cdn.jsdelivr.net/npm/react@16.6.3/umd/react.production.min.js",
|
|
161
|
+
},
|
|
158
162
|
],
|
|
159
163
|
[
|
|
160
164
|
"script",
|
|
161
165
|
{
|
|
162
|
-
src:
|
|
163
|
-
|
|
164
|
-
}
|
|
166
|
+
src: "https://cdn.jsdelivr.net/npm/react-dom@16.6.3/umd/react-dom.production.min.js",
|
|
167
|
+
},
|
|
165
168
|
],
|
|
166
169
|
["script", { src: "https://cdn.jsdelivr.net/npm/vue/dist/vue.min.js" }],
|
|
167
170
|
[
|
|
168
171
|
"script",
|
|
169
|
-
{ src: "https://cdn.jsdelivr.net/npm/@babel/standalone/babel.min.js" }
|
|
172
|
+
{ src: "https://cdn.jsdelivr.net/npm/@babel/standalone/babel.min.js" },
|
|
170
173
|
],
|
|
171
174
|
[
|
|
172
175
|
"script",
|
|
173
|
-
{ src: "https://cdn.jsdelivr.net/npm/numerify/lib/index.umd.min.js" }
|
|
176
|
+
{ src: "https://cdn.jsdelivr.net/npm/numerify/lib/index.umd.min.js" },
|
|
174
177
|
],
|
|
175
178
|
[
|
|
176
179
|
"link",
|
|
177
180
|
{
|
|
178
|
-
href:
|
|
179
|
-
"http://develop.smaryun.com/static/libs/cdn/zondyclient/npm/webclient-vue-cesium.css",
|
|
181
|
+
href: "http://develop.smaryun.com/static/libs/cdn/zondyclient/npm/webclient-vue-cesium.css",
|
|
180
182
|
rel: "stylesheet",
|
|
181
|
-
type: "text/css"
|
|
182
|
-
}
|
|
183
|
+
type: "text/css",
|
|
184
|
+
},
|
|
183
185
|
],
|
|
184
186
|
[
|
|
185
187
|
"script",
|
|
186
188
|
{
|
|
187
|
-
src:
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
]
|
|
189
|
+
src: "http://develop.smaryun.com/static/libs/cdn/zondyclient/npm/webclient-vue-cesium.umd.js",
|
|
190
|
+
},
|
|
191
|
+
],
|
|
191
192
|
],
|
|
192
193
|
plugins: [
|
|
193
194
|
[
|
|
@@ -198,9 +199,9 @@ module.exports = {
|
|
|
198
199
|
cssLibs: [],
|
|
199
200
|
jsfiddle: true, // 是否显示 jsfiddle 链接
|
|
200
201
|
codepen: true, // 是否显示 codepen 链接
|
|
201
|
-
horizontal: false // 是否展示为横向样式
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
]
|
|
205
|
-
]
|
|
202
|
+
horizontal: false, // 是否展示为横向样式
|
|
203
|
+
},
|
|
204
|
+
},
|
|
205
|
+
],
|
|
206
|
+
],
|
|
206
207
|
};
|
package/docs/README.md
CHANGED
|
@@ -19,6 +19,7 @@ footer: MIT Licensed
|
|
|
19
19
|
|
|
20
20
|
```javascript
|
|
21
21
|
// main.js
|
|
22
|
+
import "@mapgis/webclient-vue-cesium/dist-libs/webclient-vue-cesium.css";
|
|
22
23
|
import Mapgis3d from "@mapgis/webclient-vue-cesium";
|
|
23
24
|
Vue.use(Mapgis3d);
|
|
24
25
|
```
|
|
@@ -28,7 +29,7 @@ Vue.use(Mapgis3d);
|
|
|
28
29
|
<mapgis-web-scene
|
|
29
30
|
ref="webgloberef"
|
|
30
31
|
libPath="statics/cesium/Cesium.js"
|
|
31
|
-
pluginPath="statics/cesium/webclient-cesium-
|
|
32
|
+
pluginPath="statics/cesium/webclient-cesium-plugin.min.js"
|
|
32
33
|
>
|
|
33
34
|
<mapgis-3d-igs-tile-layer
|
|
34
35
|
:ip="ip"
|
|
@@ -48,14 +49,14 @@ export default {
|
|
|
48
49
|
ip: "develop.smaryun.com",
|
|
49
50
|
port: "6163",
|
|
50
51
|
protocol: "http",
|
|
51
|
-
serverName: "北京市"
|
|
52
|
+
serverName: "北京市",
|
|
52
53
|
};
|
|
53
54
|
},
|
|
54
55
|
methods: {
|
|
55
56
|
handleLoad(e) {
|
|
56
57
|
console.log("地图加初始化完毕!", e);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
58
|
+
},
|
|
59
|
+
},
|
|
59
60
|
};
|
|
60
61
|
</script>
|
|
61
62
|
```
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
> mapgis-3d-analysis-aspect
|
|
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: 60, color: "rgba(244, 67, 54, 0.5)" },
|
|
32
|
+
{ min: 60, max: 120, color: "rgba(233, 30, 99, 0.5)" },
|
|
33
|
+
{ min: 120, max: 180, color: "rgba(156, 39, 176, 0.5)" },
|
|
34
|
+
{ min: 180, max: 240, color: "rgba(255, 235, 59, 0.5)" },
|
|
35
|
+
{ min: 240, max: 300, color: "rgba(96, 125, 139, 0.5)" },
|
|
36
|
+
{ min: 300, max: 360, 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:** 在 Aspect 加载完毕后发送该事件
|
|
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-aspect :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: 60, color: "rgba(244, 67, 54, 0.5)" },
|
|
96
|
+
{ min: 60, max: 120, color: "rgba(233, 30, 99, 0.5)" },
|
|
97
|
+
{ min: 120, max: 180, color: "rgba(156, 39, 176, 0.5)" },
|
|
98
|
+
{ min: 180, max: 240, color: "rgba(255, 235, 59, 0.5)" },
|
|
99
|
+
{ min: 240, max: 300, color: "rgba(96, 125, 139, 0.5)" },
|
|
100
|
+
{ min: 300, max: 360, 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-aspect :rampColors="rampColors" @load="load">
|
|
155
|
+
<!-- 这里是自定义的界面-->
|
|
156
|
+
<div>
|
|
157
|
+
<button @click="analysis">分析</button>
|
|
158
|
+
<button @click="remove">清除</button>
|
|
159
|
+
</div>
|
|
160
|
+
</mapgis-3d-analysis-aspect>
|
|
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: 60, color: "rgba(244, 67, 54, 0.5)" },
|
|
182
|
+
{ min: 60, max: 120, color: "rgba(233, 30, 99, 0.5)" },
|
|
183
|
+
{ min: 120, max: 180, color: "rgba(156, 39, 176, 0.5)" },
|
|
184
|
+
{ min: 180, max: 240, color: "rgba(255, 235, 59, 0.5)" },
|
|
185
|
+
{ min: 240, max: 300, color: "rgba(96, 125, 139, 0.5)" },
|
|
186
|
+
{ min: 300, max: 360, color: "rgba(76, 175, 80, 0.5)" }
|
|
187
|
+
],
|
|
188
|
+
aspectAnalysis: 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(aspectAnalysis) {
|
|
223
|
+
this.aspectAnalysis = aspectAnalysis;
|
|
224
|
+
},
|
|
225
|
+
//开始坡向分析
|
|
226
|
+
analysis() {
|
|
227
|
+
this.aspectAnalysis.analysis();
|
|
228
|
+
},
|
|
229
|
+
//移除坡向分析
|
|
230
|
+
remove() {
|
|
231
|
+
this.aspectAnalysis.remove();
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
};
|
|
235
|
+
</script>
|
|
236
|
+
```
|