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

提交

parent ee69e0db
This diff is collapsed.
......@@ -22,11 +22,14 @@
#btn-list {
position: fixed;
left: 0;
right: 0;
top: 0;
z-index: 1;
padding: 14px;
line-height: 40px;
overflow: auto;
height: 100%;
margin-bottom: 20px;
}
#btn-list>div>[type="button"] {
......@@ -35,9 +38,12 @@
border: 0;
padding: 4px 6px;
border-radius: 4px;
margin-bottom: 10px;
cursor: pointer;
}
#btn-list>div:last-child {
margin-bottom: 20px;
}
</style>
<body>
......@@ -169,11 +175,15 @@
<input type="button" id="cancelModelHighlight" value="清除场景内模型高亮" />
<input type="button" id="modelClickRemove" value="注销场景内模型点击事件" />
</div>
<div>
<input type="button" id="addMillimeterWave" value="毫米波雷达" />
<input type="button" id="removeMillimeterWave" value="移除毫米波雷达" />
</div>
</div>
<div id="main-container" style="width: 100vw; height: 100vh; overflow: hidden"></div>
</body>
<script src="http://localhost:3000/gis_sdk/js/CMapLoader.map.js"></script>
<script src="./pathplan.js"></script>
<script src="./SignalLines.js"></script>
</head>
<script>
......@@ -692,7 +702,7 @@
async function addTrafficFlow() {
const json = {
id: '21e7a9e6d2884122804788dac1e002cc',
url: 'ws://192.168.60.137:31000/ws/streamer/b35bb454ccdb4c57b5529bb2976c02c8'
url: 'ws://192.168.60.137:31000/ws/streamer/7b246f3660c747fa8716d1971e349518'
}
map.bindVehicle(json)
}
......@@ -788,7 +798,7 @@
const json = {
id: "111", //ID
// url: "ws://192.168.60.137:33011/InfoTrans", //
url: 'ws://192.168.60.137:31000/ws/streamer/7d72c2a7c3b4440c8a975a3205316171'
url: 'ws://192.168.60.137:31000/ws/streamer/bccfcc892d424160a50a802a12d4c5f7'
};
perceptualroad.bindObjects(json);
perceptual = true; //是否加载了感知物
......@@ -871,7 +881,7 @@
document.getElementById("addSignal").onclick = addSignal;
function addSignal() {
let options = {
position: [117.325673, 38.996374, 10.53],
position: [117.325673, 38.996374, 18.53],
orientation: [-34.930073, -44.426579],
};
camera.flyTo(options);
......@@ -882,33 +892,13 @@
}
// 创建停止线
// document.getElementById("CreateTIMSignal").onclick = CreateTIMSignal;
document.getElementById("CreateTIMSignal").onclick = CreateTIMSignal;
async function CreateTIMSignal() {
const options = [
{
id: "1001",
startPosition: [117.31884370955275, 38.989795506281467],
endPosition: [117.31890374051923, 38.989940666684802],
},
{
id: "1002",
startPosition: [117.31886370955275, 38.989795506281467],
endPosition: [117.31892374051923, 38.989940666684802],
},
];
road.addSignalStopLine(options);
var focusjsondata = {
longitude: 117.318852,
latitude: 38.989403,
height: 15,
};
map.setZoomAndCenter(focusjsondata);
road.addSignalStopLine(SignalLines);
}
// 删除停止线
// document.getElementById("DeleteTIMSignal").onclick = DeleteTIMSignal;
document.getElementById("DeleteTIMSignal").onclick = DeleteTIMSignal;
async function DeleteTIMSignal() {
road.removeSignalStopLine();
}
......@@ -1252,6 +1242,38 @@
function modelClickRemove() {
map.off(map.EventType.ON_EQUIPMENT_CLICKED, pick_model_hightlight);
}
// 添加毫米波雷达
document.getElementById("addMillimeterWave").onclick = addMillimeterWave;
function addMillimeterWave() {
let options = {
position: [117.325673, 38.996374, 18.53],
orientation: [-34.930073, -44.426579],
};
camera.flyTo(options);
const json = {
"id": "1200002282",
"color": "0ffff0FF",
"opacity": 0.4,
"xFov": 90,//横向范围
"yFov": 30,//纵向范围
"yawValue": 90,//朝向,0为默认向东
"pitchValue": 0,//俯仰角
"radius": 1000//辐射范围
}
map.addMillimeterWave(json);
}
// 移除毫米波雷达
document.getElementById("removeMillimeterWave").onclick = removeMillimeterWave;
function removeMillimeterWave() {
const json = {
ids: ["1200002282"]
}
map.removeMillimeterWave(json);
}
</script>
</html>
\ No newline at end of file
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