Home > front end >  cesium
cesium

Time:04-01




<meta charset="utf-8" & gt;
<script SRC="https://cesiumjs.org/releases/1.54/Build/Cesium/Cesium.js" & gt; </script>


<body>

<script>
Var handler=new Cesium. ScreenSpaceEventHandler (viewer. Scene. Canvas);
Handler. SetInputAction (function (movement) {
Var windowPosition=viewer. Camera. GetPickRay (movement. The position);
Var cartesianCoordinates=viewer. Scene. Globe. Pick (windowPosition, viewer. Scene);
Alert (Cesium. Math. ToDegrees (cartoCoordinates. Longitude) + ", "+ Cesium. Math.h toDegrees (cartoCoordinates. Latitude) +", "+ Cesium. Math.h toDegrees (cartoCoordinates. Height),
}, Cesium. ScreenSpaceEventType. LEFT_CLICK);
</script>

<script>
Cesium. Ion. DefaultAccessToken='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9. EyJqdGkiOiI4ZDdhNmRjMC0yNGMxLTRlYWItYjU5Ny1jZjJjZWIyNWI2YmIiLCJpZCI6NzY2Niwic2NvcGVzIjpbImFzciIsImdjIl0sImlhdCI6MTU1MDExMjI4NH0. E_LkplBoPjo_fSqLsGAb97ypotS0G5tMHJoSxLkqyUw';
Var viewer=new Cesium. Viewer (' cesiumContainer ');
</script>





Show [18] 9 there is a problem, to solve

CodePudding user response:

Run, don't see the pop-up, look not to understand

CodePudding user response:

 
Alert (Cesium. Math. ToDegrees (cartoCoordinates. Longitude) + ", "+ Cesium. Math.h toDegrees (cartoCoordinates. Latitude) +", "+ Cesium. Math.h toDegrees (cartoCoordinates. Height),


The not alert followed, instead; !