@kq_npm/client3d_webgl_vue 4.5.54 → 4.5.56
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/airspacegridoccupancyquery/index.js +1876 -0
- package/airspacegridoccupancyquery/style/airspacegridoccupancyquery.css +1 -0
- package/airspacegridoccupancyquery/style/index.js +3 -0
- package/airspaceprofileanalysis/index.js +1778 -0
- package/airspaceprofileanalysis/style/airspaceprofileanalysis.css +1 -0
- package/airspaceprofileanalysis/style/index.js +3 -0
- package/buildpointmodel/index.js +111 -31
- package/clientPrint/index.js +22739 -119
- package/gpuspatialquery/index.js +69 -9
- package/gridoccupancyquery/index.js +561 -0
- package/gridoccupancyquery/style/gridoccupancyquery.css +1 -0
- package/gridoccupancyquery/style/index.js +3 -0
- package/index.js +22739 -119
- package/lowaltitudefeature/index.js +4854 -0
- package/lowaltitudefeature/style/index.js +3 -0
- package/lowaltitudefeature/style/lowaltitudefeature.css +1 -0
- package/modelprofileanalysis/index.js +1 -0
- package/modelselect/index.js +1 -0
- package/package.json +1 -1
- package/sceneapp/index.js +22739 -119
- package/sceneview/index.js +22739 -119
- package/sceneview/style/sceneview.css +1 -1
- package/style.css +1 -1
- package/toolbarapp/index.js +22739 -119
- package/toolboxapp/index.js +22739 -119
- package/videofusion/index.js +80 -51
- package/viewshedanalysis/index.js +3 -1
- package/webgl.es.js +755 -185
- package/windyslicing/index.js +25 -9
package/gpuspatialquery/index.js
CHANGED
|
@@ -393,6 +393,10 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
|
|
|
393
393
|
mapTarget: {
|
|
394
394
|
type: String
|
|
395
395
|
},
|
|
396
|
+
propertyName: {
|
|
397
|
+
type: String,
|
|
398
|
+
default: "id"
|
|
399
|
+
},
|
|
396
400
|
//图形
|
|
397
401
|
volumeType: {
|
|
398
402
|
type: Number,
|
|
@@ -510,6 +514,7 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
|
|
|
510
514
|
_gisUtils.utils.getWebMap(props.mapTarget, scenceView => {
|
|
511
515
|
if (scenceView) {
|
|
512
516
|
viewModel = new _GPUSpatialQueryViewModel.default(scenceView, {
|
|
517
|
+
propertyName: props.propertyName,
|
|
513
518
|
volumeType: formItem.volumeType,
|
|
514
519
|
positionMode: formItem.positionMode,
|
|
515
520
|
scale: formItem.scale,
|
|
@@ -1018,13 +1023,15 @@ class GPUSpatialQueryViewModel {
|
|
|
1018
1023
|
//绘制图形的坐标
|
|
1019
1024
|
this._options = null;
|
|
1020
1025
|
//传入参数
|
|
1021
|
-
this.finishedQuery = null;
|
|
1022
|
-
//绘制后的查询事件
|
|
1023
1026
|
this._language = {};
|
|
1027
|
+
this._propertyName = "id";
|
|
1028
|
+
// 模型属性匹配字段名称
|
|
1029
|
+
this._useDBId = true;
|
|
1024
1030
|
const {
|
|
1025
1031
|
locale
|
|
1026
1032
|
} = (0, _useGlobalConfig.useLocale)();
|
|
1027
1033
|
this._language = locale;
|
|
1034
|
+
if (options.propertyName) this._propertyName = options.propertyName;
|
|
1028
1035
|
options.viewer = scenceView._viewer;
|
|
1029
1036
|
options.viewer.scene.globe.depthTestAgainstTerrain = true;
|
|
1030
1037
|
options.viewer.scene.logarithmicDepthBuffer = true;
|
|
@@ -1033,7 +1040,8 @@ class GPUSpatialQueryViewModel {
|
|
|
1033
1040
|
this._gpuSpatialQuery = new Cesium.Kq3dSpatialQuery({
|
|
1034
1041
|
viewer: options.viewer
|
|
1035
1042
|
});
|
|
1036
|
-
this.
|
|
1043
|
+
this._gpuSpatialQuery.useDBId = this._useDBId;
|
|
1044
|
+
this._gpuSpatialQuery.keyPropertyName = this._propertyName;
|
|
1037
1045
|
this._drawManager = scenceView._drawManager;
|
|
1038
1046
|
var that = this;
|
|
1039
1047
|
this._gpuSpatialQuery.finishSQ.addEventListener(function () {
|
|
@@ -1048,13 +1056,14 @@ class GPUSpatialQueryViewModel {
|
|
|
1048
1056
|
if (content) {
|
|
1049
1057
|
for (let i = 0; i < content.featuresLength; i++) {
|
|
1050
1058
|
const feature = content.getFeature(i);
|
|
1059
|
+
const idname = feature.getProperty(that._propertyName);
|
|
1051
1060
|
let bFind = false;
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1061
|
+
let id = null;
|
|
1062
|
+
if (feature.pickId) id = feature.pickId.key;
|
|
1063
|
+
if (that._useDBId) id = idname;
|
|
1064
|
+
for (let j = 0; j < queryIds.length; j++) {
|
|
1065
|
+
if (queryIds[j] == id) {
|
|
1066
|
+
bFind = true;
|
|
1058
1067
|
}
|
|
1059
1068
|
}
|
|
1060
1069
|
if (bFind) {
|
|
@@ -1131,6 +1140,16 @@ class GPUSpatialQueryViewModel {
|
|
|
1131
1140
|
this.clear();
|
|
1132
1141
|
// this._gpuSpatialQuery && this._gpuSpatialQuery.destroy();
|
|
1133
1142
|
this._gpuSpatialQuery = null;
|
|
1143
|
+
// 清除所有3dtiles对象的监听事件
|
|
1144
|
+
const primitives = this._options.viewer.scene.primitives._primitives;
|
|
1145
|
+
for (let m = 0; m < primitives.length; m++) {
|
|
1146
|
+
if (primitives[m] instanceof Cesium.Cesium3DTileset) {
|
|
1147
|
+
if (primitives[m].tileVisibleRemoveCallback) {
|
|
1148
|
+
primitives[m].tileVisibleRemoveCallback();
|
|
1149
|
+
delete primitives[m].tileVisibleRemoveCallback;
|
|
1150
|
+
}
|
|
1151
|
+
}
|
|
1152
|
+
}
|
|
1134
1153
|
}
|
|
1135
1154
|
|
|
1136
1155
|
// 查找所有3dtiles模型对象
|
|
@@ -1140,6 +1159,47 @@ class GPUSpatialQueryViewModel {
|
|
|
1140
1159
|
for (let m = 0; m < primitives.length; m++) {
|
|
1141
1160
|
if (primitives[m] instanceof Cesium.Cesium3DTileset) {
|
|
1142
1161
|
this._options.layers.push(new Cesium.Kq3dLayerQuery(primitives[m]));
|
|
1162
|
+
if (!primitives[m].tileVisibleRemoveCallback) {
|
|
1163
|
+
primitives[m].tileVisibleRemoveCallback = primitives[m].tileVisible.addEventListener(this.tileVisibleListener, this);
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
1166
|
+
}
|
|
1167
|
+
}
|
|
1168
|
+
|
|
1169
|
+
// 3dtiles瓦片刷新时重新高亮模型
|
|
1170
|
+
tileVisibleListener(tile) {
|
|
1171
|
+
let tileset = tile.tileset;
|
|
1172
|
+
let content = tile.content;
|
|
1173
|
+
let queryIds;
|
|
1174
|
+
if (this._gpuSpatialQuery) {
|
|
1175
|
+
for (let c = 0; c < this._gpuSpatialQuery._layers.length; c++) {
|
|
1176
|
+
if (this._gpuSpatialQuery._layers[c].layer == tileset) {
|
|
1177
|
+
queryIds = this._gpuSpatialQuery._layers[c].sqResult;
|
|
1178
|
+
break;
|
|
1179
|
+
}
|
|
1180
|
+
}
|
|
1181
|
+
}
|
|
1182
|
+
if (queryIds && queryIds.length > 0) {
|
|
1183
|
+
for (let i = 0; i < content.featuresLength; i++) {
|
|
1184
|
+
let feature = content.getFeature(i);
|
|
1185
|
+
let idname = feature.getProperty(this._propertyName);
|
|
1186
|
+
let bFind = false;
|
|
1187
|
+
let id = null;
|
|
1188
|
+
if (feature.pickId) id = feature.pickId.key;
|
|
1189
|
+
let accId = id;
|
|
1190
|
+
if (this._useDBId) accId = idname;
|
|
1191
|
+
for (var j = 0; j < queryIds.length; j++) {
|
|
1192
|
+
if (queryIds[j] == accId) {
|
|
1193
|
+
bFind = true;
|
|
1194
|
+
}
|
|
1195
|
+
}
|
|
1196
|
+
if (bFind) feature.color = Cesium.Color.AQUA;else feature.color = Cesium.Color.WHITE;
|
|
1197
|
+
}
|
|
1198
|
+
tileset.makeStyleDirty();
|
|
1199
|
+
} else {
|
|
1200
|
+
for (let i = 0; i < content.featuresLength; i++) {
|
|
1201
|
+
let feature = content.getFeature(i);
|
|
1202
|
+
feature.color = Cesium.Color.WHITE;
|
|
1143
1203
|
}
|
|
1144
1204
|
}
|
|
1145
1205
|
}
|
|
@@ -0,0 +1,561 @@
|
|
|
1
|
+
(function webpackUniversalModuleDefinition(root, factory) {
|
|
2
|
+
if(typeof exports === 'object' && typeof module === 'object')
|
|
3
|
+
module.exports = factory(require("vue"), require("@kq_npm/client_common_vue/_utils/gis-utils"), require("@kq_npm/client_common_vue/init.js"), require("@kq_npm/client_common_vue/configprovider/useGlobalConfig"));
|
|
4
|
+
else if(typeof define === 'function' && define.amd)
|
|
5
|
+
define("@kq_npm/client3d_webgl_vue", ["vue", "@kq_npm/client_common_vue/_utils/gis-utils", "@kq_npm/client_common_vue/init.js", "@kq_npm/client_common_vue/configprovider/useGlobalConfig"], factory);
|
|
6
|
+
else if(typeof exports === 'object')
|
|
7
|
+
exports["@kq_npm/client3d_webgl_vue"] = factory(require("vue"), require("@kq_npm/client_common_vue/_utils/gis-utils"), require("@kq_npm/client_common_vue/init.js"), require("@kq_npm/client_common_vue/configprovider/useGlobalConfig"));
|
|
8
|
+
else
|
|
9
|
+
root["@kq_npm/client3d_webgl_vue"] = factory(root["Vue"], root["@kq_npm/client_common_vue/_utils/gis-utils"], root["@kq_npm/client_common_vue/init.js"], root["@kq_npm/client_common_vue/configprovider/useGlobalConfig"]);
|
|
10
|
+
})(this, function(__WEBPACK_EXTERNAL_MODULE__50154__, __WEBPACK_EXTERNAL_MODULE__20064__, __WEBPACK_EXTERNAL_MODULE__20455__, __WEBPACK_EXTERNAL_MODULE__22686__) {
|
|
11
|
+
return /******/ (function() { // webpackBootstrap
|
|
12
|
+
/******/ "use strict";
|
|
13
|
+
/******/ var __webpack_modules__ = ({
|
|
14
|
+
|
|
15
|
+
/***/ 20064:
|
|
16
|
+
/***/ (function(module) {
|
|
17
|
+
|
|
18
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__20064__;
|
|
19
|
+
|
|
20
|
+
/***/ }),
|
|
21
|
+
|
|
22
|
+
/***/ 20455:
|
|
23
|
+
/***/ (function(module) {
|
|
24
|
+
|
|
25
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__20455__;
|
|
26
|
+
|
|
27
|
+
/***/ }),
|
|
28
|
+
|
|
29
|
+
/***/ 21365:
|
|
30
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
31
|
+
|
|
32
|
+
// ESM COMPAT FLAG
|
|
33
|
+
__webpack_require__.r(__webpack_exports__);
|
|
34
|
+
|
|
35
|
+
// EXPORTS
|
|
36
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
37
|
+
__esModule: function() { return /* reexport */ GridOccupancyQueryvue_type_script_setup_true_lang_js/* __esModule */.B; },
|
|
38
|
+
"default": function() { return /* binding */ GridOccupancyQuery; }
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
// EXTERNAL MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-1.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/webgl/gridoccupancyquery/GridOccupancyQuery.vue?vue&type=script&setup=true&lang=js
|
|
42
|
+
var GridOccupancyQueryvue_type_script_setup_true_lang_js = __webpack_require__(41433);
|
|
43
|
+
;// ./src/webgl/gridoccupancyquery/GridOccupancyQuery.vue?vue&type=script&setup=true&lang=js
|
|
44
|
+
|
|
45
|
+
;// ./src/webgl/gridoccupancyquery/GridOccupancyQuery.vue
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
const __exports__ = GridOccupancyQueryvue_type_script_setup_true_lang_js/* default */.A;
|
|
50
|
+
|
|
51
|
+
/* harmony default export */ var GridOccupancyQuery = (__exports__);
|
|
52
|
+
|
|
53
|
+
/***/ }),
|
|
54
|
+
|
|
55
|
+
/***/ 22686:
|
|
56
|
+
/***/ (function(module) {
|
|
57
|
+
|
|
58
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__22686__;
|
|
59
|
+
|
|
60
|
+
/***/ }),
|
|
61
|
+
|
|
62
|
+
/***/ 33751:
|
|
63
|
+
/***/ (function(module) {
|
|
64
|
+
|
|
65
|
+
module.exports = require("@babel/runtime/helpers/interopRequireDefault");
|
|
66
|
+
|
|
67
|
+
/***/ }),
|
|
68
|
+
|
|
69
|
+
/***/ 41433:
|
|
70
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
var _interopRequireDefault = __webpack_require__(33751);
|
|
75
|
+
Object.defineProperty(exports, "B", ({
|
|
76
|
+
value: true
|
|
77
|
+
}));
|
|
78
|
+
exports.A = void 0;
|
|
79
|
+
var _vue = __webpack_require__(50154);
|
|
80
|
+
var _client_icons_vue = __webpack_require__(65698);
|
|
81
|
+
var _gisUtils = __webpack_require__(20064);
|
|
82
|
+
var _GridOccupancyQueryViewModel = _interopRequireDefault(__webpack_require__(65588));
|
|
83
|
+
var _useGlobalConfig = __webpack_require__(22686);
|
|
84
|
+
const __default__ = {
|
|
85
|
+
name: "Kq3dGridOccupancyQuery"
|
|
86
|
+
};
|
|
87
|
+
var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
|
|
88
|
+
props: {
|
|
89
|
+
mapTarget: String,
|
|
90
|
+
settingParams: {
|
|
91
|
+
type: Object,
|
|
92
|
+
default: () => ({})
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
setup(__props, {
|
|
96
|
+
expose: __expose
|
|
97
|
+
}) {
|
|
98
|
+
const {
|
|
99
|
+
locale
|
|
100
|
+
} = (0, _useGlobalConfig.useLocale)();
|
|
101
|
+
const props = __props;
|
|
102
|
+
let viewModel = null;
|
|
103
|
+
(0, _vue.onMounted)(() => {
|
|
104
|
+
_gisUtils.utils.getWebMap(props.mapTarget, scenceView => {
|
|
105
|
+
if (scenceView) {
|
|
106
|
+
viewModel = new _GridOccupancyQueryViewModel.default(scenceView, {
|
|
107
|
+
queryUrl: props?.settingParams.queryUrl ?? "",
|
|
108
|
+
calcLevel: props?.settingParams.calcLevel ?? 23,
|
|
109
|
+
isMulti: props?.settingParams.isMulti ?? false
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
});
|
|
114
|
+
function startQuery() {
|
|
115
|
+
viewModel && viewModel.start();
|
|
116
|
+
}
|
|
117
|
+
(0, _vue.onBeforeUnmount)(() => {
|
|
118
|
+
viewModel && viewModel.destroy();
|
|
119
|
+
});
|
|
120
|
+
__expose({
|
|
121
|
+
startQuery
|
|
122
|
+
});
|
|
123
|
+
return (_ctx, _cache) => {
|
|
124
|
+
const _component_kq_icon = (0, _vue.resolveComponent)("kq-icon");
|
|
125
|
+
const _component_kq_button = (0, _vue.resolveComponent)("kq-button");
|
|
126
|
+
return (0, _vue.openBlock)(), (0, _vue.createBlock)(_component_kq_button, {
|
|
127
|
+
title: (0, _vue.unref)(locale).webgl.gridOccupancyQuery,
|
|
128
|
+
onClick: startQuery,
|
|
129
|
+
style: {
|
|
130
|
+
"width": "32px"
|
|
131
|
+
}
|
|
132
|
+
}, {
|
|
133
|
+
default: (0, _vue.withCtx)(() => [(0, _vue.createVNode)(_component_kq_icon, {
|
|
134
|
+
size: 16
|
|
135
|
+
}, {
|
|
136
|
+
default: (0, _vue.withCtx)(() => [(0, _vue.createVNode)((0, _vue.unref)(_client_icons_vue.IconGridCode))]),
|
|
137
|
+
_: 1 /* STABLE */
|
|
138
|
+
})]),
|
|
139
|
+
_: 1 /* STABLE */
|
|
140
|
+
}, 8 /* PROPS */, ["title"]);
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
/***/ }),
|
|
146
|
+
|
|
147
|
+
/***/ 50154:
|
|
148
|
+
/***/ (function(module) {
|
|
149
|
+
|
|
150
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__50154__;
|
|
151
|
+
|
|
152
|
+
/***/ }),
|
|
153
|
+
|
|
154
|
+
/***/ 56363:
|
|
155
|
+
/***/ (function(module) {
|
|
156
|
+
|
|
157
|
+
module.exports = require("element-plus/dist/index.full.js");
|
|
158
|
+
|
|
159
|
+
/***/ }),
|
|
160
|
+
|
|
161
|
+
/***/ 65588:
|
|
162
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
var _interopRequireDefault = __webpack_require__(33751);
|
|
167
|
+
Object.defineProperty(exports, "__esModule", ({
|
|
168
|
+
value: true
|
|
169
|
+
}));
|
|
170
|
+
exports["default"] = void 0;
|
|
171
|
+
var _message = _interopRequireDefault(__webpack_require__(71323));
|
|
172
|
+
var _loading = _interopRequireDefault(__webpack_require__(90724));
|
|
173
|
+
var _useGlobalConfig = __webpack_require__(22686);
|
|
174
|
+
class GridOccupancyQueryViewModel {
|
|
175
|
+
constructor(scenceView, options) {
|
|
176
|
+
this._viewer = null;
|
|
177
|
+
this._mapTarget = null;
|
|
178
|
+
this._options = {};
|
|
179
|
+
this._defaultOptions = {
|
|
180
|
+
queryUrl: "",
|
|
181
|
+
calcLevel: 23,
|
|
182
|
+
isMulti: false
|
|
183
|
+
};
|
|
184
|
+
this._drawManager = null;
|
|
185
|
+
this._language = null;
|
|
186
|
+
this._htmlTag = null;
|
|
187
|
+
this._clickGirdPrimitive = null;
|
|
188
|
+
this._loading = null;
|
|
189
|
+
const {
|
|
190
|
+
locale
|
|
191
|
+
} = (0, _useGlobalConfig.useLocale)();
|
|
192
|
+
this._language = locale;
|
|
193
|
+
this._options = Object.assign({}, this._defaultOptions, options);
|
|
194
|
+
this._viewer = scenceView._viewer;
|
|
195
|
+
this._drawManager = scenceView._drawManager;
|
|
196
|
+
this._mapTarget = scenceView._viewerId || null;
|
|
197
|
+
this._viewer.resolutionScale = 1;
|
|
198
|
+
this._viewer.postProcessStages.fxaa.enabled = true;
|
|
199
|
+
this._viewer.scene.logarithmicDepthBuffer = true;
|
|
200
|
+
}
|
|
201
|
+
start() {
|
|
202
|
+
const that = this;
|
|
203
|
+
const queryUrl = this._options.queryUrl || "";
|
|
204
|
+
if (!queryUrl.trim()) {
|
|
205
|
+
(0, _message.default)({
|
|
206
|
+
message: that._language.value.webgl["gridOccupancyQueryUrlEmpty"] || "请配置查询服务地址",
|
|
207
|
+
type: "warning"
|
|
208
|
+
});
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
211
|
+
this.removeData();
|
|
212
|
+
if (!this._drawManager) return;
|
|
213
|
+
this._drawManager.startDraw("marker", {
|
|
214
|
+
image: null
|
|
215
|
+
}, (feature, {
|
|
216
|
+
shape
|
|
217
|
+
}) => {
|
|
218
|
+
if (!shape || !shape.groupName || shape.groupName !== "GridOccupancyQueryDraw") return;
|
|
219
|
+
that.showGridOccupancyQuery(shape._position);
|
|
220
|
+
that._drawManager.clearDrawGroup("GridOccupancyQueryDraw");
|
|
221
|
+
}, "GridOccupancyQueryDraw", that._options.isMulti);
|
|
222
|
+
}
|
|
223
|
+
showGridOccupancyQuery(position) {
|
|
224
|
+
this.removeData();
|
|
225
|
+
const that = this;
|
|
226
|
+
const queryUrl = this._options.queryUrl || "";
|
|
227
|
+
const level = this._options.calcLevel || 23;
|
|
228
|
+
const cartographic = Cesium.Cartographic.fromCartesian(position);
|
|
229
|
+
const lon = Cesium.Math.toDegrees(cartographic.longitude);
|
|
230
|
+
const lat = Cesium.Math.toDegrees(cartographic.latitude);
|
|
231
|
+
const height = cartographic.height;
|
|
232
|
+
const url = `${queryUrl}/airspaceOccupyPosition?lon=${lon}&lat=${lat}&height=${height}&level=${level}`;
|
|
233
|
+
this._showLoading();
|
|
234
|
+
fetch(url, {
|
|
235
|
+
method: "POST"
|
|
236
|
+
}).then(response => {
|
|
237
|
+
if (!response.ok) throw new Error("Network response was not ok");
|
|
238
|
+
return response.json();
|
|
239
|
+
}).then(data => {
|
|
240
|
+
if (data.code === 200 && data.content && data.content.code) {
|
|
241
|
+
const instanc = that.getGridInstanc(data.content.code);
|
|
242
|
+
if (instanc) {
|
|
243
|
+
that.renderGrid(instanc, data.content, position);
|
|
244
|
+
that._hideLoading();
|
|
245
|
+
return;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
that._hideLoading();
|
|
249
|
+
}).catch(error => {
|
|
250
|
+
that._hideLoading();
|
|
251
|
+
console.error("Grid occupancy query error:", error);
|
|
252
|
+
(0, _message.default)({
|
|
253
|
+
message: that._language.value.webgl["gridOccupancyQueryFailed"] || "查询失败",
|
|
254
|
+
type: "error"
|
|
255
|
+
});
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
renderGrid(instanc, content, position) {
|
|
259
|
+
const that = this;
|
|
260
|
+
if (that._clickGirdPrimitive) {
|
|
261
|
+
that._clickGirdPrimitive.geometryInstances = instanc;
|
|
262
|
+
that._clickGirdPrimitive._state = Cesium.PrimitiveState.READY;
|
|
263
|
+
that._clickGirdPrimitive.updateVertex = true;
|
|
264
|
+
} else {
|
|
265
|
+
that._clickGirdPrimitive = that._viewer.scene.primitives.add(new Cesium.Primitive({
|
|
266
|
+
geometryInstances: instanc,
|
|
267
|
+
appearance: new Cesium.MaterialAppearance({
|
|
268
|
+
flat: true,
|
|
269
|
+
translucent: false,
|
|
270
|
+
material: new Cesium.Material({
|
|
271
|
+
fabric: {
|
|
272
|
+
type: "Color",
|
|
273
|
+
uniforms: {
|
|
274
|
+
color: Cesium.Color.RED.withAlpha(0.3)
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
}),
|
|
278
|
+
renderState: {
|
|
279
|
+
depthTest: {
|
|
280
|
+
enabled: true
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
}),
|
|
284
|
+
cull: false,
|
|
285
|
+
asynchronous: false
|
|
286
|
+
}));
|
|
287
|
+
}
|
|
288
|
+
const code = content.code || "";
|
|
289
|
+
const gridcode = code.substring(0, (code.length + 1) / 2);
|
|
290
|
+
const type = (content.types || []).map(item => item.description).join(",");
|
|
291
|
+
that._htmlTag = new Cesium.Kq3dDragableHtmlTag(that._viewer, {
|
|
292
|
+
showLine: true,
|
|
293
|
+
lineStyle: "solid",
|
|
294
|
+
lineWidth: 2,
|
|
295
|
+
lineColor: Cesium.Color.DARKCYAN,
|
|
296
|
+
position: position,
|
|
297
|
+
panelOffset: [20, 20],
|
|
298
|
+
html: `<div class='grid_info'>
|
|
299
|
+
<span id='grid_info_close' class='close'>×</span>
|
|
300
|
+
<div class='title'>${that._language.value.webgl["gridOccupancyQuery"]}</div>
|
|
301
|
+
<div class='attr'>${that._language.value.common["gridCode"]}: ${gridcode}</div>
|
|
302
|
+
<div class='attr'>${that._language.value.webgl["occupancyType"]}: ${type}</div>
|
|
303
|
+
</div>`
|
|
304
|
+
});
|
|
305
|
+
setTimeout(() => {
|
|
306
|
+
const close = document.querySelector("#grid_info_close");
|
|
307
|
+
if (close) {
|
|
308
|
+
close.addEventListener("click", function () {
|
|
309
|
+
that.clear();
|
|
310
|
+
});
|
|
311
|
+
}
|
|
312
|
+
}, 500);
|
|
313
|
+
}
|
|
314
|
+
getGridInstanc(code) {
|
|
315
|
+
const index = (code.length + 1) / 2;
|
|
316
|
+
const grid = Module.decodeGeoSotGBCodeToBox(code.substring(0, index), code.substring(index));
|
|
317
|
+
if (!grid) return null;
|
|
318
|
+
grid.minx = Math.max(grid.minx, -180);
|
|
319
|
+
grid.maxx = Math.min(grid.maxx, 180);
|
|
320
|
+
grid.miny = Math.max(grid.miny, -90);
|
|
321
|
+
grid.maxy = Math.min(grid.maxy, 90);
|
|
322
|
+
const minLon = Math.min(grid.minx, grid.maxx);
|
|
323
|
+
const minLat = Math.min(grid.miny, grid.maxy);
|
|
324
|
+
const maxLon = Math.max(grid.minx, grid.maxx);
|
|
325
|
+
const maxLat = Math.max(grid.miny, grid.maxy);
|
|
326
|
+
const rectangle = new Cesium.RectangleGeometry({
|
|
327
|
+
ellipsoid: Cesium.Ellipsoid.WGS84,
|
|
328
|
+
rectangle: Cesium.Rectangle.fromDegrees(minLon, minLat, maxLon, maxLat),
|
|
329
|
+
height: grid.minz,
|
|
330
|
+
extrudedHeight: grid.maxz
|
|
331
|
+
});
|
|
332
|
+
return new Cesium.GeometryInstance({
|
|
333
|
+
geometry: rectangle
|
|
334
|
+
});
|
|
335
|
+
}
|
|
336
|
+
_showLoading() {
|
|
337
|
+
this._loading = _loading.default.service({
|
|
338
|
+
lock: true,
|
|
339
|
+
text: "Loading",
|
|
340
|
+
background: "rgba(0, 0, 0, 0.7)",
|
|
341
|
+
target: this._mapTarget ? document.getElementById(this._mapTarget) : null
|
|
342
|
+
});
|
|
343
|
+
}
|
|
344
|
+
_hideLoading() {
|
|
345
|
+
if (this._loading) {
|
|
346
|
+
this._loading.close();
|
|
347
|
+
this._loading = null;
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
removeData() {
|
|
351
|
+
if (this._htmlTag) {
|
|
352
|
+
this._htmlTag.destroy();
|
|
353
|
+
this._htmlTag = null;
|
|
354
|
+
}
|
|
355
|
+
if (this._clickGirdPrimitive) {
|
|
356
|
+
this._clickGirdPrimitive.geometryInstances = [];
|
|
357
|
+
this._clickGirdPrimitive._state = Cesium.PrimitiveState.READY;
|
|
358
|
+
this._clickGirdPrimitive.updateVertex = true;
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
clear() {
|
|
362
|
+
this.removeData();
|
|
363
|
+
this._hideLoading();
|
|
364
|
+
this._drawManager?.stopDraw();
|
|
365
|
+
this._drawManager?.clearDrawGroup("GridOccupancyQueryDraw");
|
|
366
|
+
}
|
|
367
|
+
destroy() {
|
|
368
|
+
this.clear();
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
exports["default"] = GridOccupancyQueryViewModel;
|
|
372
|
+
|
|
373
|
+
/***/ }),
|
|
374
|
+
|
|
375
|
+
/***/ 65698:
|
|
376
|
+
/***/ (function(module) {
|
|
377
|
+
|
|
378
|
+
module.exports = require("@kq_npm/client_icons_vue");
|
|
379
|
+
|
|
380
|
+
/***/ }),
|
|
381
|
+
|
|
382
|
+
/***/ 71323:
|
|
383
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
384
|
+
|
|
385
|
+
|
|
386
|
+
|
|
387
|
+
var _interopRequireDefault = __webpack_require__(33751);
|
|
388
|
+
Object.defineProperty(exports, "__esModule", ({
|
|
389
|
+
value: true
|
|
390
|
+
}));
|
|
391
|
+
exports["default"] = void 0;
|
|
392
|
+
var _indexFull = __webpack_require__(56363);
|
|
393
|
+
var _KqGIS = __webpack_require__(99602);
|
|
394
|
+
var _init = _interopRequireDefault(__webpack_require__(20455));
|
|
395
|
+
/*
|
|
396
|
+
* Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
|
|
397
|
+
* All rights reserved.
|
|
398
|
+
*/
|
|
399
|
+
|
|
400
|
+
_indexFull.ElMessage.install = (Vue, opts) => {
|
|
401
|
+
(0, _init.default)(Vue, opts);
|
|
402
|
+
Vue.component("KqMessage", _indexFull.ElMessage);
|
|
403
|
+
};
|
|
404
|
+
var _default = exports["default"] = _indexFull.ElMessage;
|
|
405
|
+
_KqGIS.kq_npm_client_common_vue.KqMessage = _indexFull.ElMessage;
|
|
406
|
+
|
|
407
|
+
/***/ }),
|
|
408
|
+
|
|
409
|
+
/***/ 90724:
|
|
410
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
411
|
+
|
|
412
|
+
|
|
413
|
+
|
|
414
|
+
var _interopRequireDefault = __webpack_require__(33751);
|
|
415
|
+
Object.defineProperty(exports, "__esModule", ({
|
|
416
|
+
value: true
|
|
417
|
+
}));
|
|
418
|
+
exports["default"] = void 0;
|
|
419
|
+
var _indexFull = __webpack_require__(56363);
|
|
420
|
+
var _init = _interopRequireDefault(__webpack_require__(20455));
|
|
421
|
+
var _KqGIS = __webpack_require__(99602);
|
|
422
|
+
/*
|
|
423
|
+
* Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
|
|
424
|
+
* All rights reserved.
|
|
425
|
+
*/
|
|
426
|
+
|
|
427
|
+
_indexFull.ElLoading.install = (Vue, opts) => {
|
|
428
|
+
(0, _init.default)(Vue, opts);
|
|
429
|
+
Vue.component("KqLoading", _indexFull.ElLoading);
|
|
430
|
+
Vue.directive("loading", _indexFull.ElLoading.directive);
|
|
431
|
+
};
|
|
432
|
+
var _default = exports["default"] = _indexFull.ElLoading;
|
|
433
|
+
_KqGIS.kq_npm_client_common_vue.KqLoading = _indexFull.ElLoading;
|
|
434
|
+
|
|
435
|
+
/***/ }),
|
|
436
|
+
|
|
437
|
+
/***/ 99602:
|
|
438
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
439
|
+
|
|
440
|
+
|
|
441
|
+
|
|
442
|
+
Object.defineProperty(exports, "__esModule", ({
|
|
443
|
+
value: true
|
|
444
|
+
}));
|
|
445
|
+
exports.kq_npm_client_leaflet_vue = exports.kq_npm_client_common_vue = exports.kq_npm_client3d_webgl_vue = void 0;
|
|
446
|
+
let kq_npm_client_common_vue = exports.kq_npm_client_common_vue = window.kq_npm_client_common_vue = window.kq_npm_client_common_vue || {};
|
|
447
|
+
__webpack_require__.g.kq_npm_client_common_vue = kq_npm_client_common_vue;
|
|
448
|
+
let kq_npm_client_leaflet_vue = exports.kq_npm_client_leaflet_vue = window.kq_npm_client_leaflet_vue = window.kq_npm_client_leaflet_vue || {};
|
|
449
|
+
__webpack_require__.g.kq_npm_client_leaflet_vue = kq_npm_client_leaflet_vue;
|
|
450
|
+
let kq_npm_client3d_webgl_vue = exports.kq_npm_client3d_webgl_vue = window.kq_npm_client3d_webgl_vue = window.kq_npm_client3d_webgl_vue || {};
|
|
451
|
+
__webpack_require__.g.kq_npm_client3d_webgl_vue = kq_npm_client3d_webgl_vue;
|
|
452
|
+
|
|
453
|
+
/***/ })
|
|
454
|
+
|
|
455
|
+
/******/ });
|
|
456
|
+
/************************************************************************/
|
|
457
|
+
/******/ // The module cache
|
|
458
|
+
/******/ var __webpack_module_cache__ = {};
|
|
459
|
+
/******/
|
|
460
|
+
/******/ // The require function
|
|
461
|
+
/******/ function __webpack_require__(moduleId) {
|
|
462
|
+
/******/ // Check if module is in cache
|
|
463
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
464
|
+
/******/ if (cachedModule !== undefined) {
|
|
465
|
+
/******/ return cachedModule.exports;
|
|
466
|
+
/******/ }
|
|
467
|
+
/******/ // Create a new module (and put it into the cache)
|
|
468
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
469
|
+
/******/ // no module.id needed
|
|
470
|
+
/******/ // no module.loaded needed
|
|
471
|
+
/******/ exports: {}
|
|
472
|
+
/******/ };
|
|
473
|
+
/******/
|
|
474
|
+
/******/ // Execute the module function
|
|
475
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
476
|
+
/******/
|
|
477
|
+
/******/ // Return the exports of the module
|
|
478
|
+
/******/ return module.exports;
|
|
479
|
+
/******/ }
|
|
480
|
+
/******/
|
|
481
|
+
/************************************************************************/
|
|
482
|
+
/******/ /* webpack/runtime/define property getters */
|
|
483
|
+
/******/ !function() {
|
|
484
|
+
/******/ // define getter functions for harmony exports
|
|
485
|
+
/******/ __webpack_require__.d = function(exports, definition) {
|
|
486
|
+
/******/ for(var key in definition) {
|
|
487
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
488
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
489
|
+
/******/ }
|
|
490
|
+
/******/ }
|
|
491
|
+
/******/ };
|
|
492
|
+
/******/ }();
|
|
493
|
+
/******/
|
|
494
|
+
/******/ /* webpack/runtime/global */
|
|
495
|
+
/******/ !function() {
|
|
496
|
+
/******/ __webpack_require__.g = (function() {
|
|
497
|
+
/******/ if (typeof globalThis === 'object') return globalThis;
|
|
498
|
+
/******/ try {
|
|
499
|
+
/******/ return this || new Function('return this')();
|
|
500
|
+
/******/ } catch (e) {
|
|
501
|
+
/******/ if (typeof window === 'object') return window;
|
|
502
|
+
/******/ }
|
|
503
|
+
/******/ })();
|
|
504
|
+
/******/ }();
|
|
505
|
+
/******/
|
|
506
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
507
|
+
/******/ !function() {
|
|
508
|
+
/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
|
|
509
|
+
/******/ }();
|
|
510
|
+
/******/
|
|
511
|
+
/******/ /* webpack/runtime/make namespace object */
|
|
512
|
+
/******/ !function() {
|
|
513
|
+
/******/ // define __esModule on exports
|
|
514
|
+
/******/ __webpack_require__.r = function(exports) {
|
|
515
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
516
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
517
|
+
/******/ }
|
|
518
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
519
|
+
/******/ };
|
|
520
|
+
/******/ }();
|
|
521
|
+
/******/
|
|
522
|
+
/************************************************************************/
|
|
523
|
+
var __webpack_exports__ = {};
|
|
524
|
+
// This entry needs to be wrapped in an IIFE because it uses a non-standard name for the exports (exports).
|
|
525
|
+
!function() {
|
|
526
|
+
var exports = __webpack_exports__;
|
|
527
|
+
|
|
528
|
+
|
|
529
|
+
var _interopRequireDefault = __webpack_require__(33751);
|
|
530
|
+
Object.defineProperty(exports, "__esModule", ({
|
|
531
|
+
value: true
|
|
532
|
+
}));
|
|
533
|
+
Object.defineProperty(exports, "GridOccupancyQueryViewModel", ({
|
|
534
|
+
enumerable: true,
|
|
535
|
+
get: function () {
|
|
536
|
+
return _GridOccupancyQueryViewModel.default;
|
|
537
|
+
}
|
|
538
|
+
}));
|
|
539
|
+
Object.defineProperty(exports, "default", ({
|
|
540
|
+
enumerable: true,
|
|
541
|
+
get: function () {
|
|
542
|
+
return _GridOccupancyQuery.default;
|
|
543
|
+
}
|
|
544
|
+
}));
|
|
545
|
+
var _GridOccupancyQuery = _interopRequireDefault(__webpack_require__(21365));
|
|
546
|
+
var _GridOccupancyQueryViewModel = _interopRequireDefault(__webpack_require__(65588));
|
|
547
|
+
var _init = _interopRequireDefault(__webpack_require__(20455));
|
|
548
|
+
/*
|
|
549
|
+
* Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
|
|
550
|
+
* All rights reserved.
|
|
551
|
+
*/
|
|
552
|
+
|
|
553
|
+
_GridOccupancyQuery.default.install = (Vue, opts) => {
|
|
554
|
+
(0, _init.default)(Vue, opts);
|
|
555
|
+
Vue.component(_GridOccupancyQuery.default.name, _GridOccupancyQuery.default);
|
|
556
|
+
};
|
|
557
|
+
}();
|
|
558
|
+
/******/ return __webpack_exports__;
|
|
559
|
+
/******/ })()
|
|
560
|
+
;
|
|
561
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.grid_info{width:325px;border:1px solid var(--kq-border-color-lighter);border-radius:5px;cursor:default;background-color:var(--kq-bg-color)}.grid_info .close{position:absolute;top:0;right:5px;font-size:var(--kq-font-size-extra-large);cursor:pointer}.grid_info .title{font-size:var(--kq-font-size-medium);font-weight:bolder;border-bottom:1px solid var(--kq-border-color-lighter)}.grid_info .attr,.grid_info .title{padding:5px 10px;background-color:var(--kq-bg-color)}.grid_info .attr{font-size:var(--kq-font-size-base)}
|