|
|
|
@ -10,7 +10,7 @@ function lonLatToXY(lon, lat, lat0) {
|
|
|
|
|
|
|
|
|
|
|
|
function calcRectangleFromPoints(points) {
|
|
|
|
function calcRectangleFromPoints(points) {
|
|
|
|
if (!points || points.length !== 4) {
|
|
|
|
if (!points || points.length !== 4) {
|
|
|
|
console.log("必须传入4个点");
|
|
|
|
// console.log("必须传入4个点");
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
const p1raw = points.find(p => p.name === "点位1") || points[0];
|
|
|
|
const p1raw = points.find(p => p.name === "点位1") || points[0];
|
|
|
|
@ -46,7 +46,7 @@ function calcRectangleFromPoints(points) {
|
|
|
|
|
|
|
|
|
|
|
|
function getLocalPositionRelativeToP4(point, rectPoints, rectInfo) {
|
|
|
|
function getLocalPositionRelativeToP4(point, rectPoints, rectInfo) {
|
|
|
|
if (!rectInfo || typeof rectInfo.angle !== 'number') {
|
|
|
|
if (!rectInfo || typeof rectInfo.angle !== 'number') {
|
|
|
|
console.log("rectInfo.angle 必须是由 calcRectangleFromPoints 得到的角度");
|
|
|
|
// console.log("rectInfo.angle 必须是由 calcRectangleFromPoints 得到的角度");
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|