@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,159 @@
|
|
|
1
|
+
export function isHex(color) {
|
|
2
|
+
return color.length >= 4 && color[0] == "#";
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
export function isRgb(color) {
|
|
6
|
+
return color.length >= 10 && color.slice(0, 3) == "rgb";
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export function isRgba(color) {
|
|
10
|
+
return color.length >= 13 && color.slice(0, 4) == "rgba";
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* 获取颜色的r g b a,支持#16进制模式和rgb字符串模式
|
|
15
|
+
* @param color
|
|
16
|
+
* @param opacity
|
|
17
|
+
* @returns {{a: number, r: number, b: number, g: number}}
|
|
18
|
+
*/
|
|
19
|
+
export function getColorObject(color, opacity) {
|
|
20
|
+
let tempColor = color;
|
|
21
|
+
if (color.indexOf("rgb") === -1) {
|
|
22
|
+
tempColor = hexToRgba(color, opacity);
|
|
23
|
+
}
|
|
24
|
+
const strs = tempColor.split(",");
|
|
25
|
+
const r = Number(strs[0].split("(")[1]);
|
|
26
|
+
const g = Number(strs[1]);
|
|
27
|
+
let b = 0;
|
|
28
|
+
let a = opacity !== undefined ? opacity : 1;
|
|
29
|
+
if (strs.length > 3) {
|
|
30
|
+
b = Number(strs[2]);
|
|
31
|
+
a = Number(strs[3].split(")")[0]);
|
|
32
|
+
} else if (strs.length == 3) {
|
|
33
|
+
b = Number(strs[2].split(")")[0]);
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
r,
|
|
37
|
+
g,
|
|
38
|
+
b,
|
|
39
|
+
a,
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @param color 16进制颜色转rgba
|
|
46
|
+
*/
|
|
47
|
+
export function hexToRgba(color, opacity) {
|
|
48
|
+
if (opacity === undefined) {
|
|
49
|
+
opacity = 1;
|
|
50
|
+
}
|
|
51
|
+
let sColor = color.toLowerCase();
|
|
52
|
+
// 十六进制颜色值的正则表达式
|
|
53
|
+
const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
|
|
54
|
+
// 如果是16进制颜色
|
|
55
|
+
if (sColor && reg.test(sColor)) {
|
|
56
|
+
if (sColor.length === 4) {
|
|
57
|
+
let sColorNew = "#";
|
|
58
|
+
for (let i = 1; i < 4; i += 1) {
|
|
59
|
+
sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
|
|
60
|
+
}
|
|
61
|
+
sColor = sColorNew;
|
|
62
|
+
}
|
|
63
|
+
// 处理六位的颜色值
|
|
64
|
+
const sColorChange = [];
|
|
65
|
+
for (let i = 1; i < 7; i += 2) {
|
|
66
|
+
sColorChange.push(parseInt(`0x${sColor.slice(i, i + 2)}`));
|
|
67
|
+
}
|
|
68
|
+
return `rgba(${sColorChange.join(",")},${opacity})`;
|
|
69
|
+
}
|
|
70
|
+
return sColor;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
*
|
|
75
|
+
* @param color rgb转16进制
|
|
76
|
+
*/
|
|
77
|
+
export function rgbToHex(color) {
|
|
78
|
+
if (!color.includes("rgb")) {
|
|
79
|
+
return color;
|
|
80
|
+
}
|
|
81
|
+
const colorStr = color.split("(")[1].split(")")[0];
|
|
82
|
+
const arr = colorStr.split(",");
|
|
83
|
+
const r = parseInt(arr[0]);
|
|
84
|
+
const g = parseInt(arr[1]);
|
|
85
|
+
const b = parseInt(arr[2]);
|
|
86
|
+
const hex = `#${((1 << 24) + (r << 16) + (g << 8) + b)
|
|
87
|
+
.toString(16)
|
|
88
|
+
.slice(1)}`;
|
|
89
|
+
return hex.toLocaleUpperCase();
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* rgba转16进制
|
|
94
|
+
* @param color rgba
|
|
95
|
+
* @param disableAlpha 禁用透明度
|
|
96
|
+
*/
|
|
97
|
+
export function rgbaToHex(color, disableAlpha) {
|
|
98
|
+
if (!color.includes("rgb")) {
|
|
99
|
+
return color;
|
|
100
|
+
}
|
|
101
|
+
if (!color.includes("a") || disableAlpha) {
|
|
102
|
+
// 如果是rgb或者rgba
|
|
103
|
+
return rgbToHex(color);
|
|
104
|
+
}
|
|
105
|
+
const colorStr = color.split("(")[1].split(")")[0];
|
|
106
|
+
const arr = colorStr.split(",");
|
|
107
|
+
const a = Number(arr[3] ? arr[3] : 1);
|
|
108
|
+
// 十六进制透明度枚举
|
|
109
|
+
const alpha = new Map();
|
|
110
|
+
alpha.set("00", 0);
|
|
111
|
+
alpha.set("0C", 0.05);
|
|
112
|
+
alpha.set("19", 0.1);
|
|
113
|
+
alpha.set("26", 0.15);
|
|
114
|
+
alpha.set("33", 0.2);
|
|
115
|
+
alpha.set("3F", 0.25);
|
|
116
|
+
alpha.set("4C", 0.3);
|
|
117
|
+
alpha.set("59", 0.35);
|
|
118
|
+
alpha.set("66", 0.4);
|
|
119
|
+
alpha.set("72", 0.45);
|
|
120
|
+
alpha.set("7F", 0.5);
|
|
121
|
+
alpha.set("8C", 0.55);
|
|
122
|
+
alpha.set("99", 0.6);
|
|
123
|
+
alpha.set("A5", 0.65);
|
|
124
|
+
alpha.set("B2", 0.7);
|
|
125
|
+
alpha.set("BF", 0.75);
|
|
126
|
+
alpha.set("CC", 0.8);
|
|
127
|
+
alpha.set("D8", 0.85);
|
|
128
|
+
alpha.set("E5", 0.9);
|
|
129
|
+
alpha.set("F2", 0.95);
|
|
130
|
+
alpha.set("FF", 1);
|
|
131
|
+
let alphaHex = "FF";
|
|
132
|
+
for (const item of alpha) {
|
|
133
|
+
if (item[1] == a) {
|
|
134
|
+
alphaHex = item[0];
|
|
135
|
+
break;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
const rgbHex = rgbToHex(color);
|
|
139
|
+
return `${rgbHex}${alphaHex}`;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* rgba转字符串
|
|
144
|
+
* @param rgba rgba对象
|
|
145
|
+
* @param disableAlpha 禁用透明度
|
|
146
|
+
*/
|
|
147
|
+
export function colorObjectToRgba(rgba, disableAlpha) {
|
|
148
|
+
let colorStr = "";
|
|
149
|
+
if (rgba.a !== undefined) {
|
|
150
|
+
colorStr = `rgba(${rgba.r}, ${rgba.g}, ${rgba.b}, ${rgba.a})`;
|
|
151
|
+
// 已传入disableAlpha,并且为true
|
|
152
|
+
if (disableAlpha) {
|
|
153
|
+
colorStr = `rgb(${rgba.r}, ${rgba.g}, ${rgba.b})`;
|
|
154
|
+
}
|
|
155
|
+
} else {
|
|
156
|
+
colorStr = `rgb(${rgba.r}, ${rgba.g}, ${rgba.b})`;
|
|
157
|
+
}
|
|
158
|
+
return colorStr;
|
|
159
|
+
}
|