@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.
Files changed (124) hide show
  1. package/README.md +46 -49
  2. package/dist-libs/webclient-vue-cesium.common.js +191087 -0
  3. package/dist-libs/webclient-vue-cesium.css +1 -1
  4. package/dist-libs/webclient-vue-cesium.umd.js +191097 -0
  5. package/dist-libs/webclient-vue-cesium.umd.min.js +204 -194
  6. package/docs/.vuepress/config.js +47 -46
  7. package/docs/README.md +5 -4
  8. package/docs/api/analysis/Aspect.md +236 -0
  9. package/docs/api/analysis/Contour.md +240 -0
  10. package/docs/api/analysis/CutFill.md +306 -0
  11. package/docs/api/analysis/DynamicSection.md +336 -0
  12. package/docs/api/analysis/Excavate.md +3 -11
  13. package/docs/api/analysis/Flood.md +177 -200
  14. package/docs/api/analysis/HeightLimited.md +7 -4
  15. package/docs/api/analysis/ParticleEffects.md +549 -0
  16. package/docs/api/analysis/Profile.md +464 -0
  17. package/docs/api/analysis/Shadow.md +76 -13
  18. package/docs/api/analysis/Sightline.md +66 -13
  19. package/docs/api/analysis/Skyline.md +144 -29
  20. package/docs/api/analysis/Slope.md +236 -0
  21. package/docs/api/analysis/Viewshed.md +100 -21
  22. package/docs/api/layer/IGServer/IgsDocLayer.md +10 -0
  23. package/docs/api/layer/IGServer/IgsFeatureLayer.md +253 -0
  24. package/docs/api/layer/IGServer/IgsTileLayer.md +11 -0
  25. package/docs/api/layer/OGC/CesiumOgcWmsLayer.md +20 -19
  26. package/docs/api/layer/OGC/Wms.png +0 -0
  27. package/docs/api/layer/marker/DynamicMarker.md +81 -0
  28. package/docs/api/layer/marker/dynamicmarker.png +0 -0
  29. package/docs/api/layer/marker/selects.png +0 -0
  30. package/docs/api/layer/vectortile/vectortile.md +10 -0
  31. package/docs/api/m3d/image/layer_control_1.png +0 -0
  32. package/docs/api/m3d/image/layer_control_2.png +0 -0
  33. package/docs/api/m3d/image/layer_control_3.png +0 -0
  34. package/docs/api/m3d/m3d.md +13 -2
  35. package/docs/api/service/comprehensiveQuery/comprehensiveQuery.md +946 -0
  36. package/docs/api/ui/draw.md +68 -40
  37. package/docs/api/ui/link.md +8 -1
  38. package/docs/api/ui/marker.md +19 -1
  39. package/docs/api/ui/measure.md +82 -10
  40. package/docs/api/ui/table.md +6 -6
  41. package/docs/guide/README.md +26 -23
  42. package/docs/guide/basemap.md +35 -33
  43. package/docs/guide/markers&popups.md +46 -53
  44. package/docs/plugin_components/create_storybook.md +241 -0
  45. package/docs/plugin_components/img.png +0 -0
  46. package/docs/plugin_components/img_1.png +0 -0
  47. package/docs/plugin_components/img_10.png +0 -0
  48. package/docs/plugin_components/img_2.png +0 -0
  49. package/docs/plugin_components/img_3.png +0 -0
  50. package/docs/plugin_components/img_4.png +0 -0
  51. package/docs/plugin_components/img_5.png +0 -0
  52. package/docs/plugin_components/img_6.png +0 -0
  53. package/docs/plugin_components/img_7.png +0 -0
  54. package/docs/plugin_components/img_8.png +0 -0
  55. package/docs/version/diff.md +4 -4
  56. package/docs/version/version.md +81 -0
  57. package/package.json +5 -5
  58. package/src/cdn/cdn_component.js +62 -0
  59. package/src/component.js +20 -2
  60. package/src/components/Analysis/Aspect.vue +318 -0
  61. package/src/components/Analysis/Contour.vue +257 -0
  62. package/src/components/Analysis/CutFill.vue +581 -0
  63. package/src/components/Analysis/DynamicCutting.vue +98 -59
  64. package/src/components/Analysis/DynamicSection.vue +494 -0
  65. package/src/components/Analysis/Excavate.vue +133 -87
  66. package/src/components/Analysis/Flood.vue +395 -487
  67. package/src/components/Analysis/Flood.vue-- +630 -0
  68. package/src/components/Analysis/HeightLimited.vue +66 -47
  69. package/src/components/Analysis/ModelFlatten.vue +2 -2
  70. package/src/components/Analysis/Profile.vue +503 -0
  71. package/src/components/Analysis/Shadow.vue +220 -309
  72. package/src/components/Analysis/Sightline.vue +393 -375
  73. package/src/components/Analysis/SkyLine.vue +283 -93
  74. package/src/components/Analysis/Slope.vue +317 -0
  75. package/src/components/Analysis/Viewshed.vue +806 -373
  76. package/src/components/Analysis/skyline2dChartOptions.js +66 -0
  77. package/src/components/DataSource/Geojson/GeoJsonDataSource.vue +201 -3
  78. package/src/components/Layer/GeoJSON/GeoJsonLayer.vue +345 -0
  79. package/src/components/Layer/IGServer/IgsFeatureLayer.vue +227 -0
  80. package/src/components/Layer/Marker/DynamicMarkerLayer.vue +487 -0
  81. package/src/components/Layer/Marker/Marker3dPro.vue +196 -0
  82. package/src/components/Layer/Marker/Marker3dSetPro.vue +67 -0
  83. package/src/components/Layer/VectorTile/VectorTileLayer.vue +117 -33
  84. package/src/components/Layer/VectorTile/VectorTileOptions.js +1 -1
  85. package/src/components/M3D/3DTilesetOptions.js +23 -1
  86. package/src/components/M3D/G3D.vue +150 -0
  87. package/src/components/M3D/M3d.vue +142 -32
  88. package/src/components/M3D/M3dSet.vue +118 -0
  89. package/src/components/M3D/M3dType.js +24 -0
  90. package/src/components/Overlay/Mapv3dLayer.vue +2 -0
  91. package/src/components/Overlay/ParticleEffects.vue +545 -0
  92. package/src/components/Overlay/mapv/MapvBaseLayer.js +351 -172
  93. package/src/components/Overlay/mapv/MapvLayer.js +372 -324
  94. package/src/components/Overlay/mapv/SuperCluster.js +611 -0
  95. package/src/components/Overlay/themeLayer/heater/CesiumHeater.vue +152 -0
  96. package/src/components/Overlay/themeLayer/heater/MapvHeater.vue +161 -0
  97. package/src/components/UI/Controls/Draw/Draw.vue +320 -92
  98. package/src/components/UI/Controls/Legend/Legend.vue +55 -51
  99. package/src/components/UI/Controls/Link/Link.vue +59 -37
  100. package/src/components/UI/Controls/Measure/Measure.vue +75 -33
  101. package/src/components/UI/Controls/Measure/components/MeasureResult.vue +71 -0
  102. package/src/components/UI/Controls/Measure/components/MeasureSetting.vue +63 -0
  103. package/src/components/UI/Controls/Measure/components/MeasureTool.vue +155 -0
  104. package/src/components/UI/Geojson/Popup.vue +101 -0
  105. package/src/components/UI/Marker/Marker.vue +185 -48
  106. package/src/components/UI/Popup/Popup.vue +21 -64
  107. package/src/components/Utils/common/color-util.js +159 -0
  108. package/src/components/Utils/util.js +311 -231
  109. package/src/components/WebGlobe/manager.js +81 -3
  110. package/src/components/WebGlobe/mixins/withPrivateMethods.js +4 -2
  111. package/src/components/WebGlobe/util.js +173 -0
  112. package/src/components/service/comprehensive-query/ComprehensiveQuery.vue +156 -0
  113. package/src/components/service/comprehensive-query/PlaceNameCesium.vue +102 -0
  114. package/src/components/service/comprehensive-query/util/catalog/document.js +626 -0
  115. package/src/components/service/comprehensive-query/util/feature/arcgis-feature-query.js +448 -0
  116. package/src/components/service/comprehensive-query/util/feature/feature-convert.js +408 -0
  117. package/src/components/service/comprehensive-query/util/feature/feature-edit.js +50 -0
  118. package/src/components/service/comprehensive-query/util/feature/feature-geojson.js +100 -0
  119. package/src/components/service/comprehensive-query/util/feature/feature-query.js +723 -0
  120. package/src/components/service/comprehensive-query/util/feature/feature.js +1 -0
  121. package/src/components/service/comprehensive-query/util/feature/index.js +9 -0
  122. package/src/components/service/comprehensive-query/util/objects/geometry.js +58 -0
  123. package/src/components/Overlay/Mapv.vue +0 -142
  124. package/src/components/Overlay/MapvHeater.vue +0 -98
