Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
方 梦梦
world51tocmap
Commits
220a8221
Commit
220a8221
authored
Apr 10, 2025
by
heng.zhang3@inzymeits.com
Browse files
v2x效果
parent
79a65e8e
Changes
1
Show whitespace changes
Inline
Side-by-side
index.html
View file @
220a8221
...
...
@@ -163,6 +163,7 @@
<div>
<input
type=
"button"
id=
"startV2X"
value=
"全部车辆V2X"
/>
<input
type=
"button"
id=
"startV2X6"
value=
"6号车V2X"
/>
<input
type=
"button"
id=
"startV2X7"
value=
"7号车V2X"
/>
<input
type=
"button"
id=
"removeV2X"
value=
"清除V2X"
/>
</div>
<div>
...
...
@@ -734,7 +735,7 @@
document
.
getElementById
(
"
focusCar3
"
).
onclick
=
focusCar3
;
async
function
focusCar3
()
{
let
options
=
{
vehicleId
:
"
仿AYZQS
00
1
"
,
vehicleId
:
"
XM140
00
6
"
,
perspective
:
3
,
// 1第一人称视角、3第三人称视角
};
map
.
getVehicle
(
"
21e7a9e6d2884122804788dac1e002cc
"
).
focusVehicle
(
options
);
...
...
@@ -1163,6 +1164,13 @@
startVehicleV2X
(
url
)
}
// 7号车V2X
document
.
getElementById
(
"
startV2X7
"
).
onclick
=
startV2X7
;
function
startV2X7
()
{
const
url
=
'
wss://itg-dev.cu-sc.com:13443/WSPLUS/socket?token=111&msgType=4&reType=51world&vehicleId=269
'
startVehicleV2X
(
url
)
}
// 开始车辆V2X
function
startVehicleV2X
(
url
)
{
// let options = {
...
...
@@ -1228,6 +1236,7 @@
name
:
typeName
};
map
.
getVehicle
(
"
21e7a9e6d2884122804788dac1e002cc
"
).
startV2x
(
options
);
console
.
log
(
'
当前显示的v2x
'
,
data
)
if
(
objects
.
length
>
1
)
{
const
options2
=
{
...
...
@@ -1255,9 +1264,10 @@
id
:
lastV2x
.
id
,
color
:
[
255
,
255
,
0
,
1
],
vehicleId
:
lastV2x
.
objects
[
0
].
id
,
name
:
lastV2x
.
n
ame
name
:
lastV2x
.
typeN
ame
};
map
.
getVehicle
(
"
21e7a9e6d2884122804788dac1e002cc
"
).
startV2x
(
options
);
console
.
log
(
'
当前显示的v2x
'
,
lastV2x
)
}
const
options2
=
{
...
...
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