Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
micro-customization-system
/
oEshield
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit f07a463c
authored
Sep 14, 2023
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修复bug
1 parent
193f0a67
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
3 deletions
src/pages/monitor/addPoi.vue
src/pages/monitor/addPoi.vue
View file @
f07a463
...
@@ -203,7 +203,7 @@ export default {
...
@@ -203,7 +203,7 @@ export default {
},
},
// 地图右键添加poi点
// 地图右键添加poi点
addPoiMarker
(
options
)
{
addPoiMarker
(
options
,
type
)
{
let
_this
=
this
;
let
_this
=
this
;
let
_map
=
_this
.
map
;
let
_map
=
_this
.
map
;
let
_InfoWindow
=
_this
.
poiInfoWindow
;
let
_InfoWindow
=
_this
.
poiInfoWindow
;
...
@@ -247,6 +247,10 @@ export default {
...
@@ -247,6 +247,10 @@ export default {
_this
.
$set
(
_this
.
form
,
"lat"
,
options
.
lat
);
_this
.
$set
(
_this
.
form
,
"lat"
,
options
.
lat
);
_this
.
markerEvent
(
_markerInfo
);
_this
.
markerEvent
(
_markerInfo
);
}
}
if
(
type
&&
type
==
"search"
)
{
_this
.
setCenter
(
options
.
lng
,
options
.
lat
);
}
},
},
// marker点击事件
// marker点击事件
...
@@ -308,7 +312,8 @@ export default {
...
@@ -308,7 +312,8 @@ export default {
let
_params
=
{};
let
_params
=
{};
_params
.
lng
=
_poi
.
location
.
lng
;
_params
.
lng
=
_poi
.
location
.
lng
;
_params
.
lat
=
_poi
.
location
.
lat
;
_params
.
lat
=
_poi
.
location
.
lat
;
_this
.
addPoiMarker
(
_params
);
_this
.
addPoiMarker
(
_params
,
"search"
);
});
});
},
},
...
@@ -432,7 +437,8 @@ export default {
...
@@ -432,7 +437,8 @@ export default {
if
(
_marker
)
{
if
(
_marker
)
{
let
_markerInfo
=
_marker
.
getExtData
();
let
_markerInfo
=
_marker
.
getExtData
();
_this
.
markerEvent
(
_markerInfo
);
_this
.
markerEvent
(
_markerInfo
);
_this
.
map
.
setFitView
(
_marker
);
//_this.map.setFitView(_marker);
_this
.
setCenter
(
_markerInfo
.
lng
,
_markerInfo
.
lat
);
}
}
}
}
_this
.
trackList
=
res
.
data
||
[];
_this
.
trackList
=
res
.
data
||
[];
...
@@ -455,6 +461,18 @@ export default {
...
@@ -455,6 +461,18 @@ export default {
}
}
});
});
},
},
// 设置地图中心点
setCenter
(
lng
,
lat
)
{
let
_this
=
this
;
let
_map
=
_this
.
map
;
if
(
_map
)
{
console
.
log
(
lng
,
lat
);
setTimeout
(
function
()
{
_map
.
setCenter
([
lng
,
lat
]);
},
1000
);
}
},
},
},
};
};
</
script
>
</
script
>
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment