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
2025-09-18 10:14:48 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
1be74d775c4a86f730fa63ee695cb1c4308304af
1be74d77
1 parent
21e9686b
fix: 移除地图自动定位和偏移代码
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
src/views/checkin/map.vue
src/views/checkin/map.vue
View file @
1be74d7
<!--
* @Date: 2023-05-19 14:54:27
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-09-18
09:52:28
* @LastEditTime: 2025-09-18
10:10:09
* @FilePath: /map-demo/src/views/checkin/map.vue
* @Description: 公众地图主体页面
-->
...
...
@@ -590,7 +590,7 @@ export default {
$('.van-floating-panel').css('boxShadow', '0 0 15px black');
// 定位到当前位置中心
this.map.setZoomAndCenter(this.zoom, this.itemInfo.position);
//
this.map.setZoomAndCenter(this.zoom, this.itemInfo.position);
// 获取地图容器的高度
const mapHeight = this.map.getSize().height;
...
...
@@ -598,7 +598,7 @@ export default {
const offsetY = -mapHeight / 3.5;
// 使用 panBy 方法进行视图偏移
this.map.panBy(0, offsetY);
//
this.map.panBy(0, offsetY);
// 等待组件渲染完成后调用打卡状态检查
await this.$nextTick();
...
...
Please
register
or
login
to post a comment