huweili-cesium 1.2.28 → 1.2.29

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.
Files changed (2) hide show
  1. package/js/basis.js +2 -8
  2. package/package.json +1 -1
package/js/basis.js CHANGED
@@ -128,10 +128,8 @@ export function basicConfig() {
128
128
 
129
129
  // 添加右键点击事件监听
130
130
  map.screenSpaceEventHandler.setInputAction((click) => {
131
- console.log('右键点击事件触发')
132
131
  // 获取点击位置的笛卡尔坐标
133
132
  const cartesian = map.camera.pickEllipsoid(click.position, map.scene.globe.ellipsoid);
134
-
135
133
  if (cartesian) {
136
134
  // 转换为经纬度
137
135
  const cartographic = Cesium.Cartographic.fromCartesian(cartesian);
@@ -147,16 +145,14 @@ export function basicConfig() {
147
145
  cartesian,
148
146
  };
149
147
 
150
- console.log('点击位置:', position);
148
+ console.log('右键点击事件触发,点击位置:', position);
151
149
  }
152
150
  }, Cesium.ScreenSpaceEventType.RIGHT_CLICK);
153
151
 
154
152
  // 添加左键点击事件,用于隐藏弹窗
155
153
  map.screenSpaceEventHandler.setInputAction((click) => {
156
- console.log('左键点击事件触发')
157
154
  // 获取点击位置的笛卡尔坐标
158
155
  const cartesian = map.camera.pickEllipsoid(click.position, map.scene.globe.ellipsoid);
159
-
160
156
  if (cartesian) {
161
157
  // 转换为经纬度
162
158
  const cartographic = Cesium.Cartographic.fromCartesian(cartesian);
@@ -164,7 +160,7 @@ export function basicConfig() {
164
160
  const lat = Cesium.Math.toDegrees(cartographic.latitude);
165
161
  const height = cartographic.height;
166
162
 
167
- console.log('点击位置:', {
163
+ console.log('左键点击事件触发,点击位置:', {
168
164
  lng: Number(lng),
169
165
  lat: Number(lat),
170
166
  height: Number(height)
@@ -174,9 +170,7 @@ export function basicConfig() {
174
170
  lat: Number(lat),
175
171
  height: Number(height)
176
172
  });
177
-
178
173
  }
179
-
180
174
  }, Cesium.ScreenSpaceEventType.LEFT_CLICK);
181
175
  }
182
176
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "huweili-cesium",
3
- "version": "1.2.28",
3
+ "version": "1.2.29",
4
4
  "description": "基于 Cesium 的地图工具库(无人机态势、轨迹、围栏、工具栏等)",
5
5
  "type": "module",
6
6
  "main": "./index.js",