mirror of
https://github.com/ethan-zf/cesium-plot-js.git
synced 2025-06-23 19:17:29 +00:00
fix: createGeometryFromData Polygon
This commit is contained in:
parent
4139d7d74a
commit
79508d7028
@ -51,6 +51,13 @@ export default class Polygon extends Base {
|
||||
this.drawPolygon();
|
||||
}
|
||||
|
||||
createGraphic(positions: Cartesian3[]) {
|
||||
const lnglatPoints = positions.map(this.cartesianToLnglat);
|
||||
const coords = lnglatPoints.flat();
|
||||
const cartesianPoints = this.cesium.Cartesian3.fromDegreesArray(coords);
|
||||
return cartesianPoints;
|
||||
}
|
||||
|
||||
getPoints() {
|
||||
return this.points;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user