Cesium
Cesium is designed for three-dimensional map of the Earth and world-class open source JavaScript. It provides a development kit based on the JavaScript language, user-friendly Web applications to quickly build a zero Virtual Earth plug-in, and in performance, precision, and multi-platform rendering quality, ease of use have quality assurance.
Renderings
About slope
Analysis article in the terrain contour analysis of previous on space, we describe how to use the Material to draw the interface contour. In this article, we use the Material interface to map the terrain slope map, the next article, we describe how to draw slope map. Slope analysis, slope analysis and contour analysis are all common terrain analysis.
Terrain contour analysis Link analysis of space: https://xiaozhuanlan.com/topic/3409815672
terrain slope analysis Link analysis of space: https://xiaozhuanlan.com/topic/2683794051
Simple awareness
The first few map, slope map to have a basic understanding of intuitive, pictures are from Baidu, if infringement, please inform.
Cesium in the slope of practice
Principle: Modify Material Properties Globe to adapt to the world
Specific steps
1, and initializes the Earth, calling the global terrain Services
-
Cesium.Ion.defaultAccessToken = 'xxxx';
-
var viewer = new Cesium.Viewer('cesiumContainer', {
-
imageryProvider: new Cesium.UrlTemplateImageryProvider({
-
url: 'http://www.google.cn/maps/vt?lyrs=s@716&x={x}&y={y}&z={z}'
-
}),
-
terrainProvider: Cesium.createWorldTerrain({
-
requestVertexNormals: true,
-
requestWaterMask: true
-
})
-
});
2、开启深度测试
-
viewer.scene.globe.enableLighting = true;
更多详情见小专栏此文章:GIS之家cesium小专栏
文章提供源码,对本专栏感兴趣的话,可以关注一波