Skip to content

Commit

Permalink
fix: 修复 MapLibre 下使用 CanvasLayer 鼠标事件异常问题 (#2393)
Browse files Browse the repository at this point in the history
  • Loading branch information
heiyexing authored Apr 10, 2024
1 parent daff2b5 commit 4978c7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/maps/src/maplibre/map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export default class Service extends BaseMapService<Map & IMapboxInstance> {
}

public getCanvasOverlays() {
return this.getMapContainer();
return this.getMapContainer()?.querySelector('.maplibregl-canvas-container') as HTMLElement;
}

public meterToCoord(center: [number, number], outer: [number, number]) {
Expand Down

0 comments on commit 4978c7a

Please sign in to comment.