# Billboard disappears when zooming in

**URL:** <https://community.cesium.com/t/billboard-disappears-when-zooming-in/29348>\
**Category:** CesiumJS\
**Created:** [January 16, 2024, 10:13pm UTC](https://community.cesium.com/t/billboard-disappears-when-zooming-in/29348 "2024-01-16T22:13:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![veer\_shetty](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/veer_shetty/32/21514_2.png) [@veer\_shetty](https://community.cesium.com/u/veer_shetty)\
**Post date:** [January 16, 2024, 10:13pm UTC](https://community.cesium.com/t/billboard-disappears-when-zooming-in/29348/1 "2024-01-16T22:13:42Z")

</div>

For the life of my I cant figure out why the smiley face keep going under the terrain as I move closer and closer to it. we are making a dashboard and need to have utility icons right above buildings. here is what it looks like. here is my code= var viewer = new Cesium.Viewer(‘cesiumContainer’, {  
scene3DOnly: true,  
terrainProvider: Cesium.createWorldTerrain()  
});

```
const tileset = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({
    url: "https://tile.googleapis.com/v1/3dtiles/root.json?key=YOUR_API_KEY",
    showCreditsOnScreen: true,
  }));

var x = 0.1;
var y = 0.1;
function addBillboard(x, y) {
    viewer.entities.add({
      position: Cesium.Cartesian3.fromDegrees(-106.6504 + x, 35.0844 + y),
      billboard: {
        image: 'smiley2.png', // Make sure this points to your image
        scale : 0.05, // Adjust the scale as needed
        verticalOrigin: Cesium.VerticalOrigin.BOTTOM, // Aligns the bottom of the billboard
        heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
        pixelOffset: new Cesium.Cartesian2(0, -50), // Lift the billboard up by 50 pixels from its base
        eyeOffset: new Cesium.Cartesian3(0.0, 0.0, -10.0), // Pushes the billboard slightly away from the viewer's eye
        scaleByDistance: new Cesium.NearFarScalar(1.5e2, 1.0, 1.5e7, 0.5), // Adjust scale by distance
     
    }
    });
  }
  

// Add 20 billboards
viewer.scene.globe.depthTestAgainstTerrain = true;

```

addBillboard(x, y);

// Fly the camera to the initial position  
viewer.camera.flyTo({  
destination: Cesium.Cartesian3.fromDegrees(-106.6504, 35.0844, 3000),  
orientation: {  
heading: Cesium.Math.toRadians(0),  
pitch: Cesium.Math.toRadians(-45),  
roll: 0.0  
}  
});

// Ensure the globe shows  
viewer.scene.globe.show = false;

 ![Screen Shot 2024-01-16 at 5.13.14 PM](https://global.discourse-cdn.com/cesium/original/3X/c/c/cc3f7e3dce306fb1b78ac3502b7cb17c18baa88e.jpeg)
