This commit is contained in:
parent
ae62f665ce
commit
3c0ff6ca59
|
|
@ -770,18 +770,30 @@ if (!modelUrl || !modelUrl.endsWith('.dxf')) {
|
||||||
console.log('画半圆', item)
|
console.log('画半圆', item)
|
||||||
// 绘制半圆弧线
|
// 绘制半圆弧线
|
||||||
if (item.start_point && item.end_point && item.center && item.radius) {
|
if (item.start_point && item.end_point && item.center && item.radius) {
|
||||||
const arcPoints = this.generateArcPoints(
|
const line = new BMapGL.Polyline(
|
||||||
item.center,
|
[
|
||||||
item.radius,
|
new BMapGL.Point(item.start_point[0], item.start_point[1]),
|
||||||
item.start_point,
|
new BMapGL.Point(item.end_point[0], item.end_point[1]),
|
||||||
item.end_point,
|
],
|
||||||
|
{
|
||||||
|
strokeColor: 'red',
|
||||||
|
strokeWeight: 2,
|
||||||
|
strokeOpacity: 0.8,
|
||||||
|
},
|
||||||
)
|
)
|
||||||
const arcPolyline = new BMapGL.Polyline(arcPoints, {
|
this.map.addOverlay(line)
|
||||||
strokeColor: 'red',
|
// const arcPoints = this.generateArcPoints(
|
||||||
strokeWeight: 2,
|
// item.center,
|
||||||
strokeOpacity: 0.8,
|
// item.radius,
|
||||||
})
|
// item.start_point,
|
||||||
this.map.addOverlay(arcPolyline)
|
// item.end_point,
|
||||||
|
// )
|
||||||
|
// const arcPolyline = new BMapGL.Polyline(arcPoints, {
|
||||||
|
// strokeColor: 'red',
|
||||||
|
// strokeWeight: 2,
|
||||||
|
// strokeOpacity: 0.8,
|
||||||
|
// })
|
||||||
|
// this.map.addOverlay(arcPolyline)
|
||||||
} else {
|
} else {
|
||||||
// 如果没有起点和终点,则绘制完整圆(备用方案)
|
// 如果没有起点和终点,则绘制完整圆(备用方案)
|
||||||
const circle = new BMapGL.Circle(
|
const circle = new BMapGL.Circle(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue