Commit 6955fa8e135763e73830cd2afc88439124c5d204
1 parent
2273cf0b
fix:DEFECT-587 修复设备位置,第一次点击设备时,标签页正确,点击其余位置,然后拉动地图,再点击设备图标,说明标签位置没对应(演示环境)
Showing
1 changed file
with
3 additions
and
2 deletions
| ... | ... | @@ -210,8 +210,9 @@ |
| 210 | 210 | } |
| 211 | 211 | map.addOverlay(marker); |
| 212 | 212 | //标注监听事件 |
| 213 | - marker.addEventListener('click', function () { | |
| 214 | - map.openInfoWindow(infoWindow, map.getCenter()); | |
| 213 | + marker.addEventListener('click', function (e) { | |
| 214 | + const point = e.point; | |
| 215 | + map.openInfoWindow(infoWindow, point); | |
| 215 | 216 | }); |
| 216 | 217 | //标注监听事件 |
| 217 | 218 | // } else { | ... | ... |