From 5cbf6d8992f26d85758ff737d46208c8fc24d5fd Mon Sep 17 00:00:00 2001 From: Bernard <807996636@qq.com> Date: Mon, 27 May 2024 16:58:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=A1=E5=87=86=E6=9B=B2=E7=BA=BF=E7=AE=AD?= =?UTF-8?q?=E5=A4=B4=E7=9A=84=E7=AE=AD=E5=A4=B4=E8=A7=92=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/arrow/curved-arrow.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/arrow/curved-arrow.ts b/src/arrow/curved-arrow.ts index f8e4fa4..8c1b936 100644 --- a/src/arrow/curved-arrow.ts +++ b/src/arrow/curved-arrow.ts @@ -86,8 +86,8 @@ export default class CurvedArrow extends Base { const distance = Utils.wholeDistance(lnglatPoints); let len = distance / this.arrowLengthScale; len = len > this.maxArrowLength ? this.maxArrowLength : len; - const leftPnt = Utils.getThirdPoint(pnt1, pnt2, Math.PI / 6, len / 2, false); - const rightPnt = Utils.getThirdPoint(pnt1, pnt2, Math.PI / 6, len / 2, true); + const leftPnt = Utils.getThirdPoint(curvePoints[curvePoints.length - 2], curvePoints[curvePoints.length - 1], Math.PI / 6, len / 2, false); + const rightPnt = Utils.getThirdPoint(curvePoints[curvePoints.length - 2], curvePoints[curvePoints.length - 1], Math.PI / 6, len / 2, true); const temp = [].concat(...curvePoints); const points = [...temp, ...leftPnt, ...pnt2, ...rightPnt]; const cartesianPoints = this.cesium.Cartesian3.fromDegreesArray(points);