DESKTOP-CRQ4N2U\jintian %!s(int64=2) %!d(string=hai) anos
pai
achega
c2648f84aa
Modificáronse 1 ficheiros con 5 adicións e 1 borrados
  1. 5 1
      src/jtMap3d/Widgets/StatusBar.js

+ 5 - 1
src/jtMap3d/Widgets/StatusBar.js

@@ -131,10 +131,14 @@ class StatusBar {
 		const $this = this
 		this._handler = new Cesium.ScreenSpaceEventHandler(viewer.scene.canvas)
 		const mouseOverHandler = function(movement) {
-			
+
 			/* 识别屏幕位置 */
 			let loc = $this._getScreenClickPositionAndHeight(movement.endPosition);
 
+			if (!Cesium.defined(loc)) return;
+
+			if (!loc.lng) return;
+
 			$this._posX = loc.lng.toFixed(8);
 			$this._posY = loc.lat.toFixed(8);
 			$this._posZ = loc.height.toFixed(2);