Package org.geotools.mbstyle.expression
Class MBFormat
Object
ExpressionAbstract
FunctionImpl
MBExpression
MBFormat
- All Implemented Interfaces:
Expression,Function
Mapbox "format" expression: builds display text from alternating (input, options) sections.
["format", input_1, options_1, ..., input_n, options_n]
Only the text content is honored: the section option objects (per-section "text-font", "font-scale", "text-color") are dropped and the inputs are concatenated into a single string, so the label renders in one font. Full fidelity needs per-run fonts, which SLD text symbolizers cannot express today.
-
Field Summary
Fields inherited from class MBExpression
colors, decisions, featureData, ff, format, heatMap, json, lookUp, math, name, parse, ramps, string, transformer, types, variableBindings, zoomFields inherited from class FunctionImpl
functionNameFields inherited from interface Expression
NIL -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionformat()Returns the concatenation of the section inputs, ignoring the section options.Determines which expression to use.Methods inherited from class MBExpression
canCreate, create, getName, throwInsufficientArgumentCount, throwUnexpectedArgumentCount, transformExpression, transformLiteralMethods inherited from class FunctionImpl
accept, dispatchArguments, equals, evaluate, functionName, getFallbackValue, getFunctionName, getParameters, getParameterValue, getParameterValue, hashCode, setFallbackValue, setName, setParameters, toStringMethods inherited from class ExpressionAbstract
evaluateMethods inherited from interface Expression
evaluate
-
Constructor Details
-
MBFormat
public MBFormat(JSONArray json)
-
-
Method Details
-
format
Returns the concatenation of the section inputs, ignoring the section options. -
getExpression
Description copied from class:MBExpressionDetermines which expression to use.- Specified by:
getExpressionin classMBExpression- Throws:
MBFormatException
-