setVisibility method for layer switcher

I was trying to use setVisibility method for switching my WMS geoserver layer inside viewer

this is the example:

$("#hot").prop(‘checked’, true);

function checkHot () {

if ($("#hot").prop(‘checked’)==true) {


} else {




$("#hot").change(function event(){checkHot()});

but it didn’t work

my firebug detected that setVisibility is not a function

plz help…

Best Regards…


Hi Nakula,
Please refer to the api documentation ( or source code and search for ImageryLayer. The property you are looking for is “show”. = true;

Somewhat recently Cesium moved from setters/getters to javascript properties, e.g. show vs setShow(). Keep this in mind as you stumble upon older posts on the internet.


Ok I’ll try it out

Thanks so much

It’s working…

Thanks a lot sir… :smiley: