# 2D Draw tools entities are not visible if 3D terrain is On

**URL:** <https://community.cesium.com/t/2d-draw-tools-entities-are-not-visible-if-3d-terrain-is-on/11919>\
**Category:** CesiumJS\
**Created:** [January 5, 2021, 7:49am UTC](https://community.cesium.com/t/2d-draw-tools-entities-are-not-visible-if-3d-terrain-is-on/11919 "2021-01-05T07:49:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shashi](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/shashi/32/3649_2.png) [@Shashi](https://community.cesium.com/u/Shashi)\
**Post date:** [January 5, 2021, 7:49am UTC](https://community.cesium.com/t/2d-draw-tools-entities-are-not-visible-if-3d-terrain-is-on/11919/1 "2021-01-05T07:49:34Z")

</div>

Hi all,  
I’m using 2D draw tools to draw many entities like a point, line, and polygon it’s working fine when the terrain is off(on 2D images) but when I open the 3D terrain it’s become invisible. I want a solution for how to be visible on 3D terrain also.  
Thanks in advance.  
Regards  
Shashi

---

<div class="post-metadata">

**Author:** ![hannah](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/hannah/32/4509_2.png) [@hannah](https://community.cesium.com/u/hannah)\
**Post date:** [January 5, 2021, 9:03pm UTC](https://community.cesium.com/t/2d-draw-tools-entities-are-not-visible-if-3d-terrain-is-on/11919/2 "2021-01-05T21:03:26Z")

</div>

Hello @Shashi,

Cesium does support drawing points, lines, and polygons on terrain, but you have to make sure you’re setting the correct options when you’re creating the entities. See [Cesium Sandcastle](https://sandcastle.cesium.com/?src=Clamp%20to%20Terrain.html&label=Geometries) for an example

Best regards,

Hannah

---

<div class="post-metadata">

**Author:** ![Shashi](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/shashi/32/3649_2.png) [@Shashi](https://community.cesium.com/u/Shashi)\
**Post date:** [January 8, 2021, 8:06am UTC](https://community.cesium.com/t/2d-draw-tools-entities-are-not-visible-if-3d-terrain-is-on/11919/3 "2021-01-08T08:06:13Z")

</div>

Dear Hannah,  
I’m trying to show points on click event using billboard it’s working fine but when i’m using " **heightReference: Cesium.HeightReference.CLAMP\_TO\_GROUND"** to make it visible on terrain it’s throwing error given below:-

 ![billboardTerrainError.PNG](https://global.discourse-cdn.com/cesium/original/3X/c/7/c78c1e9133002facf656a01f11fc6dd94641eea6.jpeg)  
all code snipped is here:  
toolbar.addListener(‘markerCreated’, function (event) {  
loggingMessage('Marker created at ’ + event.position.toString());  
// create one common billboard collection for all billboards  
var b = new Cesium.BillboardCollection();  
scene.primitives.add(b);  
var billboard = b.add({  
show: true,  
position: event.position,  
pixelOffset: new Cesium.Cartesian2(0, 0),  
eyeOffset: new Cesium.Cartesian3(0.0, 0.0, 0.0),  
horizontalOrigin: Cesium.HorizontalOrigin.CENTER,  
verticalOrigin: Cesium.VerticalOrigin.CENTER,

```
            scale: 1.0,
            image: 'assets/icon/icons8-marker-24.png',
            heightReference: Cesium.HeightReference.CLAMP_TO_GROUND, 
            color: new Cesium.Color(1.0, 1.0, 1.0, 1.0)
        });
        billboard.setEditable();   

    });

```

but if i’m using default its working fine code snippet is here:

text: “Draw Billboard”,  
onselect: function () {  
var e = viewer.entities.add({  
position: Cesium.Cartesian3.fromDegrees(-122.1958, 46.1915),  
billboard: {  
image: “…/images/facility.gif”,  
heightReference: Cesium.HeightReference.CLAMP\_TO\_GROUND,  
},  
});  
viewer.trackedEntity = e;  
},

if i’m using RELATIVE\_TO\_GROUND then error is not throwing but it not visible on my terrain.  
**Note:- The terrain does not belongs to the cesium.**  
Best Regards  
Shashi

---

<div class="post-metadata">

**Author:** ![hannah](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/hannah/32/4509_2.png) [@hannah](https://community.cesium.com/u/hannah)\
**Post date:** [January 8, 2021, 6:40pm UTC](https://community.cesium.com/t/2d-draw-tools-entities-are-not-visible-if-3d-terrain-is-on/11919/4 "2021-01-08T18:40:26Z")

</div>

You need to pass the scene to your BillboardCollection: [BillboardCollection - Cesium Documentation](https://cesium.com/docs/cesiumjs-ref-doc/BillboardCollection.html)

If you use `CesiumUnminified/Cesium.js` during development, you will get more useful error messages.

-Hannah

---

<div class="post-metadata">

**Author:** ![Shashi](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/shashi/32/3649_2.png) [@Shashi](https://community.cesium.com/u/Shashi)\
**Post date:** [January 9, 2021, 6:24am UTC](https://community.cesium.com/t/2d-draw-tools-entities-are-not-visible-if-3d-terrain-is-on/11919/5 "2021-01-09T06:24:23Z")

</div>

Thank you so much.
