Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
JINRUN-DP
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xinzhedeai
JINRUN-DP
Commits
1714e996
Commit
1714e996
authored
Nov 18, 2025
by
xinzhedeai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add:禁用infobox 隐藏工具栏cesium自带
parent
8a90e89b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
54 deletions
+54
-54
index.vue
src/views/index.vue
+54
-54
No files found.
src/views/index.vue
View file @
1714e996
...
@@ -497,7 +497,7 @@ export default {
...
@@ -497,7 +497,7 @@ export default {
if
(
this
.
selectedPerson
)
{
if
(
this
.
selectedPerson
)
{
this
.
updateTrailDisplay
();
this
.
updateTrailDisplay
();
}
}
},
5000
);
// 每5秒更新一次
},
5000
000
);
// 每5秒更新一次
},
},
// 停止实时追踪
// 停止实时追踪
...
@@ -611,12 +611,12 @@ export default {
...
@@ -611,12 +611,12 @@ export default {
// 配置是否显示各种控件
// 配置是否显示各种控件
animation
:
false
,
// 动画控件
animation
:
false
,
// 动画控件
baseLayerPicker
:
true
,
// 底图选择器
baseLayerPicker
:
true
,
// 底图选择器
fullscreenButton
:
tru
e
,
// 全屏按钮
fullscreenButton
:
fals
e
,
// 全屏按钮
geocoder
:
tru
e
,
// 地址搜索
geocoder
:
fals
e
,
// 地址搜索
homeButton
:
tru
e
,
// 主页按钮
homeButton
:
fals
e
,
// 主页按钮
infoBox
:
tru
e
,
// 信息框
infoBox
:
fals
e
,
// 信息框
sceneModePicker
:
tru
e
,
// 场景模式选择器
sceneModePicker
:
fals
e
,
// 场景模式选择器
selectionIndicator
:
tru
e
,
// 选择指示器
selectionIndicator
:
fals
e
,
// 选择指示器
timeline
:
false
,
// 时间线
timeline
:
false
,
// 时间线
navigationHelpButton
:
false
,
// 导航帮助按钮
navigationHelpButton
:
false
,
// 导航帮助按钮
navigationInstructionsInitiallyVisible
:
false
,
navigationInstructionsInitiallyVisible
:
false
,
...
@@ -743,57 +743,57 @@ export default {
...
@@ -743,57 +743,57 @@ export default {
},
},
createPersonModel
()
{
createPersonModel
()
{
if
(
!
this
.
personModelInterval
)
{
if
(
!
this
.
personModelInterval
)
{
this
.
personModelInterval
=
setInterval
(()
=>
{
// this.personModelInterval = setInterval(() => {
console
.
log
(
"
开始获取实时数据
"
);
console
.
log
(
"
开始获取实时数据
"
);
if
(
this
.
bgEntities
)
{
if
(
this
.
bgEntities
)
{
for
(
let
key
in
this
.
bgEntities
)
{
for
(
let
key
in
this
.
bgEntities
)
{
if
(
isNaN
(
parseFloat
(
key
)))
{
if
(
isNaN
(
parseFloat
(
key
)))
{
// 非数字键名的是人员实体
// 非数字键名的是人员实体
this
.
viewer
.
entities
.
remove
(
this
.
bgEntities
[
key
]);
this
.
viewer
.
entities
.
remove
(
this
.
bgEntities
[
key
]);
delete
this
.
bgEntities
[
key
];
delete
this
.
bgEntities
[
key
];
}
}
}
}
}
}
// 从API获取最新的人员定位数据
// 从API获取最新的人员定位数据
this
.
personCardList
((
list
)
=>
{
this
.
personCardList
((
list
)
=>
{
console
.
log
(
"
人员数据
"
,
this
.
personnelList
);
console
.
log
(
"
人员数据
"
,
this
.
personnelList
);
// 创建新实体
// 创建新实体
for
(
let
item
of
this
.
personnelList
)
{
for
(
let
item
of
this
.
personnelList
)
{
let
lng
=
Number
(
item
.
lng
);
let
lng
=
Number
(
item
.
lng
);
let
lat
=
Number
(
item
.
lat
);
let
lat
=
Number
(
item
.
lat
);
let
height
=
Number
(
item
.
height
);
let
height
=
Number
(
item
.
height
);
let
position
=
Cesium
.
Cartesian3
.
fromDegrees
(
lng
,
lat
,
height
);
let
position
=
Cesium
.
Cartesian3
.
fromDegrees
(
lng
,
lat
,
height
);
console
.
log
(
item
.
perName
,
position
);
console
.
log
(
item
.
perName
,
position
);
// 创建人员标记
// 创建人员标记
let
entity
=
this
.
viewer
.
entities
.
add
({
let
entity
=
this
.
viewer
.
entities
.
add
({
position
:
position
,
position
:
position
,
label
:
{
label
:
{
text
:
item
.
perName
,
text
:
item
.
perName
,
font
:
"
16px
"
,
font
:
"
16px
"
,
backgroundColor
:
Cesium
.
Color
.
fromCssColorString
(
"
#173349
"
),
backgroundColor
:
Cesium
.
Color
.
fromCssColorString
(
"
#173349
"
),
showBackground
:
true
,
showBackground
:
true
,
fillColor
:
Cesium
.
Color
.
YELLOW
,
fillColor
:
Cesium
.
Color
.
YELLOW
,
depthTestAgainstTerrain
:
false
,
// 禁用地形深度测试
depthTestAgainstTerrain
:
false
,
// 禁用地形深度测试
pixelOffset
:
new
Cesium
.
Cartesian2
(
0
,
-
35
),
pixelOffset
:
new
Cesium
.
Cartesian2
(
0
,
-
35
),
},
},
billboard
:
{
billboard
:
{
image
:
"
/poi-marker-default.png
"
,
image
:
"
/poi-marker-default.png
"
,
scale
:
0.5
,
scale
:
0.5
,
},
},
description
:
`<div><h4>
${
item
.
perName
}${
item
.
status
}
</h4></div>`
,
description
:
`<div><h4>
${
item
.
perName
}${
item
.
status
}
</h4></div>`
,
fixedFrame
:
Cesium
.
Transforms
.
eastNorthUpToFixedFrame
(
position
),
fixedFrame
:
Cesium
.
Transforms
.
eastNorthUpToFixedFrame
(
position
),
});
});
entity
.
info
=
item
;
// 添加 info 属性
entity
.
info
=
item
;
// 添加 info 属性
this
.
bgEntities
[
item
.
perName
]
=
entity
;
// 存储新实体
this
.
bgEntities
[
item
.
perName
]
=
entity
;
// 存储新实体
}
}
// 如果已经选择了人员,更新其位置和轨迹
// 如果已经选择了人员,更新其位置和轨迹
if
(
this
.
selectedPerson
)
{
if
(
this
.
selectedPerson
)
{
this
.
updatePersonPositionByTimeIndex
(
this
.
currentTimeIndex
);
this
.
updatePersonPositionByTimeIndex
(
this
.
currentTimeIndex
);
}
}
});
});
},
1
0000
);
// 每10秒刷新一次
// }, 50
0000); // 每10秒刷新一次
}
}
},
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment