Cesium: Billboard ground & detail parameter adjustment

1. Non-terrain sticky ground

2. Stick to the terrain


1. "Stick to the ground" without terrain

        When Cesium creates the Viewer viewer object, when we specify the terrainProvier property as the EllipsoidTerrainProviderd object, then it corresponds to the 3D scene without terrain.

const viewer = new Cesium(targetID,{
    ...,
    terrainProvider: new Cesium.EllipsoidTerrainProvider({
            ellipsoid: Cesium.Ellipsoid.WGS84,
    }),
    ...
})


        In this case, the Billboard is actually attached to the ground by default, but when using it, you need to pay attention to some details, that is, the horizontal and vertical alignment effect of the image icon. For example, the simplest code to load Billboard is (for reference, we also create a point with an elevation of 0),

    

Guess you like

Origin blog.csdn.net/weixin_43524214/article/details/129791415