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
2024-07-12 15:00:24 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
7a8ea54a174c35f9808118c58ee4b70a3eb79175
7a8ea54a
1 parent
ab3b33af
特殊处理边界问题-Bob需要展示例子
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
src/views/index.vue
src/views/index.vue
View file @
7a8ea54
<!--
* @Date: 2023-05-19 14:54:27
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-07-1
1 15:12:46
* @LastEditTime: 2024-07-1
2 14:59:31
* @FilePath: /map-demo/src/views/index.vue
* @Description: 公众地图主体页面
-->
...
...
@@ -900,26 +900,27 @@ export default {
// TODO: 暂时屏蔽等待数据设置字段
// 只显示相应区域,移动会回到选定范围
// this.lockMapBounds()
const id = this.$route.query.id;
if (id === '1759271') { // 定制开发
this.lockMapBounds()
}
},
// 限制地图范围
lockMapBounds() {
// var bounds = this.map.getBounds();
var myBounds = new AMap.Bounds(
// [120.58626,31.316141],
// [120.588357,31.313204]
[117.052221,26.834886],
[117.046739,26.838553]
[117.045587,26.838764],
[117.051081,26.8345723]
);
this.map.setLimitBounds(myBounds);
let list =[
[1
20.585097,31.31614
4],
[1
20.588264,31.316373
],
[1
20.588712,31.313162
],
[1
20.58609,31.313013
]
[1
17.045598,26.83876
4],
[1
17.051075,26.838779
],
[1
17.051075,26.835107
],
[1
17.045598,26.835107
]
]
// 隐藏边界以外的区域
...
...
Please
register
or
login
to post a comment