Showing
1 changed file
with
12 additions
and
10 deletions
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2023-05-19 14:54:27 | 2 | * @Date: 2023-05-19 14:54:27 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2025-02-20 11:48:03 | 4 | + * @LastEditTime: 2025-02-27 09:32:49 |
| 5 | * @FilePath: /map-demo/src/views/tools.vue | 5 | * @FilePath: /map-demo/src/views/tools.vue |
| 6 | * @Description: 公众地图主体页面 | 6 | * @Description: 公众地图主体页面 |
| 7 | --> | 7 | --> |
| ... | @@ -472,14 +472,17 @@ export default { | ... | @@ -472,14 +472,17 @@ export default { |
| 472 | } | 472 | } |
| 473 | // 绑定景点的点击事件 - 文字出现才能触发 | 473 | // 绑定景点的点击事件 - 文字出现才能触发 |
| 474 | var clickListener = labelMarker.on('click', (e) => { | 474 | var clickListener = labelMarker.on('click', (e) => { |
| 475 | - // 不同弹框类型 | 475 | + // // 不同弹框类型 |
| 476 | - if (entity_info[i].window_type === 'normal') { | 476 | + // if (entity_info[i].window_type === 'normal') { |
| 477 | - this.positionMarker(entity_info[i]) | 477 | + // this.positionMarker(entity_info[i]) |
| 478 | - } else if (entity_info[i].window_type === 'lite') { | 478 | + // } else if (entity_info[i].window_type === 'lite') { |
| 479 | - this.positionLiteMarker(entity_info[i]) | 479 | + // this.positionLiteMarker(entity_info[i]) |
| 480 | - } else if (entity_info[i].window_type === 'warn') { | 480 | + // } else if (entity_info[i].window_type === 'warn') { |
| 481 | - this.positionWarnMarker(entity_info[i]) | 481 | + // this.positionWarnMarker(entity_info[i]) |
| 482 | - } | 482 | + // } |
| 483 | + var text = e.lnglat.getLng() + "," + e.lnglat.getLat(); | ||
| 484 | + console.log(text); | ||
| 485 | + this.log_lnglat = text; | ||
| 483 | }) | 486 | }) |
| 484 | // 使用LabelsLayer包裹缩放地图时,图标不会自动显示和消失需要配置rank排序 | 487 | // 使用LabelsLayer包裹缩放地图时,图标不会自动显示和消失需要配置rank排序 |
| 485 | // 创建一个 LabelsLayer 实例来承载 LabelMarker,[LabelsLayer 文档](https://lbs.amap.com/api/jsapi-v2/documentation#labelslayer) | 488 | // 创建一个 LabelsLayer 实例来承载 LabelMarker,[LabelsLayer 文档](https://lbs.amap.com/api/jsapi-v2/documentation#labelslayer) |
| ... | @@ -947,7 +950,6 @@ export default { | ... | @@ -947,7 +950,6 @@ export default { |
| 947 | // this.map.setLimitBounds(myBounds); | 950 | // this.map.setLimitBounds(myBounds); |
| 948 | // }, | 951 | // }, |
| 949 | showInfoClick(e) { | 952 | showInfoClick(e) { |
| 950 | - // console.log(e); | ||
| 951 | var zoom = this.map.getZoom(); //获取当前地图级别 | 953 | var zoom = this.map.getZoom(); //获取当前地图级别 |
| 952 | // var text = | 954 | // var text = |
| 953 | // "您在 [" + | 955 | // "您在 [" + | ... | ... |
-
Please register or login to post a comment