Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
map-demo
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2023-07-05 17:05:42 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
ef3a14992d211bd8d47366f9f27fd2060d305142
ef3a1499
1 parent
6d62a691
fix 处理地图刷新问题
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
src/views/index.vue
src/views/index.vue
View file @
ef3a149
<!--
* @Date: 2023-05-19 14:54:27
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2023-07-05 1
5:43:05
* @LastEditTime: 2023-07-05 1
7:05:08
* @FilePath: /map-demo/src/views/index.vue
* @Description: 地图主体页面
-->
...
...
@@ -236,7 +236,11 @@ export default {
// 使用之前都要再获取一下地址
this.getLocation()
// 设置贴片地图
this.setTitleLayer()
this.setTitleLayer();
// 每隔5分钟刷新地图
setInterval(() => {
this.map.resize();
}, 1000 * 60 * 5);
},
watch: {
show_popup(val) {
...
...
@@ -292,6 +296,7 @@ export default {
],
features: ['bg', 'road'], // 设置地图上显示的元素种类
animateEnable: false, // 地图平移过程中是否使用动画
resizeEnable: true,
});
// 添加地图点击事件
this.map.on("click", this.showInfoClick);
...
...
Please
register
or
login
to post a comment