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-03-05 17:58:55 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
96db4386a1b4d728625b220a1d14e01d1066a3ca
96db4386
1 parent
68ce2865
fix 屏蔽判断是否在范围内功能
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
src/views/by/map.vue
src/views/by/map.vue
View file @
96db438
<!--
* @Date: 2023-05-19 14:54:27
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-0
2-20 14:55:41
* @LastEditTime: 2025-0
3-05 17:52:15
* @FilePath: /map-demo/src/views/by/map.vue
* @Description: 公众地图主体页面
-->
...
...
@@ -573,10 +573,10 @@ export default {
this.current_lng = GPS.gcj_encrypt(latitude, longitude).lon;
this.current_lat = GPS.gcj_encrypt(latitude, longitude).lat;
// 判断是否在范围内
if (!this.isPointInRing()) {
this.dialog_show = true;
this.dialog_text = '您不在景区范围内';
} else {
//
if (!this.isPointInRing()) {
//
this.dialog_show = true;
//
this.dialog_text = '您不在景区范围内';
//
} else {
// 使用纠正偏移后的地址,打一个定位标记
this.location_marker = new AMap.LabelMarker({
icon: {
...
...
@@ -589,7 +589,7 @@ export default {
this.map.add(this.location_marker);
// 定位到当前位置中心
this.map.setZoomAndCenter(this.zoom, [this.current_lng, this.current_lat]);
}
//
}
},
complete: () => {
// 获取失败
...
...
Please
register
or
login
to post a comment