|
@@ -2189,11 +2189,18 @@ export const enter = ({ dom, mapDom, isLocal, lonlat, scenes, laserRoot, laserOS
|
|
|
})
|
|
|
viewer.dispatchEvent({ type: 'cancel_insertions', dontRemove: true, measure:path }) //要等进入编辑才能继续编辑
|
|
|
}else{
|
|
|
-
|
|
|
- let originPointCount = props.points.length
|
|
|
- props.points = props.points.filter(e=> isValidPoint(e.modelId))
|
|
|
- info.points_datasets = props.points.map(e=> e.modelId == Id_noIntersect ? null : e.modelId)
|
|
|
- info.dataset_points = info.points = props.points.map(e=>e.position)//当该点不在任何模型上时,记录的是世界坐标,所以两个都赋值,过后根据有无datasetID选择
|
|
|
+ if(!props.isAnimate){
|
|
|
+ let originPointCount = props.points.length
|
|
|
+ props.points = props.points.filter(e=> isValidPoint(e.modelId))
|
|
|
+ info.points_datasets = props.points.map(e=> e.modelId == Id_noIntersect ? null : e.modelId)
|
|
|
+ info.dataset_points = info.points = props.points.map(e=>e.position)//当该点不在任何模型上时,记录的是世界坐标,所以两个都赋值,过后根据有无datasetID选择
|
|
|
+
|
|
|
+ }else{ //设备拍摄
|
|
|
+ props.points = props.points.map(e=>{
|
|
|
+ let p = viewer.transform.lonlatToLocal.forward(e)
|
|
|
+ return new THREE.Vector3().copy(p)
|
|
|
+ })
|
|
|
+ }
|
|
|
|
|
|
|
|
|
path = viewer.measuringTool.createMeasureFromData(info);
|
|
@@ -2619,11 +2626,11 @@ export const enter = ({ dom, mapDom, isLocal, lonlat, scenes, laserRoot, laserOS
|
|
|
generateAniPathData(){//输出实时路径的数据保存
|
|
|
|
|
|
|
|
|
- aniPaths.map((path,i)=>{
|
|
|
+ let dataAll = aniPaths.map((path,i)=>{
|
|
|
let data = {
|
|
|
- "id": "23",
|
|
|
+ "id": "00" + pathDevices[i].macId, //不知道存多少 怕和之前的混淆所以加一个00前缀
|
|
|
isAnimate:1,
|
|
|
- "lineColor": "#ffffff",
|
|
|
+ // "lineColor": "#ffffff",
|
|
|
"lineAltitudeAboveGround": 5,
|
|
|
// "reverseDirection": false,
|
|
|
"lineWidth": 0.5,
|
|
@@ -2633,113 +2640,14 @@ export const enter = ({ dom, mapDom, isLocal, lonlat, scenes, laserRoot, laserOS
|
|
|
"showName": true,
|
|
|
"visibilityRange": 100,
|
|
|
"globalVisibility": true,
|
|
|
- "points": [
|
|
|
- {
|
|
|
- "name": "",
|
|
|
- "position": {
|
|
|
- "x": 61.165821075439449,
|
|
|
- "y": 52.29955434799193,
|
|
|
- "z": 0.8405770063400269
|
|
|
- },
|
|
|
- "modelId": "1681"
|
|
|
- },
|
|
|
- {
|
|
|
- "name": "",
|
|
|
- "position": {
|
|
|
- "x": 60.290131078220429,
|
|
|
- "y": 57.296046628071227,
|
|
|
- "z": 0.7974704006102669
|
|
|
- },
|
|
|
- "modelId": "1681"
|
|
|
- },
|
|
|
- {
|
|
|
- "name": "",
|
|
|
- "position": {
|
|
|
- "x": 60.09387510280526,
|
|
|
- "y": 58.41587050566065,
|
|
|
- "z": 0.7878095898965118
|
|
|
- },
|
|
|
- "modelId": "1681"
|
|
|
- },
|
|
|
- {
|
|
|
- "name": "",
|
|
|
- "position": {
|
|
|
- "x": 60.048569471456648,
|
|
|
- "y": 58.6108091824631,
|
|
|
- "z": 0.7854535567855712
|
|
|
- },
|
|
|
- "modelId": "1681"
|
|
|
- },
|
|
|
- {
|
|
|
- "name": "",
|
|
|
- "position": {
|
|
|
- "x": 60.23954880237579,
|
|
|
- "y": 56.83473509550093,
|
|
|
- "z": 0.7934960126876831
|
|
|
- },
|
|
|
- "modelId": "1681"
|
|
|
- },
|
|
|
- {
|
|
|
- "name": "点0002",
|
|
|
- "position": {
|
|
|
- "x": 56.026278093457239,
|
|
|
- "y": 56.77653211355208,
|
|
|
- "z": 0.6582900285720825
|
|
|
- },
|
|
|
- "modelId": "1681"
|
|
|
- },
|
|
|
- {
|
|
|
- "name": "",
|
|
|
- "position": {
|
|
|
- "x": 53.31693539023399,
|
|
|
- "y": 56.60238111019133,
|
|
|
- "z": 0.6621419787406921
|
|
|
- },
|
|
|
- "modelId": "1681"
|
|
|
- },
|
|
|
- {
|
|
|
- "name": "",
|
|
|
- "position": {
|
|
|
- "x": 49.32521432638168,
|
|
|
- "y": 56.236895099282268,
|
|
|
- "z": 0.6764630079269409
|
|
|
- },
|
|
|
- "modelId": "1681"
|
|
|
- },
|
|
|
- {
|
|
|
- "name": "",
|
|
|
- "position": {
|
|
|
- "x": 43.09234142303467,
|
|
|
- "y": 53.5371160507202,
|
|
|
- "z": 0.7111549973487854
|
|
|
- },
|
|
|
- "modelId": "1681"
|
|
|
- },
|
|
|
- {
|
|
|
- "name": "",
|
|
|
- "position": {
|
|
|
- "x": 1.6645484654366208,
|
|
|
- "y": -11.340730483222075,
|
|
|
- "z": 10.10172544660378
|
|
|
- },
|
|
|
- "modelId": "1682"
|
|
|
- },
|
|
|
- {
|
|
|
- "name": "终点了",
|
|
|
- "position": {
|
|
|
- "x": -151.0776091953355,
|
|
|
- "y": -17.85038405136332,
|
|
|
- "z": -22.784016194117436
|
|
|
- },
|
|
|
- "modelId": "1683"
|
|
|
- }
|
|
|
- ]
|
|
|
+ "points": pathHistorys.get(pathDevices[i].macId)
|
|
|
+
|
|
|
}
|
|
|
-
|
|
|
+ return data
|
|
|
|
|
|
})
|
|
|
|
|
|
-
|
|
|
+ return dataAll
|
|
|
|
|
|
}
|
|
|
|