Cesium的api之關於viewer(二)


1、構建一個viewer,如下創建;options的參數根據實際情況,進行設定

 1 var viewer = new Cesium.Viewer('cesiumContainer', {
 2      //Start in Columbus Viewer
 3      sceneMode : Cesium.SceneMode.COLUMBUS_VIEW,  // 設定3維地圖的默認場景模式
 4      //Use standard Cesium terrain
 5      terrainProvider : new Cesium.CesiumTerrainProvider({    // 構建地形服務
 6           url : '//cesiumjs.org/smallterrain',
 7           credit : 'Terrain data courtesy Analytical Graphics, Inc.'
 8      }),
 9      *     //Hide the base layer picker
10      *     baseLayerPicker : false,     // 設定基本圖層提供不顯示
11      *     //Use OpenStreetMaps
12      *     imageryProvider : new Cesium.OpenStreetMapImageryProvider({  // 調用openstreetmap瓦片服務
13      *         url : '//a.tile.openstreetmap.org/'
14      *     }),
15      *     // Use high-res stars downloaded from https://github.com/AnalyticalGraphicsInc/cesium-assets
16      *     skyBox : new Cesium.SkyBox({   // 設定近焦點和遠焦點的x、y、z
17      *         sources : {
18      *           positiveX : 'stars/TychoSkymapII.t3_08192x04096_80_px.jpg',
19      *           negativeX : 'stars/TychoSkymapII.t3_08192x04096_80_mx.jpg',
20      *           positiveY : 'stars/TychoSkymapII.t3_08192x04096_80_py.jpg',
21      *           negativeY : 'stars/TychoSkymapII.t3_08192x04096_80_my.jpg',
22      *           positiveZ : 'stars/TychoSkymapII.t3_08192x04096_80_pz.jpg',
23      *           negativeZ : 'stars/TychoSkymapII.t3_08192x04096_80_mz.jpg'
24      *         }
25      *     }),
26      *     // Show Columbus View map with Web Mercator projection
27      *     mapProjection : new Cesium.WebMercatorProjection()  // 設定投影坐標
28      * });

 

var viewer = new 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM