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
fc7ab78e
Commit
fc7ab78e
authored
Nov 17, 2025
by
xinzhedeai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add: 人员数量-》10
parent
42ce23dc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
22 deletions
+24
-22
index.vue
src/views/index.vue
+24
-22
No files found.
src/views/index.vue
View file @
fc7ab78e
...
@@ -139,31 +139,33 @@ export default {
...
@@ -139,31 +139,33 @@ export default {
y
:
4293961.185794622
,
y
:
4293961.185794622
,
z
:
3863430.5618300107
,
z
:
3863430.5618300107
,
});
});
const
longitude
=
Cesium
.
Math
.
toDegrees
(
cartographic
.
longitude
);
const
baseLongitude
=
Cesium
.
Math
.
toDegrees
(
cartographic
.
longitude
);
const
latitude
=
Cesium
.
Math
.
toDegrees
(
cartographic
.
latitude
);
const
baseLatitude
=
Cesium
.
Math
.
toDegrees
(
cartographic
.
latitude
);
const
height
=
cartographic
.
height
+
10
;
const
baseHeight
=
cartographic
.
height
+
1
;
// height
console
.
log
(
"
人员经纬度基准点:
"
,
{
// :
longitude
:
baseLongitude
,
// 75909.13761736471
latitude
:
baseLatitude
,
// latitude
height
:
baseHeight
,
// :
// 37.19751259330305
// longitude
// :
// 122.16058393814254
console
.
log
(
"
人员经纬度:
"
,
{
longitude
:
longitude
,
latitude
:
latitude
,
height
:
height
,
});
});
// 清除现有的人员列表
this
.
personnelList
=
[];
this
.
personnelList
=
[];
for
(
let
index
=
0
;
index
<
1
;
index
++
)
{
// 生成10个不同的经纬度坐标,确保它们之间的距离不超过100米
// 在经纬度上,约0.00001度的变化大约对应1米(赤道附近)
// 为了确保不超过100米,我们使用±0.00005度的随机偏移
const
maxOffset
=
0.00005
;
for
(
let
index
=
0
;
index
<
10
;
index
++
)
{
// 生成随机偏移量,确保每个点都不同但距离不远
const
lngOffset
=
(
Math
.
random
()
-
0.5
)
*
2
*
maxOffset
;
const
latOffset
=
(
Math
.
random
()
-
0.5
)
*
2
*
maxOffset
;
this
.
personnelList
.
push
({
this
.
personnelList
.
push
({
lng
:
longitude
,
lng
:
baseLongitude
+
lngOffset
,
lat
:
latitude
,
lat
:
baseLatitude
+
latOffset
,
height
:
height
+
10
*
index
,
height
:
baseHeight
,
// 高度略有不同,便于区分
perName
:
"
张三
"
+
index
,
perName
:
"
张三
"
+
index
,
status
:
"
online
"
,
// 在线
status
:
"
online
"
,
// 在线
avatar
:
"
/static/images/avatars/zhangsan.png
"
,
// 头像
avatar
:
"
/static/images/avatars/zhangsan.png
"
,
// 头像
...
...
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