@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/index.js
CHANGED
|
@@ -11,7 +11,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
11
11
|
// package.json
|
|
12
12
|
var package_default = {
|
|
13
13
|
name: "@jorgmoritz/gis-manager",
|
|
14
|
-
version: "0.1.
|
|
14
|
+
version: "0.1.34"};
|
|
15
15
|
|
|
16
16
|
// src/utils/version.ts
|
|
17
17
|
var version = package_default.version;
|
|
@@ -8195,7 +8195,7 @@ var PolygonEditor = class {
|
|
|
8195
8195
|
if (!polygon) return [];
|
|
8196
8196
|
const hierarchy = typeof polygon.hierarchy?.getValue === "function" ? polygon.hierarchy.getValue(C.JulianDate.now()) : polygon.hierarchy;
|
|
8197
8197
|
const positions = hierarchy?.positions ?? hierarchy ?? [];
|
|
8198
|
-
|
|
8198
|
+
const points = positions.map((cartesian) => {
|
|
8199
8199
|
const cartographic = C.Cartographic.fromCartesian(cartesian);
|
|
8200
8200
|
return {
|
|
8201
8201
|
lon: C.Math.toDegrees(cartographic.longitude),
|
|
@@ -8203,6 +8203,14 @@ var PolygonEditor = class {
|
|
|
8203
8203
|
height: cartographic.height
|
|
8204
8204
|
};
|
|
8205
8205
|
});
|
|
8206
|
+
if (points.length > 0) {
|
|
8207
|
+
const first = points[0];
|
|
8208
|
+
const last = points[points.length - 1];
|
|
8209
|
+
if (first.lon !== last.lon || first.lat !== last.lat || first.height !== last.height) {
|
|
8210
|
+
points.push({ ...first });
|
|
8211
|
+
}
|
|
8212
|
+
}
|
|
8213
|
+
return points;
|
|
8206
8214
|
}
|
|
8207
8215
|
/**
|
|
8208
8216
|
* 辅助方法:获取实体所属的 DataSource
|
|
@@ -10328,7 +10336,15 @@ var CZMLManager = class {
|
|
|
10328
10336
|
const hProp = entity.polygon.hierarchy;
|
|
10329
10337
|
const hVal = typeof hProp?.getValue === "function" ? hProp.getValue(now) : hProp;
|
|
10330
10338
|
const outer = Array.isArray(hVal) ? hVal : hVal?.positions ?? [];
|
|
10331
|
-
|
|
10339
|
+
const points = outer.map(toLonLatHeight);
|
|
10340
|
+
if (points.length > 0) {
|
|
10341
|
+
const first = points[0];
|
|
10342
|
+
const last = points[points.length - 1];
|
|
10343
|
+
if (first.lon !== last.lon || first.lat !== last.lat || first.height !== last.height) {
|
|
10344
|
+
points.push({ ...first });
|
|
10345
|
+
}
|
|
10346
|
+
}
|
|
10347
|
+
return points;
|
|
10332
10348
|
}
|
|
10333
10349
|
if (entity?.polyline?.positions) {
|
|
10334
10350
|
const pProp = entity.polyline.positions;
|