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
496049e1
Commit
496049e1
authored
Aug 17, 2021
by
纪泽龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化gis地图的抽屉进入的时机
parent
1ed1ce44
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
16 deletions
+28
-16
gaodeMapView.js
gassafety-web/src/utils/gaodeMapView.js
+27
-15
index.vue
gassafety-web/src/views/enterprise/mapView/index.vue
+1
-1
No files found.
gassafety-web/src/utils/gaodeMapView.js
View file @
496049e1
...
...
@@ -51,6 +51,8 @@ class gaodeMap {
view
=
null
;
handleInfoWindowOpenFunc
=
null
;
onceFlag
=
false
;
//构造函数中设置中央点默认值
constructor
(
center
)
{
this
.
markers
=
[];
...
...
@@ -107,6 +109,16 @@ class gaodeMap {
this
.
handleInfoWindowOpenFunc
();
this
.
handleInfoWindowOpenFunc
=
null
;
}
// 刚进入页面的时候只调用一次,让左侧的抽屉在地图移动完之后显示
if
(
!
this
.
onceFlag
)
{
this
.
onceFlag
=
true
;
this
.
view
.
backFlag
=
false
;
let
options
=
this
.
myMap
.
getStatus
();
options
.
scrollWheel
=
true
;
this
.
myMap
.
setStatus
(
options
);
}
});
this
.
districtBoundaries
();
}
...
...
@@ -237,9 +249,9 @@ class gaodeMap {
// // infoWindow.close();
// that.workerManInfoWindow = infoWindow;
// });
marker
.
markerType
=
markerType
;
marker
.
markerType
=
markerType
;
marker
.
data
=
data
;
marker
.
infoWindow
=
infoWindow
;
marker
.
infoWindow
=
infoWindow
;
marker
.
on
(
"mouseover"
,
this
.
wokerManOpen
);
marker
.
on
(
"mousedown"
,
e
=>
{
// console.log(data);
...
...
@@ -334,7 +346,7 @@ class gaodeMap {
map
.
setZoom
(
"11"
);
}
//map.setFitView();
function
infoClose
(
e
)
{
let
options
=
map
.
getStatus
();
options
.
scrollWheel
=
true
;
...
...
@@ -346,18 +358,18 @@ class gaodeMap {
return
marker
;
}
wokerManOpen
=
(
e
)
=>
{
this
.
markerType
=
e
.
target
.
markerType
;
e
.
target
.
content
=
this
.
getMarketContent
(
e
.
target
.
data
);
e
.
target
.
infoWindow
.
setContent
(
e
.
target
.
content
);
e
.
target
.
infoWindow
.
open
(
map
,
e
.
target
.
getPosition
());
console
.
log
(
"e.target.getPosition()"
,
e
.
target
.
getExtData
())
this
.
boxCollision
(
e
.
target
.
infoWindow
.
dom
);
// that.addCloneDome(e.target, infoWindow);
// infoWindow.close();
this
.
workerManInfoWindow
=
e
.
target
.
infoWindow
;
}
wokerManOpen
=
e
=>
{
this
.
markerType
=
e
.
target
.
markerType
;
e
.
target
.
content
=
this
.
getMarketContent
(
e
.
target
.
data
);
e
.
target
.
infoWindow
.
setContent
(
e
.
target
.
content
);
e
.
target
.
infoWindow
.
open
(
map
,
e
.
target
.
getPosition
());
console
.
log
(
"e.target.getPosition()"
,
e
.
target
.
getExtData
());
this
.
boxCollision
(
e
.
target
.
infoWindow
.
dom
);
// that.addCloneDome(e.target, infoWindow);
// infoWindow.close();
this
.
workerManInfoWindow
=
e
.
target
.
infoWindow
;
}
;
// 鼠标移入设备时候实行的函数
infoOpen
=
e
=>
{
if
(
e
.
target
.
getExtData
().
alarmState
==
1
)
{
...
...
gassafety-web/src/views/enterprise/mapView/index.vue
View file @
496049e1
...
...
@@ -369,7 +369,7 @@ export default {
// 右下角数据 跟值班人员
this
.
rightBottomData
();
this
.
backFlag
=
false
;
//
this.backFlag = 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