to String
Converts the input value to a string. If the input is null, the result is null. If the input is a boolean, the result is true or false. If the input is a number, it is converted to a string by NumberToString in the ECMAScript Language Specification. If the input is a color, it is converted to a string of the form "rgba(r,g,b,a)", where `r`, `g`, and `b` are numerals ranging from 0 to 255, and `a` ranges from 0 to 1. Otherwise, the input is converted to a string in the format specified by the JSON.stringify in the ECMAScript Language Specification.
Example usage:
SymbolLayer symbolLayer = new SymbolLayer("layer-id", "source-id");
symbolLayer.setProperties(
textField(get("key-to-number-value"))
);
Return
expression
Parameters
expression input
See also
Returns a string representation of the object that matches the definition set in the style specification.
If this expression contains a coma (,) delimited literal, like 'rgba(r, g, b, a)`, it will be enclosed with double quotes (").
Return
a string representation of the object.