labelText
Gets or sets the StyleExpression object used to evaluate the style's labelText
property. Alternatively a string or object defining a string 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 a String
.
This expression is only applicable to point features in a Vector tile.
const style = new Cesium3DTileStyle({
labelText : '(${Temperature} 90) ? ">90" : "<=90"'
});
style.labelText.evaluate(feature); // returns a String
Content copied to clipboard
const style = new Cesium3DTileStyle();
// Override labelText expression with a custom function
style.labelText = {
evaluate : function(feature) {
return 'Example label text';
}
};
Content copied to clipboard