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
e5f9c274
Commit
e5f9c274
authored
May 28, 2025
by
吕 成东
Browse files
更改到联通服务上
parent
c6b37475
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
gis_sdk/js/config_10b79c61bf1b42e2.js
View file @
e5f9c274
...
@@ -57,8 +57,8 @@ var cmapConfig = {
...
@@ -57,8 +57,8 @@ var cmapConfig = {
},
},
'
51world
'
:
{
'
51world
'
:
{
gis_sdk
:
'
51world
'
,
// 引擎类型
gis_sdk
:
'
51world
'
,
// 引擎类型
//
"url": "http://172.29.128.78:8890/service",
"
url
"
:
"
http://172.29.128.78:8890/service
"
,
"
url
"
:
"
http://192.168.60.137:8890/service
"
,
// 本地测试使用
//
"url": "http://192.168.60.137:8890/service", // 本地测试使用
"
order
"
:
"
6f56f313bbcf0891dcdd51f2d7f47197
"
,
"
order
"
:
"
6f56f313bbcf0891dcdd51f2d7f47197
"
,
// "resolution": [1920, 1080], //[可选] 场景输出分辨率
// "resolution": [1920, 1080], //[可选] 场景输出分辨率
"
debugMode
"
:
"
normal
"
,
//[可选] none:不打印日志, normal:普通日志
"
debugMode
"
:
"
normal
"
,
//[可选] none:不打印日志, normal:普通日志
...
...
gis_sdk/world51/wdpApi.min_back1.js
0 → 100644
View file @
e5f9c274
This diff is collapsed.
Click to expand it.
index.html
View file @
e5f9c274
...
@@ -289,7 +289,8 @@
...
@@ -289,7 +289,8 @@
style=
"width: 100vw; height: 100vh; overflow: hidden"
style=
"width: 100vw; height: 100vh; overflow: hidden"
></div>
></div>
</body>
</body>
<script
src=
"http://192.168.60.110:3000/gis_sdk/js/CMapLoader.map.js"
></script>
<!-- <script src="http://192.168.60.110:3000/gis_sdk/js/CMapLoader.map.js"></script> -->
<script
src=
"https://localhost:3000/gis_sdk/js/CMapLoader.map.js"
></script>
<!-- <script src="http://localhost:3000/gis_sdk/js/CMapLoader.map.js"></script> -->
<!-- <script src="http://localhost:3000/gis_sdk/js/CMapLoader.map.js"></script> -->
<script
src=
"./SignalLines.js"
></script>
<script
src=
"./SignalLines.js"
></script>
<!-- <script src="./data.js"></script> -->
<!-- <script src="./data.js"></script> -->
...
@@ -329,7 +330,8 @@
...
@@ -329,7 +330,8 @@
initMap
(
"
51world
"
);
initMap
(
"
51world
"
);
async
function
initMap
(
gis_sdk
)
{
async
function
initMap
(
gis_sdk
)
{
var
url
=
"
http://192.168.60.110:3000/hdmap-platform/gateway/cmap2
"
;
// var url = "http://192.168.60.110:3000/hdmap-platform/gateway/cmap2";
var
url
=
"
https://localhost:3000/hdmap-platform/gateway/cmap2
"
;
// var url = "http://localhost:3000/hdmap-platform/gateway/cmap2";
// var url = "http://localhost:3000/hdmap-platform/gateway/cmap2";
var
secretKey
=
"
10b79c61bf1b42e2
"
;
var
secretKey
=
"
10b79c61bf1b42e2
"
;
...
@@ -365,9 +367,9 @@
...
@@ -365,9 +367,9 @@
var
options
=
{
var
options
=
{
// longitude: 117.346635,
// longitude: 117.346635,
// latitude: 38.99408,
// latitude: 38.99408,
longitude
:
117.34
70838
,
longitude
:
117.34
6852
,
latitude
:
39.0009016
,
latitude
:
38.998567
,
height
:
9.
1008
1
,
height
:
3
9.
3090
1
,
};
};
map
.
setZoomAndCenter
(
options
);
map
.
setZoomAndCenter
(
options
);
}
}
...
@@ -825,7 +827,7 @@
...
@@ -825,7 +827,7 @@
async
function
addTrafficFlow
()
{
async
function
addTrafficFlow
()
{
const
json
=
{
const
json
=
{
id
:
"
21e7a9e6d2884122804788dac1e002cc
"
,
id
:
"
21e7a9e6d2884122804788dac1e002cc
"
,
url
:
"
ws://19
2
.1
6
8.
60.13
7:31000/ws/streamer/a9219e09346a44a28ee3d0aed79c27ea
"
,
// 全部车辆
url
:
"
ws://1
72.2
9.1
2
8.7
8
:31000/ws/streamer/a9219e09346a44a28ee3d0aed79c27ea
"
,
// 全部车辆
};
};
map
.
bindVehicle
(
json
);
map
.
bindVehicle
(
json
);
}
}
...
@@ -834,7 +836,7 @@
...
@@ -834,7 +836,7 @@
async
function
addTrafficFlow6
()
{
async
function
addTrafficFlow6
()
{
const
json
=
{
const
json
=
{
id
:
"
21e7a9e6d2884122804788dac1e002cc
"
,
id
:
"
21e7a9e6d2884122804788dac1e002cc
"
,
url
:
"
ws://19
2
.1
6
8.
60.13
7:31000/ws/streamer/e7c584dd5d294347bbc3ccec2f0aa8ea
"
,
// 6号车
url
:
"
ws://1
72.2
9.1
2
8.7
8
:31000/ws/streamer/e7c584dd5d294347bbc3ccec2f0aa8ea
"
,
// 6号车
};
};
map
.
bindVehicle
(
json
);
map
.
bindVehicle
(
json
);
}
}
...
@@ -929,8 +931,8 @@
...
@@ -929,8 +931,8 @@
}
}
const
json
=
{
const
json
=
{
id
:
"
111
"
,
//ID
id
:
"
111
"
,
//ID
url
:
"
ws://19
2
.1
6
8.
60.13
7:31000/ws/streamer/86bf3faefe5f423483e4cd4d9782b046
"
,
// 全路口
url
:
"
ws://1
72.2
9.1
2
8.7
8
:31000/ws/streamer/86bf3faefe5f423483e4cd4d9782b046
"
,
// 全路口
// url: 'ws://19
2
.1
6
8.
60.13
7:31000/ws/streamer/eccd0f8b060d4bb088a1b9af1ad4070f', // 6号路口
// url: 'ws://1
72.2
9.1
2
8.7
8
:31000/ws/streamer/eccd0f8b060d4bb088a1b9af1ad4070f', // 6号路口
};
};
perceptualroad
.
bindObjects
(
json
);
perceptualroad
.
bindObjects
(
json
);
perceptual
=
true
;
//是否加载了感知物
perceptual
=
true
;
//是否加载了感知物
...
@@ -965,7 +967,7 @@
...
@@ -965,7 +967,7 @@
height
:
"
10
"
,
//高度
height
:
"
10
"
,
//高度
opacity
:
"
0.75
"
,
//透明度
opacity
:
"
0.75
"
,
//透明度
dataUrl
:
"
D://51world//rlt//hdmap1.4(GCJ02_Ortho)_v2.xodr
"
,
//文件地址
dataUrl
:
"
D://51world//rlt//hdmap1.4(GCJ02_Ortho)_v2.xodr
"
,
//文件地址
url
:
"
ws://19
2
.1
6
8.
60.13
7:33021/AnalyzeResult
"
,
//ws地址
url
:
"
ws://1
72.2
9.1
2
8.7
8
:33021/AnalyzeResult
"
,
//ws地址
colorSymbols
:
[
colorSymbols
:
[
{
minSpeed
:
0
,
maxSpeed
:
30
,
color
:
"
#FF0000
"
},
{
minSpeed
:
0
,
maxSpeed
:
30
,
color
:
"
#FF0000
"
},
{
minSpeed
:
30
,
maxSpeed
:
60
,
color
:
"
#FFFF00
"
},
{
minSpeed
:
30
,
maxSpeed
:
60
,
color
:
"
#FFFF00
"
},
...
@@ -1055,7 +1057,7 @@
...
@@ -1055,7 +1057,7 @@
// const url = "wss://itg-dev.cu-sc.com:13443/WSPLUS/socket?token=111&msgType=5&reType=51world"; //&intersectionCode=51-D-JD0003
// const url = "wss://itg-dev.cu-sc.com:13443/WSPLUS/socket?token=111&msgType=5&reType=51world"; //&intersectionCode=51-D-JD0003
const
socket
=
new
WebSocket
(
url
);
const
socket
=
new
WebSocket
(
url
);
socket
.
onopen
=
function
(
event
)
{
socket
.
onopen
=
function
(
event
)
{
console
.
log
(
"
socket连接成功!
"
);
console
.
log
(
"
交通事件——
socket连接成功!
"
);
};
};
const
fun
=
async
(
json
)
=>
{
const
fun
=
async
(
json
)
=>
{
...
@@ -1072,7 +1074,7 @@
...
@@ -1072,7 +1074,7 @@
}
}
// 测试某一个类型
// 测试某一个类型
if
(
false
&&
type
==
"
ROADWORK
"
)
{
if
(
type
==
"
ROADWORK
"
)
{
fly
++
;
fly
++
;
if
(
fly
==
3
)
{
if
(
fly
==
3
)
{
const
optionsTest1
=
{
const
optionsTest1
=
{
...
@@ -1239,7 +1241,7 @@
...
@@ -1239,7 +1241,7 @@
camera
.
flyTo
(
options
);
camera
.
flyTo
(
options
);
const
json
=
{
const
json
=
{
id
:
"
21002cc
"
,
id
:
"
21002cc
"
,
url
:
"
ws://19
2
.1
6
8.
60.13
7:31000/ws/streamer/489d02b4-80de-42e6-b0fc-95c4bd006760
"
,
url
:
"
ws://1
72.2
9.1
2
8.7
8
:31000/ws/streamer/489d02b4-80de-42e6-b0fc-95c4bd006760
"
,
};
};
map
.
bindHistoryVehicle
(
json
);
map
.
bindHistoryVehicle
(
json
);
}
}
...
@@ -1403,7 +1405,7 @@
...
@@ -1403,7 +1405,7 @@
document
.
getElementById
(
"
startV2XGan
"
).
onclick
=
startV2XGan
;
document
.
getElementById
(
"
startV2XGan
"
).
onclick
=
startV2XGan
;
function
startV2XGan
()
{
function
startV2XGan
()
{
const
url
=
const
url
=
"
wss://itg-dev.cu-sc.com:13443/WSPLUS/socket?token=111&msgType=2&reType=51world&vehicleId=269
"
;
"
wss://itg-dev.cu-sc.com:13443/WSPLUS/socket?token=111&msgType=2&reType=51world&vehicleId=269
"
;
//&
startVehicleV2XGan
(
url
);
startVehicleV2XGan
(
url
);
}
}
...
@@ -1427,21 +1429,25 @@
...
@@ -1427,21 +1429,25 @@
let
mainCar
=
data_list
[
0
];
let
mainCar
=
data_list
[
0
];
let
poleId
=
data_list
[
0
].
vinfo
?.
poleId
||
null
;
let
poleId
=
data_list
[
0
].
vinfo
?.
poleId
||
null
;
//
console.log(
console
.
log
(
//
"v2xGanSocket.onmessage",
"
v2xGanSocket.onmessage
"
,
//
"mainCar:",
"
mainCar:
"
,
//
mainCar.vid,
mainCar
.
vid
,
//
"poleId:",
"
poleId:
"
,
//
poleId
poleId
//
);
);
data_list
?.
forEach
((
item
)
=>
{
// data_list?.forEach((item)=>{
if
(
item
.
vid
==
271
){
// if(item.vinfo.light!=0){
console
.
log
(
'
vid:271
'
,
"
door:
"
,
item
.
vinfo
.
door
,
"
light:
"
,
item
.
vinfo
.
light
,
"
coord:
"
,
item
.
coord
)
// console.log(item.vid,"light:",item.vinfo.light,"coord:",item.coord)
}
// }
})
// // console.log('vid:271',"door:",item.vinfo.door,"light:",item.vinfo.light,"coord:",item.coord)
// // if(item.vid==271){
// // console.log('vid:271',"door:",item.vinfo.door,"light:",item.vinfo.light,"coord:",item.coord)
// // }
// })
console
.
log
(
''
)
// 如果id不在v2xArr中,则添加
// 如果id不在v2xArr中,则添加
const
find
=
v2xArrGan
.
find
((
item
)
=>
item
.
vid
===
mainCar
.
vid
);
const
find
=
v2xArrGan
.
find
((
item
)
=>
item
.
vid
===
mainCar
.
vid
);
...
...
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