距离计算
This commit is contained in:
@ -349,7 +349,7 @@ class CurvelineObject extends Base {
|
||||
break
|
||||
}
|
||||
|
||||
this.options.lengthByMeter = this.computeDistance(
|
||||
this.options.lengthByMeter = this.computeDistance2(
|
||||
this.smoothHandle(this.options.positions),
|
||||
2,
|
||||
ground
|
||||
@ -1157,7 +1157,7 @@ class CurvelineObject extends Base {
|
||||
CurvelineObject.createLabel(that)
|
||||
// that.entity.polyline.positionsLngLat = positions
|
||||
that.renewPolygon(fromDegreesArray)
|
||||
that.options.lengthByMeter = that.computeDistance(that.smoothHandle(positions), 2, ground)
|
||||
that.options.lengthByMeter = that.computeDistance2(that.smoothHandle(positions), 2, ground)
|
||||
that.lengthUnit = that.options['length-unit']
|
||||
syncData(that.sdk, that.options.id)
|
||||
if (that.options.show) {
|
||||
@ -1169,10 +1169,10 @@ class CurvelineObject extends Base {
|
||||
// for (let i = 0; i < fromDegreesArray.length; i += 2) {
|
||||
// array.push({ lng: fromDegreesArray[i], lat: fromDegreesArray[i + 1] })
|
||||
// }
|
||||
// this.options.fit_length = tool.computeDistance(array)
|
||||
// this.options.fit_length = tool.computeDistance2(array)
|
||||
// }
|
||||
// else {
|
||||
// this.options.fit_length = tool.computeDistance(positions)
|
||||
// this.options.fit_length = tool.computeDistance2(positions)
|
||||
// }
|
||||
// if (this.options.fit_length_unit === 'km') {
|
||||
// this.options.fit_length = this.options.fit_length / 1000
|
||||
@ -1856,13 +1856,13 @@ class CurvelineObject extends Base {
|
||||
alt: fromDegreesArray[i + 2]
|
||||
})
|
||||
}
|
||||
this.options.fitLengthByMeter = this.computeDistance(
|
||||
this.options.fitLengthByMeter = this.computeDistance2(
|
||||
array,
|
||||
2,
|
||||
ground
|
||||
)
|
||||
this.fitLengthUnit = this.options['fit-length-unit']
|
||||
this.options.lengthByMeter = this.computeDistance(this.smoothHandle(positions), 2, ground)
|
||||
this.options.lengthByMeter = this.computeDistance2(this.smoothHandle(positions), 2, ground)
|
||||
this.lengthUnit = this.options['length-unit']
|
||||
return fromDegreesArray
|
||||
}
|
||||
@ -2234,7 +2234,7 @@ class CurvelineObject extends Base {
|
||||
// )
|
||||
// let fromDegreesArray = that.renewPositions(that.options.positions)
|
||||
// that.renewPolygon(fromDegreesArray)
|
||||
// that.options.lengthByMeter = that.computeDistance(
|
||||
// that.options.lengthByMeter = that.computeDistance2(
|
||||
// that.options.positions,
|
||||
// 2,
|
||||
// that.ground
|
||||
|
Reference in New Issue
Block a user