Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
holo-web
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xinkong
holo-web
Commits
c6e3881b
Commit
c6e3881b
authored
Jun 04, 2024
by
ninglx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wj-smartcity信号评价同比环比图表tooltip浮框添加对应日期及时间 wj-manage-web态势监测部分代码逻辑修改
parent
217b3753
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
224 additions
and
219 deletions
+224
-219
mapboxTools.js
wj-manage-web/src/utils/mapboxTools.js
+60
-5
index.vue
wj-manage-web/src/views/situation/index.vue
+33
-143
evaluationIndicators.vue
...ation/rightIndex/crossComponents/evaluationIndicators.vue
+131
-71
No files found.
wj-manage-web/src/utils/mapboxTools.js
View file @
c6e3881b
...
...
@@ -335,8 +335,59 @@ export function addOrUpdateWave(map, geo) {
});
}
}
export
function
convertPointsToGeo
(
arr
){
let
features
=
[]
for
(
let
item
of
arr
){
features
.
push
(
turf
.
point
([
item
.
longitude
,
item
.
latitude
],
item
))
}
return
turf
.
featureCollection
(
features
)
}
export
function
convertPointsLocationToGeo
(
arr
){
let
features
=
[]
for
(
let
item
of
arr
){
features
.
push
(
turf
.
point
(
item
.
location
.
split
(
'
,
'
),
item
))
}
return
turf
.
featureCollection
(
features
)
}
export
function
convertPointsLngLatToGeo
(
arr
){
let
features
=
[]
for
(
let
item
of
arr
){
features
.
push
(
turf
.
point
([
item
.
lng
,
item
.
lat
],
item
))
}
return
turf
.
featureCollection
(
features
)
}
export
function
convertPointsWktToGeo
(
arr
){
let
features
=
[];
for
(
let
item
of
arr
)
{
if
(
item
.
wkt
)
{
if
(
item
.
wkt
.
split
(
"
,
"
).
length
===
2
)
{
features
.
push
(
turf
.
point
(
item
.
wkt
.
split
(
"
,
"
).
map
((
item
)
=>
Number
(
item
)),
item
)
);
}
}
}
return
turf
.
featureCollection
(
features
);
}
export
function
convertToLineWithWkt
(
json
)
{
let
features
=
[];
for
(
let
item
of
json
)
{
if
(
item
.
wkt
)
{
let
lnglats
=
item
.
wkt
.
split
(
"
;
"
);
for
(
let
i
=
0
;
i
<
lnglats
.
length
;
i
++
)
{
lnglats
[
i
]
=
lnglats
[
i
].
split
(
"
,
"
).
map
((
j
)
=>
Number
(
j
));
}
features
.
push
(
turf
.
lineString
(
lnglats
,
item
));
}
}
return
turf
.
featureCollection
(
features
);
}
// type 4 种颜色 对应 4种告警信息
export
function
addOrUpdateWarningWave
(
map
,
geo
,
id
)
{
export
function
addOrUpdateWarningWave
(
map
,
arr
,
id
)
{
let
geo
=
convertPointsToGeo
(
arr
)
if
(
map
.
getSource
(
id
))
{
map
.
getSource
(
id
).
setData
(
geo
);
}
else
{
...
...
@@ -374,7 +425,8 @@ export function addOrUpdateWarningWave(map, geo, id) {
}
// 更新zoom值较小时的车辆轨迹point
export
function
addOrUpdateVehicle
(
map
,
geo
)
{
export
function
addOrUpdateVehicle
(
map
,
arr
)
{
let
geo
=
convertPointsToGeo
(
arr
)
if
(
!
map
.
getSource
(
"
vehicle
"
))
{
map
.
addSource
(
"
vehicle
"
,
{
type
:
"
geojson
"
,
...
...
@@ -500,8 +552,9 @@ export function addOrUpdateCrossName(map, geo) {
}
// 交通事件热力图
export
function
addOrUpdateEventHeat
(
map
,
geo
,
callback
)
{
export
function
addOrUpdateEventHeat
(
map
,
arr
,
callback
)
{
console
.
log
(
geo
,
7777777777777777777
);
let
geo
=
convertPointsLngLatToGeo
(
arr
)
if
(
!
map
.
getSource
(
"
eventHeat
"
))
{
map
.
addSource
(
"
eventHeat
"
,
{
type
:
"
geojson
"
,
...
...
@@ -544,7 +597,8 @@ export function addOrUpdateEventHeat(map, geo, callback) {
}
// 交通事件点图
export
function
addOrUpdateEventPoint
(
map
,
geo
,
callback
)
{
export
function
addOrUpdateEventPoint
(
map
,
arr
,
callback
)
{
let
geo
=
convertPointsLngLatToGeo
(
arr
)
if
(
!
map
.
getSource
(
"
eventPoint
"
))
{
map
.
addSource
(
"
eventPoint
"
,
{
type
:
"
geojson
"
,
...
...
@@ -789,7 +843,8 @@ export function addOrUpdateLicense(map, geo) {
}
// 中间层级车辆图片图层
export
function
addOrUpdateVehiclePic
(
map
,
geo
)
{
export
function
addOrUpdateVehiclePic
(
map
,
arr
)
{
let
geo
=
convertPointsToGeo
(
arr
)
if
(
!
map
.
getSource
(
"
vehiclePic
"
))
{
map
.
addSource
(
"
vehiclePic
"
,
{
type
:
"
geojson
"
,
...
...
wj-manage-web/src/views/situation/index.vue
View file @
c6e3881b
This diff is collapsed.
Click to expand it.
wj-smartcity/src/views/signalEvaluation/rightIndex/crossComponents/evaluationIndicators.vue
View file @
c6e3881b
This diff is collapsed.
Click to expand it.
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