@kq_npm/client3d_webgl_vue 0.4.1-beta → 0.4.3-beta
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/compass/index.js +243 -0
- package/fixedzoom/index.js +262 -0
- package/index.js +433 -224
- package/package.json +1 -1
- package/resetview/index.js +196 -0
- package/roller/style/roller.css +1 -1
- package/scenceview/index.js +2 -262
- package/style.css +1 -1
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@kq_npm/client3d_webgl_vue","description":"KQGIS Client3D for Vue.js","version":"0.4.
|
|
1
|
+
{"name":"@kq_npm/client3d_webgl_vue","description":"KQGIS Client3D for Vue.js","version":"0.4.3-beta","homepage":"","keywords":["KQGIS","webGL","Vue"],"browserslist":["> 1%","last 2 versions","not dead","not ie 11"],"author":"KQWEB GROUP","license":"Apache-2.0","dependencies":{"colorcolor":"^1.1.1","echarts":"^5.3.3","js-cookie":"^3.0.1","omit.js":"^2.0.2","save":"^2.5.0","tinycolor2":"^1.4.2","vue-i18n":"^9.2.0-beta.36","xlsx":"^0.18.5","@turf/turf":"^6.5.0","css-vars-ponyfill":"^2.4.8","xe-utils":"^3.5.4"}}
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
/******/ (function() { // webpackBootstrap
|
|
2
|
+
/******/ "use strict";
|
|
3
|
+
/******/ // The require scope
|
|
4
|
+
/******/ var __webpack_require__ = {};
|
|
5
|
+
/******/
|
|
6
|
+
/************************************************************************/
|
|
7
|
+
/******/ /* webpack/runtime/compat get default export */
|
|
8
|
+
/******/ !function() {
|
|
9
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
10
|
+
/******/ __webpack_require__.n = function(module) {
|
|
11
|
+
/******/ var getter = module && module.__esModule ?
|
|
12
|
+
/******/ function() { return module['default']; } :
|
|
13
|
+
/******/ function() { return module; };
|
|
14
|
+
/******/ __webpack_require__.d(getter, { a: getter });
|
|
15
|
+
/******/ return getter;
|
|
16
|
+
/******/ };
|
|
17
|
+
/******/ }();
|
|
18
|
+
/******/
|
|
19
|
+
/******/ /* webpack/runtime/define property getters */
|
|
20
|
+
/******/ !function() {
|
|
21
|
+
/******/ // define getter functions for harmony exports
|
|
22
|
+
/******/ __webpack_require__.d = function(exports, definition) {
|
|
23
|
+
/******/ for(var key in definition) {
|
|
24
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
25
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
26
|
+
/******/ }
|
|
27
|
+
/******/ }
|
|
28
|
+
/******/ };
|
|
29
|
+
/******/ }();
|
|
30
|
+
/******/
|
|
31
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
32
|
+
/******/ !function() {
|
|
33
|
+
/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
|
|
34
|
+
/******/ }();
|
|
35
|
+
/******/
|
|
36
|
+
/******/ /* webpack/runtime/make namespace object */
|
|
37
|
+
/******/ !function() {
|
|
38
|
+
/******/ // define __esModule on exports
|
|
39
|
+
/******/ __webpack_require__.r = function(exports) {
|
|
40
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
41
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
42
|
+
/******/ }
|
|
43
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
44
|
+
/******/ };
|
|
45
|
+
/******/ }();
|
|
46
|
+
/******/
|
|
47
|
+
/************************************************************************/
|
|
48
|
+
var __webpack_exports__ = {};
|
|
49
|
+
// ESM COMPAT FLAG
|
|
50
|
+
__webpack_require__.r(__webpack_exports__);
|
|
51
|
+
|
|
52
|
+
// EXPORTS
|
|
53
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
54
|
+
"ResetViewViewModel": function() { return /* reexport */ ResetViewViewModel; },
|
|
55
|
+
"default": function() { return /* reexport */ ResetView; }
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
;// CONCATENATED MODULE: external {"root":"Vue","commonjs":"vue","commonjs2":"vue","amd":"vue"}
|
|
59
|
+
var external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject = require("vue");
|
|
60
|
+
;// CONCATENATED MODULE: external "@element-plus/icons-vue"
|
|
61
|
+
var icons_vue_namespaceObject = require("@element-plus/icons-vue");
|
|
62
|
+
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
|
63
|
+
function _defineProperty(obj, key, value) {
|
|
64
|
+
if (key in obj) {
|
|
65
|
+
Object.defineProperty(obj, key, {
|
|
66
|
+
value: value,
|
|
67
|
+
enumerable: true,
|
|
68
|
+
configurable: true,
|
|
69
|
+
writable: true
|
|
70
|
+
});
|
|
71
|
+
} else {
|
|
72
|
+
obj[key] = value;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
return obj;
|
|
76
|
+
}
|
|
77
|
+
;// CONCATENATED MODULE: ./src/webgl/resetview/ResetViewViewModel.js
|
|
78
|
+
|
|
79
|
+
// 重置视图
|
|
80
|
+
class ResetViewViewModel {
|
|
81
|
+
constructor(viewer) {
|
|
82
|
+
_defineProperty(this, "_viewer", null);
|
|
83
|
+
|
|
84
|
+
this._viewer = viewer;
|
|
85
|
+
} //重置视角
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
resetView() {
|
|
89
|
+
this._viewer.camera.flyHome(1);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
}
|
|
93
|
+
;// CONCATENATED MODULE: external "@kq_npm/client_common_vue/_utils/gis-utils"
|
|
94
|
+
var gis_utils_namespaceObject = require("@kq_npm/client_common_vue/_utils/gis-utils");
|
|
95
|
+
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/dist/index.js??ruleSet[0]!./src/webgl/resetview/ResetView.vue?vue&type=script&setup=true&lang=js
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
// 获取组件传参
|
|
101
|
+
|
|
102
|
+
const __default__ = {
|
|
103
|
+
name: "Kq3dResetView"
|
|
104
|
+
};
|
|
105
|
+
/* harmony default export */ var ResetViewvue_type_script_setup_true_lang_js = (/*#__PURE__*/Object.assign(__default__, {
|
|
106
|
+
props: {
|
|
107
|
+
mapTarget: String,
|
|
108
|
+
// 按钮图标大小
|
|
109
|
+
iconSize: {
|
|
110
|
+
type: Number,
|
|
111
|
+
default: 16
|
|
112
|
+
},
|
|
113
|
+
// 按钮大小
|
|
114
|
+
buttonSize: {
|
|
115
|
+
type: String,
|
|
116
|
+
default: "32px"
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
|
|
120
|
+
setup(__props) {
|
|
121
|
+
const props = __props;
|
|
122
|
+
let language = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.ref)({});
|
|
123
|
+
let viewModel = null;
|
|
124
|
+
let btn = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.ref)(null);
|
|
125
|
+
(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.onMounted)(() => {
|
|
126
|
+
gis_utils_namespaceObject.utils.getWebMap(null, scenceView => {
|
|
127
|
+
if (scenceView) {
|
|
128
|
+
language.value = scenceView._language;
|
|
129
|
+
viewModel = new ResetViewViewModel(scenceView._viewer);
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
}); // 按钮点击事件
|
|
133
|
+
|
|
134
|
+
function btnClick(e) {
|
|
135
|
+
btn.value.$el.blur();
|
|
136
|
+
viewModel && viewModel.resetView();
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
return (_ctx, _cache) => {
|
|
140
|
+
const _component_kq_icon = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.resolveComponent)("kq-icon");
|
|
141
|
+
|
|
142
|
+
const _component_kq_button = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.resolveComponent)("kq-button");
|
|
143
|
+
|
|
144
|
+
return (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createBlock)(_component_kq_button, {
|
|
145
|
+
ref_key: "btn",
|
|
146
|
+
ref: btn,
|
|
147
|
+
onClick: btnClick,
|
|
148
|
+
title: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(language).resetView,
|
|
149
|
+
style: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.normalizeStyle)('width:' + __props.buttonSize)
|
|
150
|
+
}, {
|
|
151
|
+
default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)(_component_kq_icon, {
|
|
152
|
+
size: __props.iconSize
|
|
153
|
+
}, {
|
|
154
|
+
default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(icons_vue_namespaceObject.RefreshLeft))]),
|
|
155
|
+
_: 1
|
|
156
|
+
/* STABLE */
|
|
157
|
+
|
|
158
|
+
}, 8
|
|
159
|
+
/* PROPS */
|
|
160
|
+
, ["size"])]),
|
|
161
|
+
_: 1
|
|
162
|
+
/* STABLE */
|
|
163
|
+
|
|
164
|
+
}, 8
|
|
165
|
+
/* PROPS */
|
|
166
|
+
, ["title", "style"]);
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
}));
|
|
171
|
+
;// CONCATENATED MODULE: ./src/webgl/resetview/ResetView.vue?vue&type=script&setup=true&lang=js
|
|
172
|
+
|
|
173
|
+
;// CONCATENATED MODULE: ./src/webgl/resetview/ResetView.vue
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
const __exports__ = ResetViewvue_type_script_setup_true_lang_js;
|
|
178
|
+
|
|
179
|
+
/* harmony default export */ var ResetView = (__exports__);
|
|
180
|
+
;// CONCATENATED MODULE: external "@kq_npm/client_common_vue/init.js"
|
|
181
|
+
var init_js_namespaceObject = require("@kq_npm/client_common_vue/init.js");
|
|
182
|
+
var init_js_default = /*#__PURE__*/__webpack_require__.n(init_js_namespaceObject);
|
|
183
|
+
;// CONCATENATED MODULE: ./src/webgl/resetview/index.js
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
ResetView.install = (Vue, opts) => {
|
|
189
|
+
init_js_default()(Vue, opts);
|
|
190
|
+
Vue.component(ResetView.name, ResetView);
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
module.exports = __webpack_exports__;
|
|
195
|
+
/******/ })()
|
|
196
|
+
;
|
package/roller/style/roller.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--kq-box-padding:16px;--kq-header-bg-color:var(--kq-color-primary);--kq-header-border-color:var(--kq-color-primary)}.kq3d-roller .kq3d-roller-form{z-index:999;width:250px;border-radius:var(--kq-border-radius-base);padding:16px;pointer-events:auto;cursor:default;background-color:var(--kq-bg-color);position:absolute}.kq3d-roller .kq3d-roller-form .kq-row{margin-bottom:5px}.kq3d-roller .kq3d-roller-form .kq3d-roller-span{color:var(--kq-text-color-regular);line-height:32px}.kq3d-roller .kq3d-roller-form .kq3d-roller-span1{color:var(--kq-text-color-regular);line-height:
|
|
1
|
+
:root{--kq-box-padding:16px;--kq-header-bg-color:var(--kq-color-primary);--kq-header-border-color:var(--kq-color-primary)}.kq3d-roller .kq3d-roller-form{z-index:999;width:250px;border-radius:var(--kq-border-radius-base);padding:16px;pointer-events:auto;cursor:default;background-color:var(--kq-bg-color);position:absolute}.kq3d-roller .kq3d-roller-form .kq-row{margin-bottom:5px}.kq3d-roller .kq3d-roller-form .kq3d-roller-span{color:var(--kq-text-color-regular);line-height:32px}.kq3d-roller .kq3d-roller-form .kq3d-roller-span1{color:var(--kq-text-color-regular);line-height:15px;white-space:pre-line;word-break:break-all}.kq3d-roller .shutter-slider{display:none;position:absolute;background-color:#267ee6;z-index:998}.kq3d-roller .lrSlider{left:50%;top:0;width:3px;height:100%}.kq3d-roller .lrSlider:hover{cursor:ew-resize}.kq3d-roller .tbSlider{left:0;top:50%;width:100%;height:3px}.kq3d-roller .tbSlider:hover{cursor:ns-resize}
|
package/scenceview/index.js
CHANGED
|
@@ -57,10 +57,6 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
57
57
|
|
|
58
58
|
;// CONCATENATED MODULE: external {"root":"Vue","commonjs":"vue","commonjs2":"vue","amd":"vue"}
|
|
59
59
|
var external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject = require("vue");
|
|
60
|
-
;// CONCATENATED MODULE: external "@kq_npm/client_icons_vue"
|
|
61
|
-
var client_icons_vue_namespaceObject = require("@kq_npm/client_icons_vue");
|
|
62
|
-
;// CONCATENATED MODULE: external "@element-plus/icons-vue"
|
|
63
|
-
var icons_vue_namespaceObject = require("@element-plus/icons-vue");
|
|
64
60
|
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
|
65
61
|
function _defineProperty(obj, key, value) {
|
|
66
62
|
if (key in obj) {
|
|
@@ -1859,138 +1855,6 @@ class ScenceViewViewModel extends (mitt_default()) {
|
|
|
1859
1855
|
this._viewer = null;
|
|
1860
1856
|
this._drawManager = null;
|
|
1861
1857
|
this._layerManager = null;
|
|
1862
|
-
} //获取相机焦点
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
getCameraFocus() {
|
|
1866
|
-
var scene = this._viewer.scene;
|
|
1867
|
-
var camera = scene.camera;
|
|
1868
|
-
var rayScratch = new Cesium.Ray();
|
|
1869
|
-
rayScratch.origin = camera.positionWC;
|
|
1870
|
-
rayScratch.direction = camera.directionWC;
|
|
1871
|
-
var result = new Cesium.Cartesian3();
|
|
1872
|
-
result = scene.globe.pick(rayScratch, scene, result);
|
|
1873
|
-
|
|
1874
|
-
if (result) {
|
|
1875
|
-
result = camera.worldToCameraCoordinatesPoint(result, result);
|
|
1876
|
-
}
|
|
1877
|
-
|
|
1878
|
-
return result;
|
|
1879
|
-
} //地图缩放
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
zoom(scale) {
|
|
1883
|
-
var scene = this._viewer.scene;
|
|
1884
|
-
var camera = scene.camera;
|
|
1885
|
-
var focus = this.getCameraFocus();
|
|
1886
|
-
var orientation;
|
|
1887
|
-
|
|
1888
|
-
if (!focus) {
|
|
1889
|
-
// Camera direction is not pointing at the globe, so use the ellipsoid horizon point as
|
|
1890
|
-
// the focal point.
|
|
1891
|
-
var ray = new Cesium.Ray(camera.worldToCameraCoordinatesPoint(scene.globe.ellipsoid.cartographicToCartesian(camera.positionCartographic)), camera.directionWC);
|
|
1892
|
-
focus = Cesium.IntersectionTests.grazingAltitudeLocation(ray, scene.globe.ellipsoid);
|
|
1893
|
-
orientation = {
|
|
1894
|
-
heading: camera.heading,
|
|
1895
|
-
pitch: camera.pitch,
|
|
1896
|
-
roll: camera.roll
|
|
1897
|
-
};
|
|
1898
|
-
} else {
|
|
1899
|
-
orientation = {
|
|
1900
|
-
direction: camera.direction,
|
|
1901
|
-
up: camera.up
|
|
1902
|
-
};
|
|
1903
|
-
}
|
|
1904
|
-
|
|
1905
|
-
var cartesian3Scratch = new Cesium.Cartesian3();
|
|
1906
|
-
var direction = Cesium.Cartesian3.subtract(camera.position, focus, cartesian3Scratch);
|
|
1907
|
-
var movementVector = Cesium.Cartesian3.multiplyByScalar(direction, scale, direction);
|
|
1908
|
-
var endPosition = Cesium.Cartesian3.add(focus, movementVector, focus);
|
|
1909
|
-
camera.flyTo({
|
|
1910
|
-
destination: endPosition,
|
|
1911
|
-
orientation: orientation,
|
|
1912
|
-
duration: 0.5,
|
|
1913
|
-
convert: false
|
|
1914
|
-
});
|
|
1915
|
-
} //地图放大
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
zoomIn() {
|
|
1919
|
-
this.zoom(0.5);
|
|
1920
|
-
} //地图缩小
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
zoomOut() {
|
|
1924
|
-
this.zoom(2);
|
|
1925
|
-
} //重置视角
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
resetView() {//this._viewer.camera.flyHome(1);
|
|
1929
|
-
} //重置方向
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
resetOrientation() {
|
|
1933
|
-
var camera = this._viewer.camera;
|
|
1934
|
-
var scene = this._viewer.scene;
|
|
1935
|
-
var depthTestAgainstTerrain = scene.globe.depthTestAgainstTerrain;
|
|
1936
|
-
|
|
1937
|
-
if (!depthTestAgainstTerrain) {
|
|
1938
|
-
scene.globe.depthTestAgainstTerrain = true;
|
|
1939
|
-
}
|
|
1940
|
-
|
|
1941
|
-
var canvas = scene.canvas;
|
|
1942
|
-
var windowCenter = new Cesium.Cartesian2(canvas.clientWidth / 2, canvas.clientHeight / 2);
|
|
1943
|
-
setTimeout(() => {
|
|
1944
|
-
var center = scene.pickPosition(windowCenter);
|
|
1945
|
-
|
|
1946
|
-
if (!center) {
|
|
1947
|
-
center = scene.camera.pickEllipsoid(windowCenter, scene.globe.ellipsoid);
|
|
1948
|
-
}
|
|
1949
|
-
|
|
1950
|
-
scene.globe.depthTestAgainstTerrain = depthTestAgainstTerrain;
|
|
1951
|
-
var distance = Cesium.Cartesian3.distance(center, camera.positionWC);
|
|
1952
|
-
var heading = 6.28319;
|
|
1953
|
-
var pitch = camera.pitch;
|
|
1954
|
-
var hpr = new Cesium.HeadingPitchRange(heading, pitch, distance);
|
|
1955
|
-
camera.lookAt(center, hpr);
|
|
1956
|
-
camera.lookAtTransform(Cesium.Matrix4.IDENTITY);
|
|
1957
|
-
}, 300);
|
|
1958
|
-
} //绑定指南针
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
bindCompassEvent(heading) {
|
|
1962
|
-
var camera = this._viewer.camera;
|
|
1963
|
-
this._removeEventListener = camera.changed.addEventListener(function () {
|
|
1964
|
-
heading.value = camera.heading;
|
|
1965
|
-
});
|
|
1966
|
-
} //获取三维视角
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
getViewPosition() {
|
|
1970
|
-
var camera = this._viewer.camera;
|
|
1971
|
-
var position = {
|
|
1972
|
-
x: camera.position.x,
|
|
1973
|
-
y: camera.position.y,
|
|
1974
|
-
z: camera.position.z
|
|
1975
|
-
};
|
|
1976
|
-
return {
|
|
1977
|
-
position: position,
|
|
1978
|
-
heading: camera.heading,
|
|
1979
|
-
pitch: camera.pitch,
|
|
1980
|
-
roll: camera.roll
|
|
1981
|
-
};
|
|
1982
|
-
} //设置三维视角
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
setViewPosition(view) {
|
|
1986
|
-
this._viewer.camera.flyTo({
|
|
1987
|
-
destination: view.position,
|
|
1988
|
-
orientation: {
|
|
1989
|
-
heading: view.heading,
|
|
1990
|
-
pitch: view.pitch,
|
|
1991
|
-
roll: view.roll
|
|
1992
|
-
}
|
|
1993
|
-
});
|
|
1994
1858
|
} //创建底图
|
|
1995
1859
|
|
|
1996
1860
|
|
|
@@ -2133,11 +1997,6 @@ const _hoisted_1 = {
|
|
|
2133
1997
|
oncontextmenu: "return false;"
|
|
2134
1998
|
};
|
|
2135
1999
|
const _hoisted_2 = ["id"];
|
|
2136
|
-
const _hoisted_3 = {
|
|
2137
|
-
class: "view-left-tools"
|
|
2138
|
-
};
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
2000
|
|
|
2142
2001
|
|
|
2143
2002
|
const __default__ = {
|
|
@@ -2172,17 +2031,11 @@ const __default__ = {
|
|
|
2172
2031
|
defaultShowLayerNames: []
|
|
2173
2032
|
}
|
|
2174
2033
|
},
|
|
2175
|
-
showToolButtons: {
|
|
2176
|
-
type: Boolean,
|
|
2177
|
-
default: true
|
|
2178
|
-
},
|
|
2179
2034
|
// ScenceView初始化的参数对象,包含初始化范围和layer信息。
|
|
2180
2035
|
scenceInfo: Object
|
|
2181
2036
|
},
|
|
2182
2037
|
|
|
2183
|
-
setup(__props
|
|
2184
|
-
expose
|
|
2185
|
-
}) {
|
|
2038
|
+
setup(__props) {
|
|
2186
2039
|
const props = __props;
|
|
2187
2040
|
const {
|
|
2188
2041
|
proxy
|
|
@@ -2197,7 +2050,6 @@ const __default__ = {
|
|
|
2197
2050
|
|
|
2198
2051
|
let language = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.ref)({});
|
|
2199
2052
|
let viewModel = null;
|
|
2200
|
-
let heading = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.ref)(0);
|
|
2201
2053
|
let removeEventListener = null;
|
|
2202
2054
|
(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.onMounted)(() => {
|
|
2203
2055
|
//设置语言
|
|
@@ -2207,128 +2059,16 @@ const __default__ = {
|
|
|
2207
2059
|
|
|
2208
2060
|
viewModel = new ScenceViewViewModel(props, _language);
|
|
2209
2061
|
viewModel.initViewer();
|
|
2210
|
-
|
|
2211
|
-
if (props.showToolButtons) {
|
|
2212
|
-
//绑定指南针事件
|
|
2213
|
-
viewModel.bindCompassEvent(heading);
|
|
2214
|
-
}
|
|
2215
2062
|
}); // 销毁
|
|
2216
2063
|
|
|
2217
2064
|
(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.onBeforeUnmount)(() => {
|
|
2218
2065
|
viewModel && viewModel.destroy();
|
|
2219
|
-
}); //地图放大
|
|
2220
|
-
|
|
2221
|
-
function zoomIn() {
|
|
2222
|
-
viewModel && viewModel.zoomIn();
|
|
2223
|
-
} //地图缩小
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
function zoomOut() {
|
|
2227
|
-
viewModel && viewModel.zoomOut();
|
|
2228
|
-
} //重置视角
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
function resetView() {
|
|
2232
|
-
viewModel && viewModel.resetView();
|
|
2233
|
-
} //重置方向
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
function resetOrientation() {
|
|
2237
|
-
viewModel && viewModel.resetOrientation();
|
|
2238
|
-
}
|
|
2239
|
-
|
|
2240
|
-
expose({
|
|
2241
|
-
zoomIn,
|
|
2242
|
-
zoomOut,
|
|
2243
|
-
resetView,
|
|
2244
|
-
resetOrientation
|
|
2245
2066
|
});
|
|
2246
2067
|
return (_ctx, _cache) => {
|
|
2247
|
-
const _component_kq_icon = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.resolveComponent)("kq-icon");
|
|
2248
|
-
|
|
2249
|
-
const _component_kq_button = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.resolveComponent)("kq-button");
|
|
2250
|
-
|
|
2251
2068
|
return (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createElementBlock)("div", _hoisted_1, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.renderSlot)(_ctx.$slots, "default"), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createElementVNode)("div", {
|
|
2252
2069
|
id: props.target,
|
|
2253
2070
|
class: "view-container"
|
|
2254
|
-
},
|
|
2255
|
-
onClick: zoomIn,
|
|
2256
|
-
title: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(language).zoomIn
|
|
2257
|
-
}, {
|
|
2258
|
-
default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)(_component_kq_icon, {
|
|
2259
|
-
size: 16
|
|
2260
|
-
}, {
|
|
2261
|
-
default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(icons_vue_namespaceObject.Plus))]),
|
|
2262
|
-
_: 1
|
|
2263
|
-
/* STABLE */
|
|
2264
|
-
|
|
2265
|
-
})]),
|
|
2266
|
-
_: 1
|
|
2267
|
-
/* STABLE */
|
|
2268
|
-
|
|
2269
|
-
}, 8
|
|
2270
|
-
/* PROPS */
|
|
2271
|
-
, ["title"]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)(_component_kq_button, {
|
|
2272
|
-
onClick: zoomOut,
|
|
2273
|
-
title: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(language).zoomOut,
|
|
2274
|
-
style: {
|
|
2275
|
-
"margin-top": "0px"
|
|
2276
|
-
}
|
|
2277
|
-
}, {
|
|
2278
|
-
default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)(_component_kq_icon, {
|
|
2279
|
-
size: 16
|
|
2280
|
-
}, {
|
|
2281
|
-
default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(icons_vue_namespaceObject.Minus))]),
|
|
2282
|
-
_: 1
|
|
2283
|
-
/* STABLE */
|
|
2284
|
-
|
|
2285
|
-
})]),
|
|
2286
|
-
_: 1
|
|
2287
|
-
/* STABLE */
|
|
2288
|
-
|
|
2289
|
-
}, 8
|
|
2290
|
-
/* PROPS */
|
|
2291
|
-
, ["title"]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)(_component_kq_button, {
|
|
2292
|
-
onClick: resetView,
|
|
2293
|
-
title: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(language).resetView
|
|
2294
|
-
}, {
|
|
2295
|
-
default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)(_component_kq_icon, {
|
|
2296
|
-
size: 20
|
|
2297
|
-
}, {
|
|
2298
|
-
default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(icons_vue_namespaceObject.RefreshLeft))]),
|
|
2299
|
-
_: 1
|
|
2300
|
-
/* STABLE */
|
|
2301
|
-
|
|
2302
|
-
})]),
|
|
2303
|
-
_: 1
|
|
2304
|
-
/* STABLE */
|
|
2305
|
-
|
|
2306
|
-
}, 8
|
|
2307
|
-
/* PROPS */
|
|
2308
|
-
, ["title"]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)(_component_kq_button, {
|
|
2309
|
-
onClick: resetOrientation,
|
|
2310
|
-
title: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(language).resetOrientation,
|
|
2311
|
-
class: "compass"
|
|
2312
|
-
}, {
|
|
2313
|
-
default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)(_component_kq_icon, {
|
|
2314
|
-
size: 20,
|
|
2315
|
-
style: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.normalizeStyle)('transform: rotate(-' + (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(heading) + 'rad);-webkit-transform: rotate(-' + (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(heading) + 'rad)')
|
|
2316
|
-
}, {
|
|
2317
|
-
default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(client_icons_vue_namespaceObject.IconCompass3D))]),
|
|
2318
|
-
_: 1
|
|
2319
|
-
/* STABLE */
|
|
2320
|
-
|
|
2321
|
-
}, 8
|
|
2322
|
-
/* PROPS */
|
|
2323
|
-
, ["style"])]),
|
|
2324
|
-
_: 1
|
|
2325
|
-
/* STABLE */
|
|
2326
|
-
|
|
2327
|
-
}, 8
|
|
2328
|
-
/* PROPS */
|
|
2329
|
-
, ["title"])], 512
|
|
2330
|
-
/* NEED_PATCH */
|
|
2331
|
-
), [[external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.vShow, __props.showToolButtons]])], 8
|
|
2071
|
+
}, null, 8
|
|
2332
2072
|
/* PROPS */
|
|
2333
2073
|
, _hoisted_2)]);
|
|
2334
2074
|
};
|