@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 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export {
|
|
2
|
+
getGeoJSONFeatureCenter,
|
|
3
|
+
getGeoJSONFeaturesCenter,
|
|
4
|
+
getGeoJSONFeatureBound
|
|
5
|
+
} from "./feature-geojson";
|
|
6
|
+
export { default as FeatureConvert } from "./feature-convert";
|
|
7
|
+
export { default as FeatureQuery } from "./feature-query";
|
|
8
|
+
export { default as FeatureEdit } from "./feature-edit";
|
|
9
|
+
export { default as ArcGISFeatureQuery } from "./arcgis-feature-query";
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import * as Zondy from "@mapgis/webclient-es6-service";
|
|
2
|
+
export class GeometryExp {
|
|
3
|
+
static calculateBound(dots) {
|
|
4
|
+
const bound = {
|
|
5
|
+
xmin: dots[0][0],
|
|
6
|
+
ymin: dots[0][1],
|
|
7
|
+
xmax: dots[0][0],
|
|
8
|
+
ymax: dots[0][1]
|
|
9
|
+
};
|
|
10
|
+
for (let i = 0; i < dots.length; i += 1) {
|
|
11
|
+
if (bound.xmin && dots[i][0] < bound.xmin) {
|
|
12
|
+
bound.xmin = dots[i][0];
|
|
13
|
+
}
|
|
14
|
+
if (bound.ymin && dots[i][1] < bound.ymin) {
|
|
15
|
+
bound.ymin = dots[i][1];
|
|
16
|
+
}
|
|
17
|
+
if (bound.xmax && dots[i][0] > bound.xmax) {
|
|
18
|
+
bound.xmax = dots[i][0];
|
|
19
|
+
}
|
|
20
|
+
if (bound.ymax && dots[i][1] > bound.ymax) {
|
|
21
|
+
bound.ymax = dots[i][1];
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return bound;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* 获取多边形重心
|
|
28
|
+
* @param lnglats
|
|
29
|
+
* @returns {number[]}
|
|
30
|
+
*/
|
|
31
|
+
static getCenterOfGravityPoint(lnglats) {
|
|
32
|
+
let area = 0.0; // 多边形面积
|
|
33
|
+
let Gx = 0.0;
|
|
34
|
+
let Gy = 0.0; // 重心的x、y
|
|
35
|
+
for (let i = 1; i <= lnglats.length; i += 1) {
|
|
36
|
+
const iLat = lnglats[i % lnglats.length][1];
|
|
37
|
+
const iLng = lnglats[i % lnglats.length][0];
|
|
38
|
+
const nextLat = lnglats[i - 1][1];
|
|
39
|
+
const nextLng = lnglats[i - 1][0];
|
|
40
|
+
const temp = (iLat * nextLng - iLng * nextLat) / 2.0;
|
|
41
|
+
area += temp;
|
|
42
|
+
Gy += (temp * (iLat + nextLat)) / 3.0;
|
|
43
|
+
Gx += (temp * (iLng + nextLng)) / 3.0;
|
|
44
|
+
}
|
|
45
|
+
return [Gx / area, Gy / area];
|
|
46
|
+
}
|
|
47
|
+
static creatRectangleByViewRectangle(rect) {
|
|
48
|
+
return new Zondy.Common.Rectangle(
|
|
49
|
+
rect.west,
|
|
50
|
+
rect.south,
|
|
51
|
+
rect.east,
|
|
52
|
+
rect.north
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
static creatRectByMinMax(xMin, yMin, xMax, yMax) {
|
|
56
|
+
return new Zondy.Common.Rectangle(xMin, yMin, xMax, yMax);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<span />
|
|
3
|
-
</template>
|
|
4
|
-
<script>
|
|
5
|
-
import { DataSet } from 'mapv'
|
|
6
|
-
import { MapvLayer } from './mapv/MapvLayer'
|
|
7
|
-
export default {
|
|
8
|
-
name: "cesium-mapv-layer",
|
|
9
|
-
props: {
|
|
10
|
-
geojson: {
|
|
11
|
-
type: Object,
|
|
12
|
-
required: true,
|
|
13
|
-
},
|
|
14
|
-
countField: {
|
|
15
|
-
type: String,
|
|
16
|
-
default: 'count'
|
|
17
|
-
},
|
|
18
|
-
options:{
|
|
19
|
-
type:Object,
|
|
20
|
-
default(){
|
|
21
|
-
return {
|
|
22
|
-
context: '2d',
|
|
23
|
-
draw: 'heatmap'
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
inject: ["Cesium", "webGlobe"],
|
|
29
|
-
watch:{
|
|
30
|
-
geojson: {
|
|
31
|
-
deep: true,
|
|
32
|
-
handler() {
|
|
33
|
-
const data = this.initData(this.geojson)
|
|
34
|
-
if(!data&&this.mapvLayer){
|
|
35
|
-
this.mapvLayer.destroy()
|
|
36
|
-
this.mapvLayer = undefined
|
|
37
|
-
}
|
|
38
|
-
if(!this.mapvLayer){
|
|
39
|
-
this.mount()
|
|
40
|
-
}else {
|
|
41
|
-
this.mapvLayer.updateData(data, this.options);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
options:{
|
|
46
|
-
deep:true,
|
|
47
|
-
handler(){
|
|
48
|
-
if(!this.mapvLayer){
|
|
49
|
-
return
|
|
50
|
-
}
|
|
51
|
-
this.mapvLayer.updateData(this.dataSet, this.options);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
methods: {
|
|
56
|
-
createCesiumObject () {
|
|
57
|
-
const { webGlobe } = this;
|
|
58
|
-
const { viewer } = webGlobe;
|
|
59
|
-
const dataset = this.initData();
|
|
60
|
-
if(!dataset){
|
|
61
|
-
return
|
|
62
|
-
}
|
|
63
|
-
return new MapvLayer(viewer, dataset, this.options);
|
|
64
|
-
},
|
|
65
|
-
initData (geojson) {
|
|
66
|
-
let data = [];
|
|
67
|
-
geojson = geojson || this.geojson;
|
|
68
|
-
// 构造数据
|
|
69
|
-
var features = geojson.features;
|
|
70
|
-
if(!features){
|
|
71
|
-
return
|
|
72
|
-
}
|
|
73
|
-
for (let i = 0; i < features.length; i++) {
|
|
74
|
-
const feature = features[i]
|
|
75
|
-
const fType = feature.geometry.type
|
|
76
|
-
const coordinates = feature.geometry.coordinates
|
|
77
|
-
if (fType === 'Point') {
|
|
78
|
-
data.push({
|
|
79
|
-
geometry: {
|
|
80
|
-
type: 'Point',
|
|
81
|
-
coordinates: coordinates
|
|
82
|
-
},
|
|
83
|
-
count: feature.properties[this.countField] || 1
|
|
84
|
-
})
|
|
85
|
-
} else if (fType === 'LineString') {
|
|
86
|
-
for (let j = 0; j < coordinates.length; j++) {
|
|
87
|
-
data.push({
|
|
88
|
-
geometry: {
|
|
89
|
-
type: 'Point',
|
|
90
|
-
coordinates: coordinates[j]
|
|
91
|
-
},
|
|
92
|
-
count: feature.properties[this.countField] || 1
|
|
93
|
-
})
|
|
94
|
-
}
|
|
95
|
-
} else if (fType === 'Polygon') {
|
|
96
|
-
for (let j = 0; j < coordinates[0].length; j++) {
|
|
97
|
-
data.push({
|
|
98
|
-
geometry: {
|
|
99
|
-
type: 'Point',
|
|
100
|
-
coordinates: coordinates[0][j]
|
|
101
|
-
},
|
|
102
|
-
count: feature.properties[this.countField] || 1
|
|
103
|
-
})
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
var dataSet = new DataSet(data);
|
|
108
|
-
return dataSet;
|
|
109
|
-
},
|
|
110
|
-
// watchProp () { //?这个函数未生效改成了vue的watch
|
|
111
|
-
// let { geojson, mapvLayer } = this;
|
|
112
|
-
// if (geojson && mapvLayer) {
|
|
113
|
-
// this.$watch("geojson", function (next) {
|
|
114
|
-
// if (this.initial) return;
|
|
115
|
-
// console.log(this.geojson)
|
|
116
|
-
// const data = this.initData(next)
|
|
117
|
-
// console.log(data)
|
|
118
|
-
// this.mapvLayer.updateData(data,this.options);
|
|
119
|
-
// });
|
|
120
|
-
// }
|
|
121
|
-
// },
|
|
122
|
-
mount () {
|
|
123
|
-
this.mapvLayer = this.createCesiumObject();
|
|
124
|
-
},
|
|
125
|
-
unmount () {
|
|
126
|
-
const { webGlobe, mapvLayer } = this;
|
|
127
|
-
const viewer = webGlobe.viewer;
|
|
128
|
-
return !viewer.isDestroyed() && mapvLayer.destroy();
|
|
129
|
-
},
|
|
130
|
-
},
|
|
131
|
-
beforeDestroy(){
|
|
132
|
-
if(this.mapvLayer){
|
|
133
|
-
this.mapvLayer.destroy()
|
|
134
|
-
this.mapvLayer = undefined
|
|
135
|
-
}
|
|
136
|
-
},
|
|
137
|
-
created () {
|
|
138
|
-
this.mount();
|
|
139
|
-
// this.watchProp();
|
|
140
|
-
}
|
|
141
|
-
};
|
|
142
|
-
</script>
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<span />
|
|
3
|
-
</template>
|
|
4
|
-
<script>
|
|
5
|
-
import { DataSet } from 'mapv'
|
|
6
|
-
import { MapvLayer } from './mapv/MapvLayer'
|
|
7
|
-
export default {
|
|
8
|
-
name: "cesium-heater-layer",
|
|
9
|
-
props: {
|
|
10
|
-
geojson: {
|
|
11
|
-
type: Object,
|
|
12
|
-
required: true,
|
|
13
|
-
},
|
|
14
|
-
countField: {
|
|
15
|
-
type: String,
|
|
16
|
-
default: 'count'
|
|
17
|
-
},
|
|
18
|
-
size: {
|
|
19
|
-
type: Number,
|
|
20
|
-
default: 13,
|
|
21
|
-
},
|
|
22
|
-
gradient: {
|
|
23
|
-
type: Object,
|
|
24
|
-
default: () => {
|
|
25
|
-
return {
|
|
26
|
-
0.25: "rgb(0,0,255)",
|
|
27
|
-
0.55: "rgb(0,255,0)",
|
|
28
|
-
0.85: "yellow",
|
|
29
|
-
1.0: "rgb(255,0,0)"
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
max: {
|
|
34
|
-
type: Number,
|
|
35
|
-
default: 100,
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
inject: ["Cesium", "webGlobe"],
|
|
39
|
-
methods: {
|
|
40
|
-
createCesiumObject () {
|
|
41
|
-
const { webGlobe } = this;
|
|
42
|
-
const { viewer } = webGlobe;
|
|
43
|
-
const dataset = this.initData();
|
|
44
|
-
const options = this.initOptions();
|
|
45
|
-
return new MapvLayer(viewer, dataset, options);
|
|
46
|
-
},
|
|
47
|
-
initData (geojson) {
|
|
48
|
-
let data = [];
|
|
49
|
-
geojson = geojson || this.geojson;
|
|
50
|
-
// 构造数据
|
|
51
|
-
geojson.features && geojson.features.forEach(f => {
|
|
52
|
-
data.push({
|
|
53
|
-
geometry: {
|
|
54
|
-
type: 'Point',
|
|
55
|
-
coordinates: [f.geometry.coordinates[0], f.geometry.coordinates[1]]
|
|
56
|
-
},
|
|
57
|
-
count: f.properties[this.countField] || 1,
|
|
58
|
-
});
|
|
59
|
-
});
|
|
60
|
-
var dataSet = new DataSet(data);
|
|
61
|
-
return dataSet;
|
|
62
|
-
},
|
|
63
|
-
initOptions () {
|
|
64
|
-
const { size, gradient, max } = this;
|
|
65
|
-
const options = {
|
|
66
|
-
context: '2d',
|
|
67
|
-
size: size,
|
|
68
|
-
gradient: gradient,
|
|
69
|
-
max: max,
|
|
70
|
-
draw: 'heatmap'
|
|
71
|
-
}
|
|
72
|
-
return options;
|
|
73
|
-
},
|
|
74
|
-
watchProp () {
|
|
75
|
-
let { geojson, heaterLayer } = this;
|
|
76
|
-
if (geojson && heaterLayer) {
|
|
77
|
-
this.$watch("geojson", function (next) {
|
|
78
|
-
if (this.initial) return;
|
|
79
|
-
const data = this.initData(next)
|
|
80
|
-
this.heaterLayer.updateData(data);
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
|
-
mount () {
|
|
85
|
-
this.heaterLayer = this.createCesiumObject();
|
|
86
|
-
},
|
|
87
|
-
unmount () {
|
|
88
|
-
const { webGlobe, heaterLayer } = this;
|
|
89
|
-
const viewer = webGlobe.viewer;
|
|
90
|
-
return !viewer.isDestroyed() && heaterLayer.destroy();
|
|
91
|
-
},
|
|
92
|
-
},
|
|
93
|
-
created () {
|
|
94
|
-
this.mount();
|
|
95
|
-
this.watchProp();
|
|
96
|
-
}
|
|
97
|
-
};
|
|
98
|
-
</script>
|