首页项目中心点图标修改,机场图标修改
parent
0ec3d35163
commit
e829c58994
Binary file not shown.
|
After Width: | Height: | Size: 5.7 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 779 B |
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 789 B |
|
|
@ -406,23 +406,15 @@ const getLocationCenter = () => {
|
|||
const position = { lng: lon, lat }
|
||||
project.value.centerLng = lon
|
||||
project.value.centerLat = lat
|
||||
const pointGraphic = new mars3d.graphic.PointEntity({
|
||||
const pointGraphic = new mars3d.graphic.BillboardEntity({
|
||||
position: Cesium.Cartesian3.fromDegrees(lon, lat, height),
|
||||
style: {
|
||||
color: '#ff0000',
|
||||
pixelSize: 10,
|
||||
outlineColor: '#ffffff',
|
||||
outlineWidth: 2,
|
||||
label: {
|
||||
text: `经度: ${lon.toFixed(6)}\n纬度: ${lat.toFixed(6)}`,
|
||||
font_size: 16,
|
||||
color: '#000000',
|
||||
outline: true,
|
||||
outlineColor: '#ffffff',
|
||||
horizontalOrigin: Cesium.HorizontalOrigin.LEFT,
|
||||
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
|
||||
pixelOffsetY: -20
|
||||
}
|
||||
image: '/projecthome/project_location.png',
|
||||
width: 53,
|
||||
height: 97,
|
||||
scale: 1,
|
||||
horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
|
||||
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
|
||||
}
|
||||
})
|
||||
props.graphicLayer.clear()
|
||||
|
|
|
|||
|
|
@ -85,6 +85,7 @@ const selectProject = (item) => {
|
|||
if(props.activeProject != item.Id){
|
||||
props.airPort.latitude = null
|
||||
props.airPort.longitude = null
|
||||
props.airPort.mode_code = null
|
||||
getClient().unsubscribe(lastSubscriptUrl.value,(error, res) => {})
|
||||
}
|
||||
emits('update:activeProject',item.Id)
|
||||
|
|
@ -99,24 +100,16 @@ const selectProject = (item) => {
|
|||
})
|
||||
let { centerLat:lat, centerLng: lon } = res.workspace
|
||||
const position:any = [lon, lat]
|
||||
const pointGraphic = new mars3d.graphic.PointEntity({
|
||||
const pointGraphic = new mars3d.graphic.BillboardEntity({
|
||||
position: position,
|
||||
style: {
|
||||
color: '#ff0000',
|
||||
pixelSize: 10,
|
||||
outlineColor: '#ffffff',
|
||||
outlineWidth: 2,
|
||||
image: '/projecthome/project_location.png',
|
||||
width: 53,
|
||||
height: 97,
|
||||
scale: 1,
|
||||
horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
|
||||
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
|
||||
clampToGround: true,
|
||||
label: {
|
||||
text: `${res.workspace.workspaceName}`,
|
||||
font_size: 16,
|
||||
color: '#000000',
|
||||
outline: true,
|
||||
outlineColor: '#ffffff',
|
||||
horizontalOrigin: Cesium.HorizontalOrigin.LEFT,
|
||||
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
|
||||
pixelOffsetY: -20
|
||||
}
|
||||
}
|
||||
})
|
||||
graphicLayer.value.clear()
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ const airRoute = ref({
|
|||
const airPort = ref({
|
||||
latitude: null,
|
||||
longitude: null,
|
||||
mode_code: null,
|
||||
});
|
||||
const activeProject = ref('')
|
||||
const DESIGN_WIDTH = 1912
|
||||
|
|
@ -76,6 +77,7 @@ const connectionCallback = () => {
|
|||
if (rs.data.latitude && rs.data.longitude) {
|
||||
airPort.value.latitude = rs.data.latitude;
|
||||
airPort.value.longitude = rs.data.longitude;
|
||||
airPort.value.mode_code = rs.data.mode_code;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -211,6 +211,7 @@ const generatePreviewPoint = (placemark)=>{
|
|||
|
||||
// 项目首页机场位置
|
||||
let homeStartGraphic;
|
||||
let homeStartGraphicLive;
|
||||
|
||||
let graphic = null;
|
||||
|
||||
|
|
@ -1665,21 +1666,26 @@ const loadChangGuangLayer = ()=>{
|
|||
// 项目首页设置机场位置
|
||||
const homeSetAirportPosition = () => {
|
||||
if(!graphicLayer){
|
||||
return
|
||||
}
|
||||
// // 创建点的经纬度信息
|
||||
let position = [props.homeAirport.longitude, props.homeAirport.latitude, 70];
|
||||
// 更新航点
|
||||
if (homeStartGraphic) {
|
||||
homeStartGraphic.position = position
|
||||
} else {
|
||||
homeStartGraphic = new mars3d.graphic.BillboardEntity({
|
||||
id: 'set-home-airport',
|
||||
position: position,
|
||||
style: {
|
||||
image: '/projecthome/airport.png',
|
||||
width: 35,
|
||||
height: 59,
|
||||
return
|
||||
}
|
||||
// // 创建点的经纬度信息
|
||||
let position = [props.homeAirport.longitude, props.homeAirport.latitude, 70];
|
||||
let airportImg = props.homeAirport.mode_code == 4? '/projecthome/work_airport.png': '/projecthome/standby_airport.png'
|
||||
let airportLiveImg = props.homeAirport.mode_code == 4? '/projecthome/work_airport_live.png': '/projecthome/standby_airport_live.png'
|
||||
// 更新航点
|
||||
if (homeStartGraphic && homeStartGraphicLive) {
|
||||
homeStartGraphic.position = position
|
||||
homeStartGraphic.image = airportImg
|
||||
homeStartGraphicLive.position = position
|
||||
homeStartGraphicLive.image = airportLiveImg
|
||||
} else {
|
||||
homeStartGraphic = new mars3d.graphic.BillboardEntity({
|
||||
id: 'set-home-airport',
|
||||
position: position,
|
||||
style: {
|
||||
image: airportImg,
|
||||
width: 118,
|
||||
height: 133,
|
||||
scale: 1,
|
||||
horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
|
||||
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
|
||||
|
|
@ -1691,12 +1697,34 @@ const loadChangGuangLayer = ()=>{
|
|||
outlineColor: '#000000',
|
||||
pixelOffsetY: -70,
|
||||
},
|
||||
},
|
||||
});
|
||||
homeStartGraphicLive = new mars3d.graphic.BillboardEntity({
|
||||
id: 'set-home-airport-live',
|
||||
position: position,
|
||||
style: {
|
||||
image: airportLiveImg,
|
||||
width: 21,
|
||||
height: 21,
|
||||
scale: 1,
|
||||
horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
|
||||
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
|
||||
pixelOffset: new Cesium.Cartesian2(45, -107),
|
||||
label: {
|
||||
text: '机场',
|
||||
font_size: 14,
|
||||
color: '#ffffff',
|
||||
outline: true,
|
||||
outlineColor: '#000000',
|
||||
pixelOffsetY: -70,
|
||||
},
|
||||
},
|
||||
});
|
||||
homeStartGraphic.on(mars3d.EventType.click, function (event) {
|
||||
emits('clickAirPort')
|
||||
});
|
||||
graphicLayer.addGraphic(homeStartGraphic);
|
||||
graphicLayer.addGraphic(homeStartGraphicLive);
|
||||
}
|
||||
}
|
||||
// 设置无人机轨迹
|
||||
|
|
|
|||
Loading…
Reference in New Issue