feat: 修复官网 canvasLayer demo 错误

This commit is contained in:
2912401452 2022-03-18 18:50:49 +08:00
parent e072a99bff
commit 70606f63fc
1 changed files with 2 additions and 0 deletions

View File

@ -68,6 +68,8 @@ function draw(option) {
points.map(point => {
const pixelCenter = mapService.lngLatToContainer([ point.lng, point.lat ]);
pixelCenter.x *= window.devicePixelRatio
pixelCenter.y *= window.devicePixelRatio
const rectStartX = pixelCenter.x - radius;
const rectStartY = pixelCenter.y - radius;