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
ee69e0db
Commit
ee69e0db
authored
Apr 02, 2025
by
heng.zhang3@inzymeits.com
Browse files
提交
parent
e84c01ea
Changes
1
Show whitespace changes
Inline
Side-by-side
index.html
View file @
ee69e0db
...
@@ -143,8 +143,9 @@
...
@@ -143,8 +143,9 @@
<input
type=
"button"
id=
"DeleteTIMSignal"
value=
"删除停止线"
/>
<input
type=
"button"
id=
"DeleteTIMSignal"
value=
"删除停止线"
/>
</div>
</div>
<div>
<div>
<input
type=
"button"
id=
"addTrafficIncident"
value=
"开始交通事件"
/>
<input
type=
"button"
id=
"addTrafficIncident"
value=
"交通流中的事件"
/>
<!-- <input type="button" id="removeTrafficIncident" value="结束交通事件" /> -->
<input
type=
"button"
id=
"addTrafficIncident2"
value=
"不在交通流中的事件"
/>
<input
type=
"button"
id=
"addTrafficIncident3"
value=
"区域坐标的交通事件"
/>
</div>
</div>
<div>
<div>
<input
type=
"button"
id=
"bindHistoryVehicle"
value=
"开始历史轨迹"
/>
<input
type=
"button"
id=
"bindHistoryVehicle"
value=
"开始历史轨迹"
/>
...
@@ -922,44 +923,143 @@
...
@@ -922,44 +923,143 @@
camera
.
flyTo
(
options
);
camera
.
flyTo
(
options
);
const
json
=
{
const
json
=
{
msgId
:
"
973fcdea-e1ea-4fe7-af1c-9ea4e7b637af
"
,
"
id
"
:
"
600286
"
,
msgType
:
"
ROADSIDE_TRAFFIC_EVENT
"
,
"
type
"
:
"
ROADSIDE_TRAFFIC_EVENT
"
,
deviceId
:
null
,
"
name
"
:
"
异常停车预警
"
,
collectTime
:
null
,
"
ptcIds
"
:
[
'
1200002282
'
],
//字符串数组
reportTime
:
1741777564646
,
"
location
"
:
[
receiveTime
:
null
,
message
:
{
id
:
"
600354
"
,
type
:
"
ROADSIDE_TRAFFIC_EVENT
"
,
type
:
"
1
"
,
name
:
"
异常停车预警
"
,
// ptcIds: ['1200002282'], //字符串数组
location
:
[
{
{
longitude
:
117.32559766689558
,
longitude
:
117.32559766689558
,
latitude
:
38.99628656347781
,
latitude
:
38.99628656347781
,
elevation
:
null
,
elevation
:
null
,
},
}
],
],
level
:
1
,
"
level
"
:
1
,
description
:
null
,
"
description
"
:
null
,
imagesUrl
:
null
,
"
imagesUrl
"
:
null
,
videosUrl
:
null
,
"
videosUrl
"
:
null
,
startTime
:
null
,
"
startTime
"
:
null
,
endTime
:
null
,
"
endTime
"
:
null
,
reportTime
:
null
,
"
reportTime
"
:
null
,
mqttTime
:
null
,
"
mqttTime
"
:
null
,
accessTime
:
null
,
"
accessTime
"
:
null
eventStatus
:
0
,
}
},
trafficIncidentArr
=
await
map
.
renderTrafficIncident
(
json
);
console
.
log
(
"
tc.................
"
,
trafficIncidentArr
);
let
index
=
0
;
const
timer
=
setInterval
(
async
()
=>
{
if
(
index
==
10
)
{
json
.
endTime
=
1741777564646
;
trafficIncidentArr
=
await
map
.
renderTrafficIncident
(
json
);
clearInterval
(
timer
);
}
index
++
;
},
200
);
}
// 不在交通流中的交通事件
document
.
getElementById
(
"
addTrafficIncident2
"
).
onclick
=
addTrafficIncident2
;
async
function
addTrafficIncident2
()
{
let
options
=
{
position
:
[
117.325401
,
38.996133
,
28.12
],
orientation
:
[
-
34.930073
,
-
44.426579
],
};
camera
.
flyTo
(
options
);
const
json
=
{
"
id
"
:
"
600286
"
,
"
type
"
:
"
ROAD_ICE
"
,
"
name
"
:
"
道路结冰
"
,
"
ptcIds
"
:
null
,
"
location
"
:
[
{
longitude
:
117.32559766689558
,
latitude
:
38.99628656347781
,
elevation
:
null
,
}
],
"
level
"
:
1
,
"
description
"
:
null
,
"
imagesUrl
"
:
null
,
"
videosUrl
"
:
null
,
"
startTime
"
:
null
,
"
endTime
"
:
null
,
"
reportTime
"
:
null
,
"
mqttTime
"
:
null
,
"
accessTime
"
:
null
}
trafficIncidentArr
=
await
map
.
renderTrafficIncident
(
json
);
console
.
log
(
"
tc.................
"
,
trafficIncidentArr
);
let
index
=
0
;
const
timer
=
setInterval
(
async
()
=>
{
if
(
index
==
10
)
{
json
.
endTime
=
1741777564646
;
trafficIncidentArr
=
await
map
.
renderTrafficIncident
(
json
);
clearInterval
(
timer
);
}
index
++
;
},
200
);
}
// 区域坐标的交通事件
document
.
getElementById
(
"
addTrafficIncident3
"
).
onclick
=
addTrafficIncident3
;
async
function
addTrafficIncident3
()
{
let
options
=
{
position
:
[
117.325401
,
38.996133
,
28.12
],
orientation
:
[
-
34.930073
,
-
44.426579
],
};
};
camera
.
flyTo
(
options
);
const
json
=
{
"
id
"
:
"
600286
"
,
"
type
"
:
"
TRAFFIC_CONGESTION
"
,
"
name
"
:
"
交通拥堵
"
,
"
ptcIds
"
:
null
,
"
location
"
:
[
{
longitude
:
117.32564783
,
latitude
:
38.99632990
,
elevation
:
null
,
},
{
longitude
:
117.32611745
,
latitude
:
38.99734492
,
elevation
:
null
,
},
{
longitude
:
117.32596738
,
latitude
:
38.99737506
,
elevation
:
null
,
},
{
longitude
:
117.32552220
,
latitude
:
38.99636725
,
elevation
:
null
,
},
],
"
level
"
:
1
,
"
description
"
:
null
,
"
imagesUrl
"
:
null
,
"
videosUrl
"
:
null
,
"
startTime
"
:
null
,
"
endTime
"
:
null
,
"
reportTime
"
:
null
,
"
mqttTime
"
:
null
,
"
accessTime
"
:
null
}
trafficIncidentArr
=
await
map
.
renderTrafficIncident
(
json
);
trafficIncidentArr
=
await
map
.
renderTrafficIncident
(
json
);
console
.
log
(
"
tc.................
"
,
trafficIncidentArr
);
console
.
log
(
"
tc.................
"
,
trafficIncidentArr
);
let
index
=
0
;
let
index
=
0
;
const
timer
=
setInterval
(
async
()
=>
{
const
timer
=
setInterval
(
async
()
=>
{
if
(
index
==
2
0
)
{
if
(
index
==
1
0
)
{
json
.
endTime
=
1741777564646
;
json
.
endTime
=
1741777564646
;
trafficIncidentArr
=
await
map
.
renderTrafficIncident
(
json
);
trafficIncidentArr
=
await
map
.
renderTrafficIncident
(
json
);
clearInterval
(
timer
);
clearInterval
(
timer
);
...
@@ -1050,8 +1150,9 @@
...
@@ -1050,8 +1150,9 @@
function
startV2X
()
{
function
startV2X
()
{
let
options
=
{
let
options
=
{
color
:
[
255
,
255
,
0
,
1
],
color
:
[
255
,
255
,
0
,
1
],
// vehicleId: "仿AYZQS001", //鄂A17U5N
vehicleId
:
"
仿AYZQS001
"
,
//鄂A17U5N
vehicleId
:
"
测试车辆001
"
,
//鄂A17U5N
objectId
:
"
1200000479
"
,
// 连接车辆的效果
// vehicleId: "测试车辆001", //鄂A17U5N
name
:
'
注意行人
'
name
:
'
注意行人
'
};
};
map
.
getVehicle
(
"
21e7a9e6d2884122804788dac1e002cc
"
).
startV2x
(
options
);
map
.
getVehicle
(
"
21e7a9e6d2884122804788dac1e002cc
"
).
startV2x
(
options
);
...
...
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