@jorgmoritz/gis-manager 0.1.32 → 0.1.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +19 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +19 -3
- package/dist/index.js.map +1 -1
- package/dist/vue/index.cjs +18 -2
- package/dist/vue/index.cjs.map +1 -1
- package/dist/vue/index.js +18 -2
- package/dist/vue/index.js.map +1 -1
- package/package.json +1 -1
package/dist/vue/index.cjs
CHANGED
|
@@ -8135,7 +8135,7 @@ var PolygonEditor = class {
|
|
|
8135
8135
|
if (!polygon) return [];
|
|
8136
8136
|
const hierarchy = typeof polygon.hierarchy?.getValue === "function" ? polygon.hierarchy.getValue(C.JulianDate.now()) : polygon.hierarchy;
|
|
8137
8137
|
const positions = hierarchy?.positions ?? hierarchy ?? [];
|
|
8138
|
-
|
|
8138
|
+
const points = positions.map((cartesian) => {
|
|
8139
8139
|
const cartographic = C.Cartographic.fromCartesian(cartesian);
|
|
8140
8140
|
return {
|
|
8141
8141
|
lon: C.Math.toDegrees(cartographic.longitude),
|
|
@@ -8143,6 +8143,14 @@ var PolygonEditor = class {
|
|
|
8143
8143
|
height: cartographic.height
|
|
8144
8144
|
};
|
|
8145
8145
|
});
|
|
8146
|
+
if (points.length > 0) {
|
|
8147
|
+
const first = points[0];
|
|
8148
|
+
const last = points[points.length - 1];
|
|
8149
|
+
if (first.lon !== last.lon || first.lat !== last.lat || first.height !== last.height) {
|
|
8150
|
+
points.push({ ...first });
|
|
8151
|
+
}
|
|
8152
|
+
}
|
|
8153
|
+
return points;
|
|
8146
8154
|
}
|
|
8147
8155
|
/**
|
|
8148
8156
|
* 辅助方法:获取实体所属的 DataSource
|
|
@@ -10268,7 +10276,15 @@ var CZMLManager = class {
|
|
|
10268
10276
|
const hProp = entity.polygon.hierarchy;
|
|
10269
10277
|
const hVal = typeof hProp?.getValue === "function" ? hProp.getValue(now) : hProp;
|
|
10270
10278
|
const outer = Array.isArray(hVal) ? hVal : hVal?.positions ?? [];
|
|
10271
|
-
|
|
10279
|
+
const points = outer.map(toLonLatHeight);
|
|
10280
|
+
if (points.length > 0) {
|
|
10281
|
+
const first = points[0];
|
|
10282
|
+
const last = points[points.length - 1];
|
|
10283
|
+
if (first.lon !== last.lon || first.lat !== last.lat || first.height !== last.height) {
|
|
10284
|
+
points.push({ ...first });
|
|
10285
|
+
}
|
|
10286
|
+
}
|
|
10287
|
+
return points;
|
|
10272
10288
|
}
|
|
10273
10289
|
if (entity?.polyline?.positions) {
|
|
10274
10290
|
const pProp = entity.polyline.positions;
|