Commit ee69e0db authored by heng.zhang3@inzymeits.com's avatar heng.zhang3@inzymeits.com
Browse files

提交

parent e84c01ea
...@@ -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: { longitude: 117.32559766689558,
id: "600354", latitude: 38.99628656347781,
type: "ROADSIDE_TRAFFIC_EVENT", elevation: null,
type: "1", }
name: "异常停车预警", ],
// ptcIds: ['1200002282'], //字符串数组 "level": 1,
location: [ "description": null,
{ "imagesUrl": null,
longitude: 117.32559766689558, "videosUrl": null,
latitude: 38.99628656347781, "startTime": null,
elevation: null, "endTime": null,
}, "reportTime": null,
], "mqttTime": null,
level: 1, "accessTime": null
description: null, }
imagesUrl: null,
videosUrl: null, trafficIncidentArr = await map.renderTrafficIncident(json);
startTime: null, console.log("tc.................", trafficIncidentArr);
endTime: null,
reportTime: null, let index = 0;
mqttTime: null, const timer = setInterval(async () => {
accessTime: null, if (index == 10) {
eventStatus: 0, 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 == 20) { if (index == 10) {
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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment