Type Alias: SizeBy
SizeBy = {
mode?:"continuous";range: [number,number];thresholds?:number[];transform?:"linear"|"sqrt"; } | {mode:"stepped";range: [number,number];thresholds?:number[];transform?:"linear"; }
Defined in: spec/types.ts:236
Proportional symbol configuration that maps the numeric mapData value
to circle-radius via MapLibre expressions.
When mode is 'continuous' (default), the radius is linearly interpolated
across the data range. A sqrt transform can be applied so that circle
area (not radius) is proportional to the value — both the input value
and the data bounds are transformed to sqrt space so output radii stay
within [minRadius, maxRadius].
When mode is 'stepped', the data range is split into discrete bins by
thresholds and each bin receives a fixed radius. The sqrt transform is
not allowed in stepped mode.
Union Members
Type Literal
{ mode?: "continuous"; range: [number, number]; thresholds?: number[]; transform?: "linear" | "sqrt"; }
mode?
optionalmode?:"continuous"
Interpolation mode. Default (or omitted) is 'continuous'.
range
range: [
number,number]
Output radius range in pixels [minRadius, maxRadius]. Both must be > 0.
thresholds?
optionalthresholds?:number[]
Explicit break points. When omitted, thresholds are inherited from the active legend.
transform?
optionaltransform?:"linear"|"sqrt"
Radius transformation. Default: 'linear'.
Use 'sqrt' so circle AREA is proportional to the value.
Type Literal
{ mode: "stepped"; range: [number, number]; thresholds?: number[]; transform?: "linear"; }
mode
mode:
"stepped"
Stepped mode: each bin receives a fixed radius.
range
range: [
number,number]
Output radius range in pixels [minRadius, maxRadius]. Both must be > 0.
thresholds?
optionalthresholds?:number[]
Explicit break points. When omitted, thresholds are inherited from the active legend.
transform?
optionaltransform?:"linear"
Only 'linear' is allowed in stepped mode.