@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,152 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import { isDef } from "../../../Utils/util";
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
name: "mapgis-3d-cesium-heater-layer",
|
|
6
|
+
inject: ["webGlobe", "CesiumZondy"],
|
|
7
|
+
props: {
|
|
8
|
+
geojson: {
|
|
9
|
+
// 数据源
|
|
10
|
+
type: Object
|
|
11
|
+
},
|
|
12
|
+
bound: {
|
|
13
|
+
// 图层范围
|
|
14
|
+
type: Object
|
|
15
|
+
},
|
|
16
|
+
options: {
|
|
17
|
+
// 热力图配置
|
|
18
|
+
type: Object,
|
|
19
|
+
default: () => ({})
|
|
20
|
+
},
|
|
21
|
+
field: {
|
|
22
|
+
// 统计的属性
|
|
23
|
+
type: String,
|
|
24
|
+
default: "count"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
methods: {
|
|
28
|
+
/**
|
|
29
|
+
* 获取原生热力图数据坐标和值的集合
|
|
30
|
+
* @param {object} geojson geojson数据
|
|
31
|
+
* @param { string} field 属性
|
|
32
|
+
*/
|
|
33
|
+
$_getCesiumDataArr(geojson, field) {
|
|
34
|
+
return geojson.features.map(
|
|
35
|
+
({ geometry: { coordinates }, properties }) => {
|
|
36
|
+
const countValue = properties[field];
|
|
37
|
+
const value = isDef(countValue) ? countValue : 1;
|
|
38
|
+
const [x, y] = Array.isArray(coordinates[0])
|
|
39
|
+
? coordinates[0][0]
|
|
40
|
+
: coordinates;
|
|
41
|
+
return {
|
|
42
|
+
x,
|
|
43
|
+
y,
|
|
44
|
+
value
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
},
|
|
49
|
+
/**
|
|
50
|
+
* 获取原生热力图数据的值的范围
|
|
51
|
+
* @param {object} data {x,y,value}
|
|
52
|
+
* @returns {array} [min, max]
|
|
53
|
+
*/
|
|
54
|
+
$_getCesiumDataRange(data) {
|
|
55
|
+
const values = data.map(({ value }) => value);
|
|
56
|
+
return [Math.min(...values) || 0, Math.max(...values) || 0];
|
|
57
|
+
},
|
|
58
|
+
/**
|
|
59
|
+
* 移除原生热力图层, 支持上层单独调用
|
|
60
|
+
*/
|
|
61
|
+
$_removeCesiumHeater() {
|
|
62
|
+
if (this.heaterInstance) {
|
|
63
|
+
this.heaterInstance.removeLayer();
|
|
64
|
+
this.heaterInstance = null;
|
|
65
|
+
this.analysisManager = null;
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
/**
|
|
69
|
+
* 创建原生热力图层, 支持上层单独调用
|
|
70
|
+
*/
|
|
71
|
+
$_createCesiumHeater() {
|
|
72
|
+
if (!this.analysisManager) {
|
|
73
|
+
this.analysisManager = new this.CesiumZondy.Manager.AnalysisManager({
|
|
74
|
+
viewer: this.webGlobe.viewer
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
const dataSource = this.$_getCesiumDataArr(this.geojson, this.field);
|
|
78
|
+
const [min, max] = this.$_getCesiumDataRange(dataSource);
|
|
79
|
+
this.heaterInstance = this.analysisManager.createHeatMap(
|
|
80
|
+
this.bound,
|
|
81
|
+
min,
|
|
82
|
+
max,
|
|
83
|
+
dataSource,
|
|
84
|
+
this.selfOptions
|
|
85
|
+
);
|
|
86
|
+
},
|
|
87
|
+
/**
|
|
88
|
+
* 更新热力图
|
|
89
|
+
*/
|
|
90
|
+
$_updateCesiumHeater(value) {
|
|
91
|
+
if (!value) {
|
|
92
|
+
this.$_removeCesiumHeater();
|
|
93
|
+
} else {
|
|
94
|
+
this.$_createCesiumHeater();
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
computed: {
|
|
99
|
+
// 配置
|
|
100
|
+
selfOptions({ options }) {
|
|
101
|
+
return {
|
|
102
|
+
minOpacity: 0,
|
|
103
|
+
maxOpacity: 1,
|
|
104
|
+
gradient: {
|
|
105
|
+
"0.25": "rgb(0,0,255)",
|
|
106
|
+
"0.55": "rgb(0,255,0)",
|
|
107
|
+
"0.85": "rgb(241,241,15)",
|
|
108
|
+
"1.0": "rgb(255,0,0)"
|
|
109
|
+
},
|
|
110
|
+
spacing: 1, // 边界周围的额外空间
|
|
111
|
+
alpha: 1, // 透明度
|
|
112
|
+
blur: 0.85, // 模糊值
|
|
113
|
+
radius: 20, // 每个热力点半径大小
|
|
114
|
+
useClustering: true, // 是否聚合
|
|
115
|
+
...options
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
watch: {
|
|
120
|
+
// todo 样式配置更新是否需要重新createHeatMap?有无提供只更新样式配置或者数据的方法?
|
|
121
|
+
options: {
|
|
122
|
+
deep: true,
|
|
123
|
+
handler(o) {
|
|
124
|
+
if (o) {
|
|
125
|
+
this.$_createCesiumHeater();
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
bound: {
|
|
130
|
+
deep: true,
|
|
131
|
+
handler(v) {
|
|
132
|
+
this.$_updateCesiumHeater();
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
geojson: {
|
|
136
|
+
deep: true,
|
|
137
|
+
handler(v) {
|
|
138
|
+
this.$_updateCesiumHeater();
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
beforeDestroy() {
|
|
143
|
+
this.$_removeCesiumHeater();
|
|
144
|
+
},
|
|
145
|
+
created() {
|
|
146
|
+
this.$_createCesiumHeater();
|
|
147
|
+
},
|
|
148
|
+
render() {
|
|
149
|
+
return null;
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
</script>
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import { MRFS } from "@mapgis/webclient-es6-service";
|
|
3
|
+
import { DataSet } from "mapv";
|
|
4
|
+
import { MapvLayer } from "../../mapv/MapvLayer";
|
|
5
|
+
|
|
6
|
+
const { VFeature } = MRFS;
|
|
7
|
+
|
|
8
|
+
export default {
|
|
9
|
+
name: "mapgis-3d-mapv-heater-layer",
|
|
10
|
+
inject: ["Cesium", "webGlobe"],
|
|
11
|
+
props: {
|
|
12
|
+
geojson: {
|
|
13
|
+
// 数据源
|
|
14
|
+
type: Object
|
|
15
|
+
},
|
|
16
|
+
field: {
|
|
17
|
+
// 统计的属性
|
|
18
|
+
type: String,
|
|
19
|
+
default: "count"
|
|
20
|
+
},
|
|
21
|
+
options: {
|
|
22
|
+
// 热力图配置
|
|
23
|
+
type: Object,
|
|
24
|
+
default: () => ({})
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
methods: {
|
|
28
|
+
/**
|
|
29
|
+
* 转换数据
|
|
30
|
+
* @param {object} geojson 数据源
|
|
31
|
+
*/
|
|
32
|
+
$_convertGeojson(geojson) {
|
|
33
|
+
return VFeature.resultToGeojson(geojson);
|
|
34
|
+
},
|
|
35
|
+
/**
|
|
36
|
+
* 处理geojson
|
|
37
|
+
* @param {object} geojson 数据源
|
|
38
|
+
* @param {string} field 统计属性字段
|
|
39
|
+
*/
|
|
40
|
+
$_handleGeojson(geojson, field) {
|
|
41
|
+
if (!geojson || !field) return;
|
|
42
|
+
const _geojson = !("features" in geojson)
|
|
43
|
+
? this.$_convertGeojson(geojson)
|
|
44
|
+
: geojson;
|
|
45
|
+
let _dataSet = [];
|
|
46
|
+
|
|
47
|
+
if (_geojson.features.length) {
|
|
48
|
+
_dataSet = _geojson.features.map(({ geometry, properties }) => {
|
|
49
|
+
const { type, coordinates } = geometry;
|
|
50
|
+
const { time, ...others } = properties;
|
|
51
|
+
const timeValue = time ? Number(time) : 100 * Math.random();
|
|
52
|
+
const fieldValue = properties[field] || 1;
|
|
53
|
+
const count =
|
|
54
|
+
typeof fieldValue === "number" && !isNaN(fieldValue)
|
|
55
|
+
? fieldValue
|
|
56
|
+
: Number(fieldValue);
|
|
57
|
+
return {
|
|
58
|
+
geometry: {
|
|
59
|
+
type,
|
|
60
|
+
coordinates
|
|
61
|
+
},
|
|
62
|
+
time: timeValue,
|
|
63
|
+
count,
|
|
64
|
+
...others
|
|
65
|
+
};
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
const dataSet = new DataSet(_dataSet);
|
|
69
|
+
return dataSet;
|
|
70
|
+
},
|
|
71
|
+
/**
|
|
72
|
+
* 更新mapv热力图层
|
|
73
|
+
*/
|
|
74
|
+
$_updateMapvLayer() {
|
|
75
|
+
if (!this.mapvLayer) {
|
|
76
|
+
this.$_createMapvLayer();
|
|
77
|
+
} else {
|
|
78
|
+
this.mapvLayer.updateData(this.dataSource, this.selfOptions);
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
/**
|
|
82
|
+
* 创建mapv热力图层
|
|
83
|
+
*/
|
|
84
|
+
$_createMapvLayer() {
|
|
85
|
+
if (!this.geojson) return;
|
|
86
|
+
this.dataSource = this.$_handleGeojson(this.geojson, this.field);
|
|
87
|
+
this.mapvLayer = new MapvLayer(
|
|
88
|
+
this.webGlobe.viewer,
|
|
89
|
+
this.dataSource,
|
|
90
|
+
this.selfOptions
|
|
91
|
+
);
|
|
92
|
+
},
|
|
93
|
+
/**
|
|
94
|
+
* 移除mapv热力图图层
|
|
95
|
+
*/
|
|
96
|
+
$_removeMapvLayer() {
|
|
97
|
+
if (this.mapvLayer) {
|
|
98
|
+
this.mapvLayer.remove();
|
|
99
|
+
this.mapvLayer.destroy();
|
|
100
|
+
this.mapvLayer = null;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
data: vm => ({
|
|
105
|
+
dataSource: null
|
|
106
|
+
}),
|
|
107
|
+
computed: {
|
|
108
|
+
// 配置
|
|
109
|
+
selfOptions({ options }) {
|
|
110
|
+
return {
|
|
111
|
+
cesium: {
|
|
112
|
+
postRender: true,
|
|
113
|
+
postRenderFrame: 10
|
|
114
|
+
},
|
|
115
|
+
context: "2d",
|
|
116
|
+
draw: "heatmap",
|
|
117
|
+
minOpacity: 0,
|
|
118
|
+
maxOpacity: 1,
|
|
119
|
+
gradient: {
|
|
120
|
+
"0.25": "rgb(0,0,255)",
|
|
121
|
+
"0.55": "rgb(0,255,0)",
|
|
122
|
+
"0.85": "rgb(241,241,15)",
|
|
123
|
+
"1.0": "rgb(255,0,0)"
|
|
124
|
+
},
|
|
125
|
+
max: 100, // 最大权重值
|
|
126
|
+
size: 20, // 每个热力点半径大小
|
|
127
|
+
...options
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
watch: {
|
|
132
|
+
options: {
|
|
133
|
+
deep: true,
|
|
134
|
+
handler(o) {
|
|
135
|
+
if (o) {
|
|
136
|
+
this.$_updateMapvLayer();
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
geojson: {
|
|
141
|
+
deep: true,
|
|
142
|
+
handler(d) {
|
|
143
|
+
if (!d) {
|
|
144
|
+
this.$_removeMapvLayer();
|
|
145
|
+
} else {
|
|
146
|
+
this.$_updateMapvLayer();
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
beforeDestroy() {
|
|
152
|
+
this.$_removeMapvLayer();
|
|
153
|
+
},
|
|
154
|
+
created() {
|
|
155
|
+
this.$_createMapvLayer();
|
|
156
|
+
},
|
|
157
|
+
render() {
|
|
158
|
+
return null;
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
</script>
|