@jorgmoritz/gis-manager 0.1.30 → 0.1.31

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 CHANGED
@@ -13,7 +13,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
13
13
  // package.json
14
14
  var package_default = {
15
15
  name: "@jorgmoritz/gis-manager",
16
- version: "0.1.29"};
16
+ version: "0.1.30"};
17
17
 
18
18
  // src/utils/version.ts
19
19
  var version = package_default.version;
@@ -3067,7 +3067,20 @@ var AirplaneCursor = class {
3067
3067
  moved = true;
3068
3068
  }
3069
3069
  if (this.keysPressed.has("z")) {
3070
- setPos(addVec(pose.position, C.Cartesian3.multiplyByScalar(u3, -step, new C.Cartesian3())));
3070
+ const newPos = addVec(pose.position, C.Cartesian3.multiplyByScalar(u3, -step, new C.Cartesian3()));
3071
+ const cartographic = C.Cartographic.fromCartesian(newPos);
3072
+ if (cartographic) {
3073
+ const terrainHeight = this.viewer.scene.globe.getHeight(cartographic) ?? 0;
3074
+ const minAltitude = terrainHeight + 1;
3075
+ if (cartographic.height < minAltitude) {
3076
+ cartographic.height = minAltitude;
3077
+ setPos(C.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, cartographic.height));
3078
+ } else {
3079
+ setPos(newPos);
3080
+ }
3081
+ } else {
3082
+ setPos(newPos);
3083
+ }
3071
3084
  moved = true;
3072
3085
  }
3073
3086
  if (this.keysPressed.has("q")) {