For AI agents: a documentation index is available at /llms.txt. Markdown versions of all pages are available by appending .md to any URL.
Class StylePropertyFunction<T>
Type Parameters
- T
Index
Constructors
Properties
Methods
Constructors
constructor
- new StylePropertyFunction<T>(
parameters: PropertyValueSpecification<T>,
rootKey: string,
specification: StylePropertySpecification,
): StylePropertyFunction<T>Type Parameters
- T
Parameters
- parameters: PropertyValueSpecification<T>
- rootKey: string
- specification: StylePropertySpecification
Returns StylePropertyFunction<T>
Properties
globalStateRefs
globalStateRefs: Set<string>
interpolationFactor
interpolationFactor: (input: number, lower: number, upper: number) => number
interpolationType
isStateDependent
isStateDependent: boolean
kind
kind: "source" | "camera" | "composite"
zoomStops
zoomStops: number[]
Methods
evaluate
Parameters
- globals: GlobalProperties
Global evaluation properties (e.g. zoom)
Optionalfeature: FeatureThe feature being evaluated, if any
Returns any
The function result, or the spec default if evaluation throws
- globals: GlobalProperties
Staticdeserialize
- deserialize<T>(
serialized: {
_parameters: PropertyValueSpecification<T>;
_rootKey: string;
_specification: StylePropertySpecification;
},
): StylePropertyFunction<T>Type Parameters
- T
Parameters
- serialized: {
_parameters: PropertyValueSpecification<T>;
_rootKey: string;
_specification: StylePropertySpecification;
}
Returns StylePropertyFunction<T>
Staticserialize
- serialize<T>(
input: StylePropertyFunction<T>,
): {
_parameters: PropertyValueSpecification<T>;
_rootKey: string;
_specification: StylePropertySpecification;
}Type Parameters
- T
Parameters
- input: StylePropertyFunction<T>
Returns {
_parameters: PropertyValueSpecification<T>;
_rootKey: string;
_specification: StylePropertySpecification;
}
Evaluates the legacy function, handling a runtime throw (e.g. interpolating mismatched value types) by warning with the property location and falling back to the spec default, mirroring StyleExpression.evaluate.