@@ -0,0 +1,227 @@
1
+ <template>
2
+ <span/>
3
+ </template>
4
+ <script>
5
+ import clonedeep from "lodash.clonedeep";
6
+
7
+ export default {
8
+ name: "mapgis-3d-igs-feature-layer",
9
+ inject: ["Cesium", "CesiumZondy", "webGlobe"],
10
+ props: {
11
+ baseUrl: {
12
+ type: String,
13
+ default: null
14
+ },
15
+ mapIndex: {
16
+ type: Number
17
+ },
18
+ layers: {
19
+ type: String,
20
+ default: null
21
+ },
22
+ autoReset: {
23
+ type: Boolean,
24
+ default: true
25
+ },
26
+ loadAll: {
27
+ type: Boolean,
28
+ default: false
29
+ },
30
+ setViewToExisting: {
31
+ type: Boolean,
32
+ default: false
33
+ },
34
+ filter: {
35
+ type: [Object, Array],
36
+ default: null
37
+ },
38
+ clampToGround: {
39
+ type: Boolean,
40
+ default: false
41
+ },
42
+ vueKey: {
43
+ type: String,
44
+ default: "default"
45
+ },
46
+ vueIndex: {
47
+ type: Number,
48
+ default() {
49
+ return Number((Math.random() * 100000000).toFixed(0));
50
+ }
51
+ },
52
+ featureStyle: {
53
+ type: [Object, Array]
54
+ }
55
+ },
56
+ data() {
57
+ return {};
58
+ },
59
+ mounted() {
60
+ this.mount();
61
+ },
62
+ destroyed() {
63
+ this.unmount();
64
+ },
65
+ watch: {
66
+ baseUrl: {
67
+ handler: function () {
68
+ this.unmount();
69
+ this.mount();
70
+ },
71
+ },
72
+ layers: {
73
+ handler: function () {
74
+ this.unmount();
75
+ this.mount();
76
+ },
77
+ },
78
+ filter: {
79
+ handler: function () {
80
+ this.unmount();
81
+ this.mount();
82
+ },
83
+ },
84
+ featureStyle: {
85
+ handler: function () {
86
+ this.unmount();
87
+ this.mount();
88
+ },
89
+ }
90
+ },
91
+ methods: {
92
+ mount() {
93
+ let {webGlobe, CesiumZondy} = this;
94
+ let vm = this;
95
+ let featureLayers;
96
+ let options = {};
97
+ options = vm.initOptions(options);
98
+ featureLayers = webGlobe.appendMapGISVectorDocMap(vm.baseUrl, options);
99
+ CesiumZondy.IgsFeatureManager.addSource(
100
+ vm.vueKey,
101
+ vm.vueIndex,
102
+ featureLayers
103
+ );
104
+ //抛出load事件
105
+ this.$emit("load", {featureLayers:featureLayers});
106
+ },
107
+ unmount() {
108
+ //图层移除
109
+ let {webGlobe} = this;
110
+ const {vueKey, vueIndex} = this;
111
+ let find = CesiumZondy.IgsFeatureManager.findSource(vueKey, vueIndex);
112
+ if (find && find.source) {
113
+ let findSource = find.source;
114
+ webGlobe.removeMapGISVectorLayer(findSource);
115
+ }
116
+ CesiumZondy.IgsFeatureManager.deleteSource(vueKey, vueIndex);
117
+ },
118
+ initOptions(options) {
119
+ const vm = this;
120
+ let {layers, autoReset, filter, mapIndex, featureStyle, clampToGround, loadAll, setViewToExisting} = this;
121
+ if (layers) {
122
+ if (layers.indexOf("gdbp") <= -1 && layers.indexOf("layers") <= -1) {
123
+ layers = 'layers=show:' + layers;
124
+ }
125
+ options.layers = layers;
126
+ }
127
+ if (autoReset) {
128
+ options.autoReset = autoReset;
129
+ }
130
+ if (filter) {
131
+ options.filter = filter;
132
+ }
133
+ if (featureStyle) {
134
+ let featureStyleCopy = clonedeep(featureStyle);
135
+ if (Array.isArray(featureStyle)) {
136
+ // 先做key值替换
137
+ let tempArr = [];
138
+ featureStyleCopy.map((currentVal, index, array) => {
139
+ tempArr.push({
140
+ 'type':currentVal.type,'styleOptions':currentVal.parameters
141
+ })
142
+ })
143
+ tempArr.forEach((fs) => {
144
+ let styleOptions = fs.styleOptions;
145
+ if (styleOptions && styleOptions.color) {
146
+ let colorTrans = vm.colorToCesiumColor(styleOptions.color);
147
+ styleOptions.color = colorTrans;
148
+ }
149
+ if (styleOptions && styleOptions.outlineColor) {
150
+ let outlineColorTemp = vm.colorToCesiumColor(styleOptions.outlineColor);
151
+ styleOptions.outlineColor = outlineColorTemp;
152
+ }
153
+ fs.styleOptions = styleOptions;
154
+ })
155
+ options.style = tempArr;
156
+ } else {
157
+ // 先做key值替换
158
+ featureStyleCopy = this.$_changeKey(featureStyleCopy);
159
+ let styleOptions = featureStyleCopy.styleOptions;
160
+ if (styleOptions && styleOptions.color) {
161
+ styleOptions.color = vm.colorToCesiumColor(styleOptions.color);
162
+ }
163
+ if (styleOptions && styleOptions.outlineColor) {
164
+ let outlineColorTemp = vm.colorToCesiumColor(styleOptions.outlineColor);
165
+ styleOptions.outlineColor = outlineColorTemp;
166
+ }
167
+ options.style = featureStyleCopy;
168
+ }
169
+ }
170
+ if (mapIndex) {
171
+ options.mapIndex = mapIndex;
172
+ }
173
+ if (clampToGround) {
174
+ options.clampToGround = true;
175
+ }
176
+ if (loadAll) {
177
+ options.loadAll = loadAll;
178
+ }
179
+ if (setViewToExisting) {
180
+ options.setViewToExisting = setViewToExisting;
181
+ }
182
+ options.pageCount = 0
183
+ return options;
184
+ },
185
+ /**
186
+ * rgba或者十六进制转换成cesium.color
187
+ * @param color
188
+ * @returns {*}
189
+ */
190
+ colorToCesiumColor(color) {
191
+ let cesiumColor;
192
+ if (color.includes('rgb')) {
193
+ // 如果是rgb或者rgba
194
+ const a = color.split('(')[1].split(')')[0];
195
+ const arr = a.split(',');
196
+ const cesiumRed = Number((Number(arr[0]) / 255).toFixed(2));
197
+ const cesiumGreen = Number((Number(arr[1]) / 255).toFixed(2));
198
+ const cesiumBlue = Number((Number(arr[2]) / 255).toFixed(2));
199
+ const cesiumAlpha = Number(arr[3] ? arr[3] : 1);
200
+ cesiumColor = this.webGlobe.getColor(
201
+ cesiumRed,
202
+ cesiumGreen,
203
+ cesiumBlue,
204
+ cesiumAlpha
205
+ )
206
+ } else if (color.indexOf('#') >= 0) {
207
+ cesiumColor = Cesium.Color.fromCssColorString(color);
208
+ }
209
+ return cesiumColor;
210
+ },
211
+ //该方法用于修改对象的key值
212
+ $_changeKey(oldFeatureStyle) {
213
+ let keyMap = {type: "type", parameters: "styleOptions"};
214
+ let newFeatureStyle = Object.keys(oldFeatureStyle).reduce((newData, key) => {
215
+ let newKey = keyMap[key] || key;
216
+ newData[newKey] = oldFeatureStyle[key];
217
+ return newData;
218
+ }, {});
219
+ return newFeatureStyle;
220
+ }
221
+ }
222
+ }
223
+ </script>
224
+
225
+ <style scoped>
226
+
227
+ </style>