1, to build a viewer, the following creation; options parameters according to the actual situation, to set
1 varViewer =NewCesium.viewer (' Cesiumcontainer ', {2 //Start in Columbus Viewer3 SceneMode:Cesium.SceneMode.COLUMBUS_VIEW,//Set default scene mode for 3-D maps4 //Use standard Cesium terrain5Terrainprovider:NewCesium.cesiumterrainprovider ({//Build Terrain Service6URL: '//cesiumjs.org/smallterrain ',7Credit: ' Terrain data courtesy Analytical Graphics, Inc. '8 }),9*//Hide the base layer pickerTen* Baselayerpicker:false,//Set basic layer to provide no display One*//Use openstreetmaps A* Imageryprovider:NewCesium.openstreetmapimageryprovider ({//Call OpenStreetMap Tile service -* URL: '//a.tile.openstreetmap.org/' -* }), the*//Use high-res stars downloaded from https://github.com/AnalyticalGraphicsInc/cesium-assets -* Skybox:NewCesium.skybox ({//set X, Y, Z of Near and far focus -*sources: { -* Positivex: ' stars/tychoskymapii.t3_08192x04096_80_px.jpg ', +* Negativex: ' stars/tychoskymapii.t3_08192x04096_80_mx.jpg ', -* Positivey: ' stars/tychoskymapii.t3_08192x04096_80_py.jpg ', +* Negativey: ' stars/tychoskymapii.t3_08192x04096_80_my.jpg ', A* Positivez: ' stars/tychoskymapii.t3_08192x04096_80_pz.jpg ', at* Negativez: ' stars/tychoskymapii.t3_08192x04096_80_mz.jpg ' -* } -* }), -*//Show Columbus View map with Web Mercator projection -* Mapprojection:Newcesium.webmercatorprojection ()//set projection coordinates -* });
var viewer = new
Cesium API's about viewer (ii)