| | |
| | | |
| | | // 获取手机定位和激光发射定位的高度和距离 |
| | | function getTwoHeightWidth(workspaceId:String) { |
| | | // 国内地图不会为0或者小于0 |
| | | console.log('自身定位经纬度1', me_latitude) |
| | | console.log('自身定位经纬度2', me_longitude) |
| | | console.log('激光扫过定位1', measure_target_latitude) |
| | | console.log('激光扫过定位2', measure_target_longitude) |
| | | if (me_latitude <= 0 || me_longitude <= 0 || measure_target_latitude <= 0 || measure_target_longitude <= 0) return |
| | | getTwoPointInfo(workspaceId,me_latitude,me_longitude,measure_target_latitude,measure_target_longitude).then((res:any) => { |
| | | const heightDifference = res.data.heightDifference |
| | | const distance = res.data.distance |
| | |
| | | }); |
| | | } |
| | | // 查看两条线直接距离和高度 |
| | | // getTwoHeightWidth(workspaceId) |
| | | getTwoHeightWidth(workspaceId) |
| | | }, (error) => { |
| | | console.error('定位有误:', error); |
| | | }); |