@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.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.29"};
14
+ version: "0.1.30"};
15
15
 
16
16
  // src/utils/version.ts
17
17
  var version = package_default.version;
@@ -3065,7 +3065,20 @@ var AirplaneCursor = class {
3065
3065
  moved = true;
3066
3066
  }
3067
3067
  if (this.keysPressed.has("z")) {
3068
- setPos(addVec(pose.position, C.Cartesian3.multiplyByScalar(u3, -step, new C.Cartesian3())));
3068
+ const newPos = addVec(pose.position, C.Cartesian3.multiplyByScalar(u3, -step, new C.Cartesian3()));
3069
+ const cartographic = C.Cartographic.fromCartesian(newPos);
3070
+ if (cartographic) {
3071
+ const terrainHeight = this.viewer.scene.globe.getHeight(cartographic) ?? 0;
3072
+ const minAltitude = terrainHeight + 1;
3073
+ if (cartographic.height < minAltitude) {
3074
+ cartographic.height = minAltitude;
3075
+ setPos(C.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, cartographic.height));
3076
+ } else {
3077
+ setPos(newPos);
3078
+ }
3079
+ } else {
3080
+ setPos(newPos);
3081
+ }
3069
3082
  moved = true;
3070
3083
  }
3071
3084
  if (this.keysPressed.has("q")) {