1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
| <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <script src="https://cesium.com/downloads/cesiumjs/releases/1.81/Build/Cesium/Cesium.js"></script> <link href="https://cesium.com/downloads/cesiumjs/releases/1.81/Build/Cesium/Widgets/widgets.css" rel="stylesheet"> </head> <body> <div id="cesiumContainer"></div>
<script> const viewer = new Cesium.Viewer('cesiumContainer', { imageryProvider: new Cesium.WebMapServiceImageryProvider({ url: 'http://localhost:8080/geoserver/gwc/service/wms', layers: 'osm:osm', parameters: { service: 'WMS', version: '1.1.1', request: 'GetMap', layers: 'osm:osm', srs: 'EPSG:3857', crs: 'EPSG:3857', format: 'image/png', tranparent: true, tiled: true, }, tilingScheme: new Cesium.WebMercatorTilingScheme(), }), animation: false, baseLayerPicker: false, fullscreenButton: false, vrButton: false, geocoder: false, homeButton: false, infoBox: false, sceneModePicker: false, selectionIndicator: false, timeline: false, navigationHelpButton: false, projectionPicker: false, selectedEntity: false, trackedEntity: false, clockTrackedDataSource: false, });
const scene = viewer.scene; const camera = viewer.camera; const handler = new Cesium.ScreenSpaceEventHandler(viewer.canvas); const ellipsoid = scene.globe.ellipsoid; </script> </div> </body> </html>
|