Method
MaplibreNativeFfiStyleExpressionevaluate
Declaration [src]
char*
maplibre_native_ffi_style_expression_evaluate (
MaplibreNativeFfiStyleExpression* self,
MaplibreNativeFfiStyleExpressionInputs* inputs,
GError** error
)
Description [src]
Evaluates a style expression and writes its result as JSON.
A number in the result that isn’t finite becomes null. A color is ["rgba",
r, g, b, a], with red, green, and blue from 0 to 255 and alpha from 0 to 1,
each exact only to single precision. Formatted text is a ["format", …]
expression, an image is {"name": …, "available": …}, padding is [top,
right, bottom, left], and a variable anchor offset is [anchor, [x, y], …].
See mln_style_expression_evaluate in the
C API reference.
It fails with these errors:
MAPLIBRE_NATIVE_FFI_ERROR_INVALID_ARGUMENTwhen the expression fails to evaluate, such as when it reads an input thatinputsdoesn’t set.
Parameters
inputs-
Type:
MaplibreNativeFfiStyleExpressionInputsThe value, or
NULL.The argument can be NULL.The data is owned by the caller of the method. error-
Type:
GError **The return location for a recoverable error.
The argument can be NULL.If the return location is not NULL, then you must initialize it to aNULLGError*.The argument will be left initialized to NULLby the method if there are no errors.In case of error, the argument will be set to a newly allocated GError; the caller will take ownership of the data, and be responsible for freeing it.