analysisVisible.html 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  6. <title>通视分析</title>
  7. <link rel="stylesheet" href="../../dist/index.css" />
  8. <link href="../../cesium/Source/Widgets/widgets.css" rel="stylesheet">
  9. <script src="../../cesium/Build/Cesium/Cesium.js"></script>
  10. <script src="../../dist/index.js"></script>
  11. <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
  12. <style>
  13. * {
  14. padding: 0;
  15. margin: 0;
  16. }
  17. </style>
  18. </head>
  19. <body>
  20. <div id="map" style="height: 100vh; width: 100vw;"></div>
  21. </body>
  22. <script>
  23. window.CESIUM_BASE_URL = '../../cesium/Build/CesiumUnminified';
  24. Cesium.Ion.defaultAccessToken = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI2MjIyODA4ZS0zNmRmLTQwNGMtYjZkNC0wOGY2NDdmODgyZTUiLCJpZCI6ODMyOCwiaWF0IjoxNjA2MjkyNDE1fQ.ZhhxNIJ-TzstpcavQBNL7xRwytBat3G2__3jr7lJ8yg'
  25. var viewer = CTMapOl.thrdime.viewercontrol.globalviewer('map', CTMapOl.thrdime.viewercontrol.globalvieweroptions())
  26. viewer._cesiumWidget._creditContainer.style.display = 'none'
  27. CTMapOl.thrdime.imagerylayercontrol.removeAll(viewer, true)
  28. CTMapOl.thrdime.imagerylayercontrol.addImageryProvider(viewer, CTMapOl.thrdime.imagerylayercontrol.gettdtImagery('img', "img_w"))
  29. CTMapOl.thrdime.imagerylayercontrol.addImageryProvider(viewer, CTMapOl.thrdime.imagerylayercontrol.gettdtImagery('cia', "cia_w"))
  30. CTMapOl.thrdime.cameracontrol.setDEFAULT_VIEW_RECTANGLE(116.38, 39.90, 116.40, 39.92)
  31. CTMapOl.thrdime.cameracontrol.setcamera(viewer, CTMapOl.thrdime.cameracontrol.getcameraoptionswithdetile(116.39, 39.91, 5000, 0, -90, 0))
  32. CTMapOl.thrdime.viewercontrol.addterrainct(viewer)
  33. function clickfunc(e){
  34. console.log(e)
  35. }
  36. let analysisVisible=new CTMapOl.cesiumComponent.AnalysisVisible(viewer,clickfunc)
  37. analysisVisible.active()
  38. </script>
  39. </html>