sat-earth 0.8.22 → 0.8.23
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 +0 -370
- package/dist/packages/components/_private/TheImageEditor/index.d.ts +1 -1
- package/dist/packages/components/_private/TheImageEditor/index.vue.d.ts +1 -0
- package/dist/packages/components/globe/SatGlobe.vue.d.ts +1 -0
- package/dist/packages/components/globe/index.d.ts +16 -9
- package/dist/packages/components/picture/SatPicture.vue.d.ts +1 -0
- package/dist/packages/components/picture/index.d.ts +13 -7
- package/dist/packages/utils/map/index.d.ts +6 -5
- package/dist/sat-earth.mjs +1940 -1932
- package/dist/sat-earth.umd.js +3 -3
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,372 +1,2 @@
|
|
|
1
1
|
## 什么是快乐“星球” ?
|
|
2
2
|
  [SatEarth](https://gitee.com/gengkaibo/sat-earth)是一个三维地球组件库,目的是支持开发人员快速搭建三维场景。
|
|
3
|
-
|
|
4
|
-
## 组件库亮点
|
|
5
|
-
- 内置丰富基础功能组件以及菜单组件,如果不需要定制化开发,可以分分钟出一个平台级应用系统
|
|
6
|
-
- 对外暴露API,可随意调用sat-earth、mars3d、cesium API 进行定制化开发
|
|
7
|
-
- 功能组件可配合菜单组件也可独立运行,兼顾灵活与便捷
|
|
8
|
-
- ...
|
|
9
|
-
|
|
10
|
-
## 当前开发进度
|
|
11
|
-
- 1.数据源 (done)
|
|
12
|
-
- 2.地图部件 (done)
|
|
13
|
-
- 坐标信息
|
|
14
|
-
- 悬浮导航
|
|
15
|
-
- 时钟动画
|
|
16
|
-
- 鹰眼地图
|
|
17
|
-
- 3.工具栏
|
|
18
|
-
- 3.1.搜索定位(done)
|
|
19
|
-
- 地名检索
|
|
20
|
-
- 坐标定位
|
|
21
|
-
- 路径规划
|
|
22
|
-
- 3.2.量测工具(done)
|
|
23
|
-
- 坐标测量
|
|
24
|
-
- 空间距离
|
|
25
|
-
- 水平面积
|
|
26
|
-
- 高度测量
|
|
27
|
-
- 三角测量
|
|
28
|
-
- 方位测量
|
|
29
|
-
- 贴地距离
|
|
30
|
-
- 贴地面积
|
|
31
|
-
- 3.3.图上标绘(done)
|
|
32
|
-
- 3.4.出图工具(done)
|
|
33
|
-
- 3.5.空间分析
|
|
34
|
-
- 剖面分析
|
|
35
|
-
- 方量分析
|
|
36
|
-
- 通视分析
|
|
37
|
-
- 可视域分析
|
|
38
|
-
- 限高分析
|
|
39
|
-
- 缓冲分析
|
|
40
|
-
- 剖面分析
|
|
41
|
-
- 3.6.地形分析
|
|
42
|
-
- 挖地分析
|
|
43
|
-
- 等高线分析
|
|
44
|
-
- 坡度坡向分析
|
|
45
|
-
- 淹没分析
|
|
46
|
-
- 3.7.模型分析
|
|
47
|
-
- 淹没分析
|
|
48
|
-
- 模型压平
|
|
49
|
-
- 模型裁剪
|
|
50
|
-
- 模型剖切
|
|
51
|
-
- 3.8.视频融合
|
|
52
|
-
- 3.9.飞行漫游
|
|
53
|
-
|
|
54
|
-
## 前序准备
|
|
55
|
-
- [node](http://nodejs.org/) 和 [git](https://git-scm.com/) - 项目开发环境
|
|
56
|
-
- [Vite](https://vitejs.dev/) - 熟悉 vite 特性
|
|
57
|
-
- [Vue3](https://v3.vuejs.org/) - 熟悉 Vue 基础语法
|
|
58
|
-
- [TypeScript](https://www.typescriptlang.org/) - 熟悉 `TypeScript` 基本语法
|
|
59
|
-
- [Es6+](http://es6.ruanyifeng.com/) - 熟悉`es6`基本语法
|
|
60
|
-
- [Cesium](https://cesium.com/) - Cesium是一个开源的,基于webgl的二、三维地图引擎
|
|
61
|
-
- [Mars3D](http://mars3d.cn/) - 基于Cesium优化提升与B/S架构设计,支持多行业扩展的轻量级高效能GIS开发平台
|
|
62
|
-
|
|
63
|
-
## 安装
|
|
64
|
-
- 首先在命令行执行如下命令添加 `sat-earth` 的依赖
|
|
65
|
-
```bash
|
|
66
|
-
npm i sat-earth
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
- 将 `node_modules/mars3d-cesium/Build/Cesium` 目录拷贝到我们开发目录中的public下
|
|
70
|
-
然后在index.html中引入 `cesium` 库
|
|
71
|
-
```html
|
|
72
|
-
<!--引入cesium基础lib-->
|
|
73
|
-
<link href="/Cesium/Widgets/widgets.css" rel="stylesheet" type="text/css" />
|
|
74
|
-
<script src="/Cesium/Cesium.js" type="text/javascript"></script>
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
- 如果您的项目也用了`pinia`,请修改您项目中的piniaStore直接使用`sat-earth`的导出,并且main.ts中不需要在调用App.use(piniaStore)
|
|
78
|
-
```ts
|
|
79
|
-
// const piniaStore = createPinia()
|
|
80
|
-
// export { piniaStore }
|
|
81
|
-
import { SatStore } from 'sat-earth'
|
|
82
|
-
const piniaStore = SatStore.piniaStore
|
|
83
|
-
export {
|
|
84
|
-
piniaStore
|
|
85
|
-
}
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
- 在 `main.[jt]s` 中引入我们的 `sat-earth` 资源
|
|
89
|
-
|
|
90
|
-
```ts
|
|
91
|
-
import { createApp } from "vue"
|
|
92
|
-
import App from "./app.vue"
|
|
93
|
-
import SatEarth from 'sat-earth'
|
|
94
|
-
import 'sat-earth/dist/style.css'
|
|
95
|
-
const app = createApp(App)
|
|
96
|
-
// SatEarth内部引入了ElementPlus,如果你也使用了element-plus,这里注释掉不再引入,并且取消element-plus的按需自动导入(目前发现一些样式上的bug,我弃用了)
|
|
97
|
-
// import ElementPlus from 'element-plus'
|
|
98
|
-
// import 'element-plus/dist/index.css'
|
|
99
|
-
// import 'element-plus/theme-chalk/dark/css-vars.css'
|
|
100
|
-
// app.use(ElementPlus)
|
|
101
|
-
app.use(SatEarth)
|
|
102
|
-
app.mount("#app")
|
|
103
|
-
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
- 在`tsconfig.json`中的`types`加入类型声明文件`sat-earth/dist/packages/auto-components`,来支持[Volar](https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.volar)的类型提示
|
|
107
|
-
```json
|
|
108
|
-
{
|
|
109
|
-
"compilerOptions": {
|
|
110
|
-
"target": "esnext", // 指定ts编译后的ECMAScript目标版本: 'es3' (default), 'es5', 'es2015', 'es2016', 'es2017', or 'esnext'
|
|
111
|
-
"module": "esnext", // 指定编译后代码使用的模块化规范: 'commonjs', 'amd', 'umd' or 'es...'
|
|
112
|
-
"declaration": false, // 是否生成声明文件
|
|
113
|
-
"strict": true, // 开启全部严格模式
|
|
114
|
-
"removeComments": true, // 删除注释
|
|
115
|
-
"allowJs": true, // 是否对js文件开启编译
|
|
116
|
-
"noImplicitAny": false, // 支持类型不标注可以默认any
|
|
117
|
-
"allowSyntheticDefaultImports": true, // 允许没有导出的模块中导入
|
|
118
|
-
"resolveJsonModule": true, // json文件是否可导入
|
|
119
|
-
"isolatedModules": true, // 将每个文件作为单独的模块
|
|
120
|
-
"useDefineForClassFields": true, // class类的变量声明方式从 = 赋值的方式变更成了Object.defineProperty;所有的字段声明都会生效,即使它没有指定默认值
|
|
121
|
-
"moduleResolution": "node", // 置顶模块的解析策略,'node' or 'classic'
|
|
122
|
-
"esModuleInterop": true, // 支持es6,commonjs模块
|
|
123
|
-
"skipLibCheck": true, // 跳过类库检测
|
|
124
|
-
"jsx": "preserve",
|
|
125
|
-
"lib": [
|
|
126
|
-
"esnext",
|
|
127
|
-
"dom"
|
|
128
|
-
],
|
|
129
|
-
"types": [
|
|
130
|
-
"vite/client",
|
|
131
|
-
"sat-earth/dist/packages/auto-components"
|
|
132
|
-
],
|
|
133
|
-
"paths": {
|
|
134
|
-
"@src/*": [
|
|
135
|
-
"./src/*"
|
|
136
|
-
]
|
|
137
|
-
}
|
|
138
|
-
},
|
|
139
|
-
"include": [
|
|
140
|
-
"**/*.ts",
|
|
141
|
-
"**/*.d.ts",
|
|
142
|
-
"**/*.vue"
|
|
143
|
-
]
|
|
144
|
-
}
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
## 快速开始
|
|
148
|
-
```ts
|
|
149
|
-
<script setup lang="ts">
|
|
150
|
-
import { type SatMenuItem, type SatMapOptions } from 'sat-earth'
|
|
151
|
-
import { SatPictureSFC } from 'sat-earth'
|
|
152
|
-
/*
|
|
153
|
-
初始化参数尽量保证了和mars3d的Map构造一致性,但是任然有一些地方进行了小改动,具体查看类型SatMapOptions,下面请看改动:
|
|
154
|
-
1. 在mars3d的Map构造参数的基础上扩展了custom对象。
|
|
155
|
-
(
|
|
156
|
-
custom: {
|
|
157
|
-
// 工具栏新增项
|
|
158
|
-
layoutTheme: {
|
|
159
|
-
primaryColor: '#409eff',
|
|
160
|
-
isDark: true,
|
|
161
|
-
},
|
|
162
|
-
toolbar: {
|
|
163
|
-
mapSplit: true // 开启卷帘工具
|
|
164
|
-
bookmark: true // 开启视角书签工具
|
|
165
|
-
keyboardRoam: true // 开启键盘漫游功能
|
|
166
|
-
},
|
|
167
|
-
plotModelUrlPrefix?: string // 标绘模型地址前缀
|
|
168
|
-
layers: {
|
|
169
|
-
// list 这是要加入到 'SatSource' 数据源管理中的自定义Layer图层,参数与 mars3d构造 Layer 的参数
|
|
170
|
-
// 一致,通过 'id/pid' 在 'SatSource' 组件中形成对应的树形结构, 如果不加pid的时候或者任意添加的
|
|
171
|
-
// pid导致在所有图层中并没有查找到该 pid 对应图层项时,组件会给该项添加默认pid并加到树的跟节点上。
|
|
172
|
-
list: []
|
|
173
|
-
// 辅助图层
|
|
174
|
-
auxiliaryLayers: {
|
|
175
|
-
cover: boolean // 是否覆盖内置的辅助图层
|
|
176
|
-
list: [] // 自定义的辅助图层Layer集合
|
|
177
|
-
},
|
|
178
|
-
// 地形图层
|
|
179
|
-
terrainLayers: {
|
|
180
|
-
cover: boolean // 是否覆盖内置的地形图层
|
|
181
|
-
list: [] // 自定义的地形图层Layer集合
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
)
|
|
186
|
-
2. 对mars3d的Map构造参数中原有的basemaps的传参略作了修改。
|
|
187
|
-
(
|
|
188
|
-
basemaps:[] => basemaps:{
|
|
189
|
-
cover: boolean
|
|
190
|
-
list: []
|
|
191
|
-
}
|
|
192
|
-
①. 在 'sat-earth' 中加入了默认的基础底图,这里可以选择是否覆盖重写;
|
|
193
|
-
②. basemaps中配置的底图最终也会出现在 'SatSource' 数据源组件中的树形结构中;
|
|
194
|
-
)
|
|
195
|
-
|
|
196
|
-
*/
|
|
197
|
-
const options: SatMapOptions = {
|
|
198
|
-
map3d: {
|
|
199
|
-
control: {
|
|
200
|
-
baseLayerPicker: true,
|
|
201
|
-
animation: false,
|
|
202
|
-
timeline: false
|
|
203
|
-
},
|
|
204
|
-
basemaps: {
|
|
205
|
-
cover: false,
|
|
206
|
-
list: []
|
|
207
|
-
},
|
|
208
|
-
custom: {
|
|
209
|
-
layoutTheme: {
|
|
210
|
-
primaryColor: '#409eff',
|
|
211
|
-
isDark: true,
|
|
212
|
-
},
|
|
213
|
-
toolbar: {
|
|
214
|
-
mapSplit: true, // 开启卷帘工具
|
|
215
|
-
bookmark: true, // 开启视角书签工具
|
|
216
|
-
keyboardRoam: true, // 开启键盘漫游功能
|
|
217
|
-
},
|
|
218
|
-
layers: {
|
|
219
|
-
/* list 这是要加入到数据源管理中的自定义Layer图层,参数与 mars3d构造 Layer 的参数一致,
|
|
220
|
-
通过 'id/pid' 在 'SatSource' 组件中形成对应的树形结构, 不加 pid 的时候或者任意添加的 pid
|
|
221
|
-
导致所有图层中并没有该 pid 对应图层项时,组件会给该项添加默认的 pid,并加入到树的跟节点上。
|
|
222
|
-
*/
|
|
223
|
-
list: [
|
|
224
|
-
{
|
|
225
|
-
'id': 202012,
|
|
226
|
-
'type': '3dtiles',
|
|
227
|
-
'name': '石化工厂',
|
|
228
|
-
'url': 'http://data.mars3d.cn/3dtiles/max-shihua/tileset.json',
|
|
229
|
-
'position': { 'lng': 117.077158, 'lat': 31.659116, 'alt': 24.6 },
|
|
230
|
-
'maximumScreenSpaceError': 1,
|
|
231
|
-
'maximumMemoryUsage': 1024,
|
|
232
|
-
'highlight': { 'type': 'click', 'color': '#00FF00' },
|
|
233
|
-
'popup': 'all',
|
|
234
|
-
'flyTo': true,
|
|
235
|
-
'scenetree': 'scenetree.json',
|
|
236
|
-
'center': { 'lat': 31.654916, 'lng': 117.08278, 'alt': 279, 'heading': 316, 'pitch': -29 }
|
|
237
|
-
},
|
|
238
|
-
],
|
|
239
|
-
// 辅助图层
|
|
240
|
-
auxiliaryLayers: {
|
|
241
|
-
cover: false, // 是否覆盖内置的辅助图层
|
|
242
|
-
list: [] // 自定义的辅助图层Layer集合
|
|
243
|
-
},
|
|
244
|
-
// 地形图层
|
|
245
|
-
terrainLayers: {
|
|
246
|
-
cover: false, // 是否覆盖内置的地形图层
|
|
247
|
-
list: [] // 自定义的地形图层Layer集合
|
|
248
|
-
},
|
|
249
|
-
},
|
|
250
|
-
},
|
|
251
|
-
},
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
// test 自定义菜单
|
|
255
|
-
const treeData = ref<SatMenuItem[]>([
|
|
256
|
-
{
|
|
257
|
-
name: 'hello',
|
|
258
|
-
label: '你好',
|
|
259
|
-
icon: {
|
|
260
|
-
class: 'fa-commenting-o',
|
|
261
|
-
},
|
|
262
|
-
enable: false,
|
|
263
|
-
active: false
|
|
264
|
-
},
|
|
265
|
-
])
|
|
266
|
-
const changeDataToEnable = (item: SatMenuItem) => {
|
|
267
|
-
item.enable = true
|
|
268
|
-
item.active = true
|
|
269
|
-
console.log('do init...')
|
|
270
|
-
}
|
|
271
|
-
const changeDataToUnEnable = (item: SatMenuItem) => {
|
|
272
|
-
item.enable = false
|
|
273
|
-
item.active = false
|
|
274
|
-
console.log('do destroy...')
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
// test SatPicture
|
|
278
|
-
const satPicture = ref<InstanceType<typeof SatPictureSFC>>()
|
|
279
|
-
const testPicture = () => {
|
|
280
|
-
// test dom上图
|
|
281
|
-
const a = satPicture.value?.getImageEditor()
|
|
282
|
-
const dom = document.getElementsByClassName('sat-panel-content-header')
|
|
283
|
-
SatUtil.imageUtil.dom2Base64(dom[0] as HTMLDivElement).then(base64 => {
|
|
284
|
-
console.log(base64)
|
|
285
|
-
a?.value?.uploadImageBase64(base64)
|
|
286
|
-
})
|
|
287
|
-
// test 本地图片上图
|
|
288
|
-
SatUtil.imageUtil.getImgBase64('./pubilc/mars3d-cesium/Assets/Images/cesium_credit.png').then(res => {
|
|
289
|
-
a?.value?.uploadImageBase64(res)
|
|
290
|
-
})
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
// test menu外部使用组件
|
|
295
|
-
const isSourceVisible = ref(true)
|
|
296
|
-
const toggleSourceVisible = () => {
|
|
297
|
-
isSourceVisible.value = !isSourceVisible.value
|
|
298
|
-
console.log(isSourceVisible.value)
|
|
299
|
-
}
|
|
300
|
-
</script>
|
|
301
|
-
```
|
|
302
|
-
```html
|
|
303
|
-
<template>
|
|
304
|
-
<div
|
|
305
|
-
style="height:100px;"
|
|
306
|
-
@click="toggleSourceVisible"
|
|
307
|
-
>
|
|
308
|
-
toggle
|
|
309
|
-
</div>
|
|
310
|
-
<SatGlobe :sat-map-options="options">
|
|
311
|
-
<SatMenu>
|
|
312
|
-
<SatSource></SatSource>
|
|
313
|
-
<SatMapPart></SatMapPart>
|
|
314
|
-
<SatLocation></SatLocation>
|
|
315
|
-
<SatMeasure></SatMeasure>
|
|
316
|
-
<SatPlot></SatPlot>
|
|
317
|
-
<SatPicture ref="satPicture"></SatPicture>
|
|
318
|
-
<!-- <SatSpatialAnalysis></SatSpatialAnalysis>
|
|
319
|
-
<SatTerrainAnalysis></SatTerrainAnalysis>
|
|
320
|
-
<SatModelAnalysis></SatModelAnalysis>
|
|
321
|
-
<SatVideoFusion></SatVideoFusion>
|
|
322
|
-
<SatRoam></SatRoam> -->
|
|
323
|
-
<!-- 自定义菜单项 -->
|
|
324
|
-
<!-- <template #custom-enable>
|
|
325
|
-
<SatMenuTree
|
|
326
|
-
:custom="true"
|
|
327
|
-
show-type="enabled"
|
|
328
|
-
:tree-data="treeData.filter((i) => i.enable)"
|
|
329
|
-
@custom-click="changeDataToEnable"
|
|
330
|
-
@custom-close-click="changeDataToUnEnable"
|
|
331
|
-
></SatMenuTree>
|
|
332
|
-
</template>
|
|
333
|
-
<template #custom>
|
|
334
|
-
<SatMenuTree
|
|
335
|
-
:custom="true"
|
|
336
|
-
:tree-data="treeData"
|
|
337
|
-
@custom-click="changeDataToEnable"
|
|
338
|
-
></SatMenuTree>
|
|
339
|
-
</template>-->
|
|
340
|
-
</SatMenu>
|
|
341
|
-
|
|
342
|
-
<!-- 使用SatPanel 面板组件 配合自定义菜单项完成自定义功能面板的开发-->
|
|
343
|
-
<!-- <SatPanel
|
|
344
|
-
v-if="treeData.filter(item=>item.name=='hello')[0].enable"
|
|
345
|
-
v-show="treeData.filter(item=>item.name=='hello')[0].active"
|
|
346
|
-
title="你好啊"
|
|
347
|
-
:close="()=>{treeData.filter(item=>item.name=='hello')[0].enable = false}"
|
|
348
|
-
:shrink="()=>{treeData.filter(item=>item.name=='hello')[0].active = false}"
|
|
349
|
-
>
|
|
350
|
-
内容
|
|
351
|
-
</SatPanel> -->
|
|
352
|
-
|
|
353
|
-
<!-- 在内置的menu外部使用组件 -->
|
|
354
|
-
<!-- <SatSource v-if="isSourceVisible"></SatSource> -->
|
|
355
|
-
</SatGlobe>
|
|
356
|
-
<!-- 在SatGlobe外部无法使用组件 -->
|
|
357
|
-
<!-- <SatSource></SatSource> -->
|
|
358
|
-
</template>
|
|
359
|
-
<style>
|
|
360
|
-
body {
|
|
361
|
-
margin: 0;
|
|
362
|
-
padding: 0;
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
#app {
|
|
366
|
-
width: 100vw;
|
|
367
|
-
height: 100vh;
|
|
368
|
-
position: relative;
|
|
369
|
-
}
|
|
370
|
-
</style>
|
|
371
|
-
|
|
372
|
-
```
|
|
@@ -4,7 +4,7 @@ import type { UploadFile } from 'element-plus';
|
|
|
4
4
|
import { ShallowRef } from 'vue';
|
|
5
5
|
export { TheImageEditor };
|
|
6
6
|
export interface TheImageEditorExpose {
|
|
7
|
-
|
|
7
|
+
getInstance: () => ShallowRef<tuiImageEditor | undefined>;
|
|
8
8
|
loadScene: (isIncludeDiv?: boolean) => void;
|
|
9
9
|
uploadFile: (uploadFile: UploadFile) => void;
|
|
10
10
|
uploadImageBase64: (base64: string) => void;
|
|
@@ -43,5 +43,6 @@ declare const _sfc_main: import("vue").DefineComponent<{}, {
|
|
|
43
43
|
uploadFile: (uploadFile: UploadFile) => void;
|
|
44
44
|
uploadImageBase64: (base64: string) => void;
|
|
45
45
|
download: (autoDownload?: boolean | undefined) => Promise<string> | undefined;
|
|
46
|
+
getInstance: () => import("vue").ShallowRef<tuiImageEditor | undefined>;
|
|
46
47
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
47
48
|
export default _sfc_main;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import SatGlobeSFC from './SatGlobe.vue';
|
|
2
|
+
import { TreeSatLayer } from '../../store/modules/layer';
|
|
3
|
+
import { SatMap } from '../../utils';
|
|
2
4
|
declare const SatGlobe: import('../../utils/installer').SFCWithInstall<import("vue").DefineComponent<{
|
|
3
5
|
eleId: {
|
|
4
6
|
type: StringConstructor;
|
|
@@ -9,7 +11,7 @@ declare const SatGlobe: import('../../utils/installer').SFCWithInstall<import("v
|
|
|
9
11
|
default: () => import("../types").SatMapOptions;
|
|
10
12
|
};
|
|
11
13
|
}, {
|
|
12
|
-
mapInstance: import("vue").ShallowRef<
|
|
14
|
+
mapInstance: import("vue").ShallowRef<SatMap | null>;
|
|
13
15
|
compStore: import("pinia").Store<"SatCompState__sat-earth", import("../../store/modules/compState").CompState, {
|
|
14
16
|
getComponents: (state: {
|
|
15
17
|
SatSource?: {
|
|
@@ -116,9 +118,9 @@ declare const SatGlobe: import('../../utils/installer').SFCWithInstall<import("v
|
|
|
116
118
|
changeCompState(itemName: string, flag: boolean): void;
|
|
117
119
|
unActiveAll(): void;
|
|
118
120
|
}>;
|
|
119
|
-
layerStore: import("pinia").Store<"SatLayerDev__sat-earth", import(
|
|
121
|
+
layerStore: import("pinia").Store<"SatLayerDev__sat-earth", import('../../store/modules/layer').LayerState, {}, {
|
|
120
122
|
setLayerList(val: import("../../utils/types").SatLayerDev[]): void;
|
|
121
|
-
setLayerTree(val:
|
|
123
|
+
setLayerTree(val: TreeSatLayer[]): void;
|
|
122
124
|
setMapSplitPanelVisible(val: boolean): void;
|
|
123
125
|
setCameraBookmarkPanelVisible(val: boolean): void;
|
|
124
126
|
}>;
|
|
@@ -145,6 +147,7 @@ declare const SatGlobe: import('../../utils/installer').SFCWithInstall<import("v
|
|
|
145
147
|
isSupported: import("vue").Ref<boolean>;
|
|
146
148
|
stop: () => void;
|
|
147
149
|
};
|
|
150
|
+
getInstance: (eleId?: string | undefined) => SatMap | undefined;
|
|
148
151
|
DarkIcon: {
|
|
149
152
|
name: string;
|
|
150
153
|
};
|
|
@@ -152,10 +155,10 @@ declare const SatGlobe: import('../../utils/installer').SFCWithInstall<import("v
|
|
|
152
155
|
name: string;
|
|
153
156
|
};
|
|
154
157
|
MapSplitPanel: import("vue").DefineComponent<{}, {
|
|
155
|
-
mapInstance: import("vue").ShallowRef<
|
|
156
|
-
layerStore: import("pinia").Store<"SatLayerDev__sat-earth", import(
|
|
158
|
+
mapInstance: import("vue").ShallowRef<SatMap | null> | undefined;
|
|
159
|
+
layerStore: import("pinia").Store<"SatLayerDev__sat-earth", import('../../store/modules/layer').LayerState, {}, {
|
|
157
160
|
setLayerList(val: import("../../utils/types").SatLayerDev[]): void;
|
|
158
|
-
setLayerTree(val:
|
|
161
|
+
setLayerTree(val: TreeSatLayer[]): void;
|
|
159
162
|
setMapSplitPanelVisible(val: boolean): void;
|
|
160
163
|
setCameraBookmarkPanelVisible(val: boolean): void;
|
|
161
164
|
}>;
|
|
@@ -167,10 +170,10 @@ declare const SatGlobe: import('../../utils/installer').SFCWithInstall<import("v
|
|
|
167
170
|
setSplitList: () => void;
|
|
168
171
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
169
172
|
CameraBookmarkPanel: import("vue").DefineComponent<{}, {
|
|
170
|
-
mapInstance: import("vue").ShallowRef<
|
|
171
|
-
layerStore: import("pinia").Store<"SatLayerDev__sat-earth", import(
|
|
173
|
+
mapInstance: import("vue").ShallowRef<SatMap | null> | undefined;
|
|
174
|
+
layerStore: import("pinia").Store<"SatLayerDev__sat-earth", import('../../store/modules/layer').LayerState, {}, {
|
|
172
175
|
setLayerList(val: import("../../utils/types").SatLayerDev[]): void;
|
|
173
|
-
setLayerTree(val:
|
|
176
|
+
setLayerTree(val: TreeSatLayer[]): void;
|
|
174
177
|
setMapSplitPanelVisible(val: boolean): void;
|
|
175
178
|
setCameraBookmarkPanelVisible(val: boolean): void;
|
|
176
179
|
}>;
|
|
@@ -345,3 +348,7 @@ declare const SatGlobe: import('../../utils/installer').SFCWithInstall<import("v
|
|
|
345
348
|
}>>;
|
|
346
349
|
export { SatGlobeSFC, SatGlobe };
|
|
347
350
|
export default SatGlobe;
|
|
351
|
+
export interface SatGlobeExpose {
|
|
352
|
+
layerTree: TreeSatLayer[];
|
|
353
|
+
getInstance: (eleId: string) => SatMap | undefined;
|
|
354
|
+
}
|
|
@@ -199,6 +199,7 @@ declare const _sfc_main: import("vue").DefineComponent<{}, {
|
|
|
199
199
|
uploadFile: (uploadFile: import("element-plus").UploadFile) => void;
|
|
200
200
|
uploadImageBase64: (base64: string) => void;
|
|
201
201
|
download: (autoDownload?: boolean | undefined) => Promise<string> | undefined;
|
|
202
|
+
getInstance: () => import("vue").ShallowRef<tuiImageEditor.ImageEditor | undefined>;
|
|
202
203
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
203
204
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("initHooks" | "destroyHooks")[], "initHooks" | "destroyHooks", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
204
205
|
onInitHooks?: ((...args: any[]) => any) | undefined;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import SatPictureSFC from './SatPicture.vue';
|
|
3
|
+
import { TheImageEditorExpose } from '../_private/TheImageEditor';
|
|
4
|
+
import { Ref } from 'vue';
|
|
3
5
|
declare const SatPicture: import('../../utils/installer').SFCWithInstall<import("vue").DefineComponent<{}, {
|
|
4
6
|
emits: {
|
|
5
7
|
(event: "initHooks"): void;
|
|
@@ -14,8 +16,8 @@ declare const SatPicture: import('../../utils/installer').SFCWithInstall<import(
|
|
|
14
16
|
isRenderRef: import("vue").ComputedRef<boolean | undefined>;
|
|
15
17
|
shrinkWindow: () => void;
|
|
16
18
|
closeWindow: () => void;
|
|
17
|
-
theImageEditor:
|
|
18
|
-
getImageEditor: () =>
|
|
19
|
+
theImageEditor: Ref<TheImageEditorExpose | undefined>;
|
|
20
|
+
getImageEditor: () => Ref<TheImageEditorExpose | undefined>;
|
|
19
21
|
SatPanel: import("vue").DefineComponent<{
|
|
20
22
|
title: {
|
|
21
23
|
type: StringConstructor;
|
|
@@ -98,13 +100,13 @@ declare const SatPicture: import('../../utils/installer').SFCWithInstall<import(
|
|
|
98
100
|
default: () => void;
|
|
99
101
|
};
|
|
100
102
|
}>> & {}>>;
|
|
101
|
-
isMobile:
|
|
103
|
+
isMobile: Ref<boolean>;
|
|
102
104
|
taskViewStore: import("pinia").Store<"SatTaskView__sat-earth", import("../../store/modules/taskView").TaskViewState, {}, {}>;
|
|
103
|
-
draggable:
|
|
104
|
-
dragElement:
|
|
105
|
+
draggable: Ref<boolean>;
|
|
106
|
+
dragElement: Ref<HTMLElement | null>;
|
|
105
107
|
style: import("vue").ComputedRef<string>;
|
|
106
108
|
styleComputed: import("vue").ComputedRef<string>;
|
|
107
|
-
windowSizeMine:
|
|
109
|
+
windowSizeMine: Ref<"Maximize" | "Nomal">;
|
|
108
110
|
changeWindowSize: () => void;
|
|
109
111
|
doMinimize: (e: MouseEvent) => Promise<void>;
|
|
110
112
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -160,7 +162,7 @@ declare const SatPicture: import('../../utils/installer').SFCWithInstall<import(
|
|
|
160
162
|
TheImageEditor: import("vue").DefineComponent<{}, {
|
|
161
163
|
mapInstance: import("vue").ShallowRef<import("../../utils").SatMap | null> | undefined;
|
|
162
164
|
instance: import("vue").ShallowRef<tuiImageEditor.ImageEditor | undefined>;
|
|
163
|
-
fileList:
|
|
165
|
+
fileList: Ref<{
|
|
164
166
|
name: string;
|
|
165
167
|
percentage?: number | undefined;
|
|
166
168
|
status: import("element-plus").UploadStatus;
|
|
@@ -198,6 +200,7 @@ declare const SatPicture: import('../../utils/installer').SFCWithInstall<import(
|
|
|
198
200
|
uploadFile: (uploadFile: import("element-plus").UploadFile) => void;
|
|
199
201
|
uploadImageBase64: (base64: string) => void;
|
|
200
202
|
download: (autoDownload?: boolean | undefined) => Promise<string> | undefined;
|
|
203
|
+
getInstance: () => import("vue").ShallowRef<tuiImageEditor.ImageEditor | undefined>;
|
|
201
204
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
202
205
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("initHooks" | "destroyHooks")[], "initHooks" | "destroyHooks", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
203
206
|
onInitHooks?: ((...args: any[]) => any) | undefined;
|
|
@@ -205,3 +208,6 @@ declare const SatPicture: import('../../utils/installer').SFCWithInstall<import(
|
|
|
205
208
|
}, {}>>;
|
|
206
209
|
export { SatPictureSFC, SatPicture };
|
|
207
210
|
export default SatPicture;
|
|
211
|
+
export interface SatPictureExpose {
|
|
212
|
+
getImageEditor: () => Ref<TheImageEditorExpose | undefined>;
|
|
213
|
+
}
|
|
@@ -12,12 +12,13 @@ export declare class SatMap {
|
|
|
12
12
|
static gaodePOI: mars3d.query.GaodePOI;
|
|
13
13
|
static webglreport(): boolean;
|
|
14
14
|
static webglerror(): void;
|
|
15
|
+
static getInstanceById(eleId: string): SatMap | undefined;
|
|
15
16
|
configOptions: SatMapOptions;
|
|
16
|
-
map: Mars3dMap |
|
|
17
|
-
layer: Layer;
|
|
18
|
-
measure: Measure;
|
|
19
|
-
plot: Plot;
|
|
20
|
-
spatialAnalysis: SpatialAnalysis;
|
|
17
|
+
map: Mars3dMap | undefined;
|
|
18
|
+
layer: Layer | undefined;
|
|
19
|
+
measure: Measure | undefined;
|
|
20
|
+
plot: Plot | undefined;
|
|
21
|
+
spatialAnalysis: SpatialAnalysis | undefined;
|
|
21
22
|
constructor(eleId: string, options: SatMapOptions, viewer?: mars3d.Cesium.Viewer);
|
|
22
23
|
createMap(eleId: string, options: SatMapOptions, viewer?: mars3d.Cesium.Viewer): Mars3dMap;
|
|
23
24
|
inited(): Promise<unknown>;
|