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

提交

parent e84c01ea
......@@ -143,8 +143,9 @@
<input type="button" id="DeleteTIMSignal" value="删除停止线" />
</div>
<div>
<input type="button" id="addTrafficIncident" value="开始交通事件" />
<!-- <input type="button" id="removeTrafficIncident" value="结束交通事件" /> -->
<input type="button" id="addTrafficIncident" value="交通流中的事件" />
<input type="button" id="addTrafficIncident2" value="不在交通流中的事件" />
<input type="button" id="addTrafficIncident3" value="区域坐标的交通事件" />
</div>
<div>
<input type="button" id="bindHistoryVehicle" value="开始历史轨迹" />
......@@ -922,44 +923,143 @@
camera.flyTo(options);
const json = {
msgId: "973fcdea-e1ea-4fe7-af1c-9ea4e7b637af",
msgType: "ROADSIDE_TRAFFIC_EVENT",
deviceId: null,
collectTime: null,
reportTime: 1741777564646,
receiveTime: null,
message: {
id: "600354",
type: "ROADSIDE_TRAFFIC_EVENT",
type: "1",
name: "异常停车预警",
// ptcIds: ['1200002282'], //字符串数组
location: [
"id": "600286",
"type": "ROADSIDE_TRAFFIC_EVENT",
"name": "异常停车预警",
"ptcIds": ['1200002282'], //字符串数组
"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,
eventStatus: 0,
},
"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("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);
console.log("tc.................", trafficIncidentArr);
let index = 0;
const timer = setInterval(async () => {
if (index == 20) {
if (index == 10) {
json.endTime = 1741777564646;
trafficIncidentArr = await map.renderTrafficIncident(json);
clearInterval(timer);
......@@ -1050,8 +1150,9 @@
function startV2X() {
let options = {
color: [255, 255, 0, 1],
// vehicleId: "仿AYZQS001", //鄂A17U5N
vehicleId: "测试车辆001", //鄂A17U5N
vehicleId: "仿AYZQS001", //鄂A17U5N
objectId: "1200000479", // 连接车辆的效果
// vehicleId: "测试车辆001", //鄂A17U5N
name: '注意行人'
};
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