Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gassafety
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
耿迪迪
gassafety
Commits
2e553eff
Commit
2e553eff
authored
Sep 01, 2021
by
纪泽龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化gis地图跟地图模式
parent
47c90ac3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
8 deletions
+11
-8
gaodeMap.js
gassafety-web/src/utils/gaodeMap.js
+3
-1
index.vue
gassafety-web/src/views/device/map/index.vue
+6
-5
index.vue
gassafety-web/src/views/enterprise/mapView/index.vue
+2
-2
No files found.
gassafety-web/src/utils/gaodeMap.js
View file @
2e553eff
...
...
@@ -657,7 +657,9 @@ class gaodeMap {
const
b
=
this
.
centerNum
(
arr1
[
1
],
arr2
[
1
]);
const
a2
=
this
.
centerNum
(
a
,
arr1
[
0
]);
const
b2
=
this
.
centerNum
(
b
,
arr1
[
1
]);
polyline
.
infoWindow
.
open
(
map
,
[
a2
,
b2
]);
// polyline.infoWindow.open(map, [a2, b2]);
polyline
.
infoWindow
.
open
(
map
,
e
.
lnglat
);
}
else
{
console
.
log
(
"windowOpen"
);
// 变成异步,最后执行
...
...
gassafety-web/src/views/device/map/index.vue
View file @
2e553eff
...
...
@@ -793,18 +793,19 @@ export default {
// console.log(target.getOptions());
// 如果是原地不动,就直接执行
// console.log(iten.infoPath, lng, lat + 0.1);
console
.
log
(
iten
.
infoPath
[
0
]
-
lng
,
iten
.
infoPath
[
1
]
-
(
lat
+
0.1
));
console
.
log
(
"?"
,
iten
.
infoPath
[
0
]
-
lng
<=
0.00001
,
iten
.
infoPath
[
1
]
-
(
lat
+
0.1
)
<=
0.00001
);
console
.
log
(
iten
.
infoPath
[
0
]
-
lng
>=
0
,
iten
.
infoPath
[
1
]
-
(
lat
+
0.1
)
>=-
0.00001
);
// 因为计算问题,误差小于0.00001就没动
if
(
iten
.
infoPath
[
0
]
-
lng
>=
0
&&
iten
.
infoPath
[
0
]
-
lng
>=
-
0.00001
&&
iten
.
infoPath
[
0
]
-
lng
<=
0.00001
&&
iten
.
infoPath
[
1
]
-
(
lat
+
0.1
)
>=
0
&&
iten
.
infoPath
[
1
]
-
(
lat
+
0.1
)
>=
-
0.00001
&&
iten
.
infoPath
[
1
]
-
(
lat
+
0.1
)
<=
0.00001
)
{
//
console.log('进来了')
console
.
log
(
'进来了'
)
this
.
gaoMap
.
leftListClick
=
false
;
this
.
gaoMap
.
polylineMouseOver
(
e
);
target
.
setOptions
({
strokeColor
:
"#F7FE38"
});
this
.
gaoMap
.
polylineMouseOver
(
e
);
return
;
}
// 因为地图移动的时候infowindow无法显示
...
...
gassafety-web/src/views/enterprise/mapView/index.vue
View file @
2e553eff
...
...
@@ -879,9 +879,9 @@ export default {
// 如果是原地不动,就直接执行
// if (iten.infoPath[0] == lng && iten.infoPath[1] == lat + 0.1) {
if
(
iten
.
infoPath
[
0
]
-
lng
>=
0
&&
iten
.
infoPath
[
0
]
-
lng
>=
-
0.00001
&&
iten
.
infoPath
[
0
]
-
lng
<=
0.00001
&&
iten
.
infoPath
[
1
]
-
(
lat
+
0.1
)
>=
0
&&
iten
.
infoPath
[
1
]
-
(
lat
+
0.1
)
>=
-
0.00001
&&
iten
.
infoPath
[
1
]
-
(
lat
+
0.1
)
<=
0.00001
)
{
this
.
gaoMap
.
leftListClick
=
false
;
...
...
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