show

Gets or sets the StyleExpression object used to evaluate the style's show property. Alternatively a boolean, string, or object defining a show style can be used. The getter will return the internal Expression or ConditionsExpression, which may differ from the value provided to the setter.

The expression must return or convert to a Boolean.

This expression is applicable to all tile formats.

const style = new Cesium3DTileStyle({
show : '(regExp("^Chest").test(${County})) && (${YearBuilt} >= 1970)'
});
style.show.evaluate(feature); // returns true or false depending on the feature's properties
const style = new Cesium3DTileStyle();
// Override show expression with a custom function
style.show = {
evaluate : function(feature) {
return true;
}
};
const style = new Cesium3DTileStyle();
// Override show expression with a boolean
style.show = true;
};
const style = new Cesium3DTileStyle();
// Override show expression with a string
style.show = '${Height} 0';
};
const style = new Cesium3DTileStyle();
// Override show expression with a condition
style.show = {
conditions: [
['${height} 2', 'false'],
['true', 'true']
];
};

See also