huweili-cesium 1.0.0 → 1.0.2
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/basis.js +1 -1
- package/cardPool.js +2 -2
- package/clickHandler.js +3 -3
- package/customToolbarButtons.js +2 -2
- package/drawFence.js +1 -1
- package/drawFenceNew.js +2 -2
- package/geometry.js +1 -1
- package/groundLink.js +2 -2
- package/hemisphere.js +2 -2
- package/labelDiv.js +4 -3
- package/movePath.js +2 -2
- package/movePoint.js +3 -3
- package/package.json +1 -1
- package/qrCodeGenerator.js +4 -4
- package/setPath.js +2 -2
- package/setPoint.js +2 -2
- package/toolbar/zoomController.js +1 -1
package/basis.js
CHANGED
package/cardPool.js
CHANGED
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
* @version 1.0.0
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
import { deselectDrone } from '
|
|
13
|
-
import { useMapStore } from '
|
|
12
|
+
import { deselectDrone } from './utils/droneSelection.js'
|
|
13
|
+
import { useMapStore } from './stores/mapStore.js'
|
|
14
14
|
|
|
15
15
|
/********************************************************************** 飞手点位信息牌 ************************************************************************************************* */
|
|
16
16
|
|
package/clickHandler.js
CHANGED
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
* @version 1.0.0
|
|
8
8
|
*/
|
|
9
9
|
import * as Cesium from 'cesium'
|
|
10
|
-
import { useMapStore } from '
|
|
11
|
-
import { useEventBus } from '
|
|
12
|
-
import { selectDrone } from '
|
|
10
|
+
import { useMapStore } from './stores/mapStore.js'
|
|
11
|
+
import { useEventBus } from './utils/useEventBus.js'
|
|
12
|
+
import { selectDrone } from './utils/droneSelection.js'
|
|
13
13
|
|
|
14
14
|
// 无人机详情面板打开器(按无人机id索引)
|
|
15
15
|
const droneDetailOpeners = new Map()
|
package/customToolbarButtons.js
CHANGED
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
* @version 1.0.0
|
|
7
7
|
*/
|
|
8
8
|
import { basicConfig } from './basis'
|
|
9
|
-
import { getMapCenterPosition } from '
|
|
9
|
+
import { getMapCenterPosition } from './utils/getMapCenterPosition.js'
|
|
10
10
|
import { createCompassButton, resetCompassDirection } from './toolbar/compass'
|
|
11
11
|
import { createBasemapSwitcher } from './toolbar/basemapSwitcher'
|
|
12
12
|
import { createZoomController } from './toolbar/zoomController'
|
|
13
13
|
import { createFullscreenController } from './toolbar/fullscreenController'
|
|
14
|
-
import { useEventBus } from '
|
|
14
|
+
import { useEventBus } from './utils/useEventBus.js'
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* 创建自定义工具栏按钮
|
package/drawFence.js
CHANGED
package/drawFenceNew.js
CHANGED
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
* @version 1.0.0
|
|
10
10
|
*/
|
|
11
11
|
import * as Cesium from 'cesium'
|
|
12
|
-
import { useMapStore } from '
|
|
13
|
-
import { BaseConfig } from '
|
|
12
|
+
import { useMapStore } from './stores/mapStore.js'
|
|
13
|
+
import { BaseConfig } from './config/index.js'
|
|
14
14
|
|
|
15
15
|
export function drawFenceNew() {
|
|
16
16
|
const mapStore = useMapStore()
|
package/geometry.js
CHANGED
package/groundLink.js
CHANGED
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
* @version 1.0.0
|
|
9
9
|
*/
|
|
10
10
|
import * as Cesium from 'cesium'
|
|
11
|
-
import { useMapStore } from '
|
|
12
|
-
import { DroneStatus, DroneStatusMap } from '
|
|
11
|
+
import { useMapStore } from './stores/mapStore.js'
|
|
12
|
+
import { DroneStatus, DroneStatusMap } from './config/index.js'
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* 地面连接线功能
|
package/hemisphere.js
CHANGED
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
* @version 1.0.0
|
|
10
10
|
*/
|
|
11
11
|
import * as Cesium from 'cesium'
|
|
12
|
-
import { BaseConfig } from '
|
|
13
|
-
import { useMapStore } from '
|
|
12
|
+
import { BaseConfig } from './config/index.js';
|
|
13
|
+
import { useMapStore } from './stores/mapStore.js'
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* 半球体实体管理配置函数
|
package/labelDiv.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as Cesium from 'cesium';
|
|
2
|
-
import { DroneStatus, DroneStatusMap } from '
|
|
2
|
+
import { DroneStatus, DroneStatusMap } from './config/index.js'
|
|
3
3
|
import { getDroneLabelBatchManager } from './cardPool'
|
|
4
4
|
import { bindDroneLabelDetailHandler } from './clickHandler'
|
|
5
|
-
import { deselectDrone } from '
|
|
6
|
-
import { useMapStore } from '
|
|
5
|
+
import { deselectDrone } from './utils/droneSelection.js'
|
|
6
|
+
import { useMapStore } from './stores/mapStore.js'
|
|
7
7
|
|
|
8
8
|
// 浏览器识别到这个命名空间后,就会把里面的标签(如 <circle>、<path>)当成 SVG 元素来解析渲染,整个过程完全在本地完成,和网络无关
|
|
9
9
|
const SVG_NS = 'http://www.w3.org/2000/svg';
|
|
@@ -180,6 +180,7 @@ export function labelDiv() {
|
|
|
180
180
|
detailDiv.style.setProperty('--drone-bg-color', statusConfig.backgroundColor);
|
|
181
181
|
detailDiv.style.setProperty('--drone-border-color', statusConfig.borderColor);
|
|
182
182
|
detailDiv.style.setProperty('--drone-text-color', statusConfig.textColor);
|
|
183
|
+
detailDiv.style.setProperty('--drone-detail-divider-color', statusConfig.detailDividerColor);
|
|
183
184
|
}
|
|
184
185
|
|
|
185
186
|
// 统一使用一个 badge class,在 badge span 元素上设置背景图片
|
package/movePath.js
CHANGED
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
* @version 1.0.0
|
|
10
10
|
*/
|
|
11
11
|
import * as Cesium from 'cesium'
|
|
12
|
-
import { useMapStore } from '
|
|
13
|
-
import { DroneConfig } from '
|
|
12
|
+
import { useMapStore } from './stores/mapStore.js'
|
|
13
|
+
import { DroneConfig } from './config/index.js'
|
|
14
14
|
|
|
15
15
|
const scratchCutoffTime = new Cesium.JulianDate()
|
|
16
16
|
|
package/movePoint.js
CHANGED
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
* @version 1.0.0
|
|
9
9
|
*/
|
|
10
10
|
import * as Cesium from 'cesium'
|
|
11
|
-
import { useMapStore } from '
|
|
12
|
-
import { useEventBus } from '
|
|
13
|
-
import { DroneStatus } from '
|
|
11
|
+
import { useMapStore } from './stores/mapStore.js'
|
|
12
|
+
import { useEventBus } from './utils/useEventBus.js'
|
|
13
|
+
import { DroneStatus } from './config/index.js'
|
|
14
14
|
import { setPoint } from './setPoint'
|
|
15
15
|
import { getClickHandler } from './clickHandler'
|
|
16
16
|
import { movePathConfig } from './movePath'
|
package/package.json
CHANGED
package/qrCodeGenerator.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { getAddressByLocation } from '
|
|
1
|
+
import { toDataURL } from 'qrcode'
|
|
2
|
+
import { getAddressByLocation } from './api/gaode.js'
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* 二维码生成工具
|
|
@@ -280,7 +280,7 @@ export const generateQRCode = async (cardElement, lng, lat, isRefresh = false) =
|
|
|
280
280
|
const baseLargeSize = 200
|
|
281
281
|
|
|
282
282
|
// 生成小二维码(高清)
|
|
283
|
-
const qrCodeDataUrl = await
|
|
283
|
+
const qrCodeDataUrl = await toDataURL(navUrl, {
|
|
284
284
|
width: baseSmallSize * dpr,
|
|
285
285
|
margin: 2,
|
|
286
286
|
errorCorrectionLevel: 'M',
|
|
@@ -294,7 +294,7 @@ export const generateQRCode = async (cardElement, lng, lat, isRefresh = false) =
|
|
|
294
294
|
}
|
|
295
295
|
|
|
296
296
|
// 生成大二维码(高清)
|
|
297
|
-
const qrCodeDataUrlLarge = await
|
|
297
|
+
const qrCodeDataUrlLarge = await toDataURL(navUrl, {
|
|
298
298
|
width: baseLargeSize * dpr,
|
|
299
299
|
margin: 2,
|
|
300
300
|
errorCorrectionLevel: 'M',
|
package/setPath.js
CHANGED
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
* @version 1.0.0
|
|
9
9
|
*/
|
|
10
10
|
import * as Cesium from 'cesium'
|
|
11
|
-
import { useMapStore } from '
|
|
12
|
-
import { DroneStatus, DroneStatusMap, MapInstanceIds } from '
|
|
11
|
+
import { useMapStore } from './stores/mapStore.js'
|
|
12
|
+
import { DroneStatus, DroneStatusMap, MapInstanceIds } from './config/index.js'
|
|
13
13
|
|
|
14
14
|
export function setPath() {
|
|
15
15
|
// 获取地图store实例
|
package/setPoint.js
CHANGED
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
* @version 1.0.0
|
|
9
9
|
*/
|
|
10
10
|
import * as Cesium from 'cesium'
|
|
11
|
-
import { useMapStore } from '
|
|
11
|
+
import { useMapStore } from './stores/mapStore.js'
|
|
12
12
|
import { setPath } from './setPath'
|
|
13
13
|
import { labelDiv } from './labelDiv'
|
|
14
14
|
import { getClickHandler } from './clickHandler'
|
|
15
|
-
import { DroneStatus, DroneStatusMap, MapInstanceIds } from '
|
|
15
|
+
import { DroneStatus, DroneStatusMap, MapInstanceIds } from './config/index.js'
|
|
16
16
|
import { pointGetPool, PonitInfoCardPool } from './cardPool'
|
|
17
17
|
import { generateQRCode } from './qrCodeGenerator'
|
|
18
18
|
import { createDroneRippleDom } from './droneRipple'
|