typeAlias
ControlPosition
Possible position of the control.
DiscardApplyOptions
Easing
A set of easing functions (https://easings.net/en).
EventTargetData
The target data of a pointer event.
Expression
ExpressionName
ExtractorExpressionName
GraphicsPresetFeatureFlag
Graphics preset feature flags.
GraphicsPresetName
InterpolateExpression
InterpolateExpressionName
LabelingDependentPart
Role of an object in a dependent labeling group:
disabled
— the object does not take part in dependencies;
main
— the main object: if none of the main objects survived, dependent objects are hidden;
dependent
— the dependent object: hidden when none of the main objects survived.
Layer
For more information on how to use style layers, refer to the MapGL JS API documentation.
LogicalExpressionName
MathExpressionName
ParticleAffector
Declarative affector — a force applied to every particle each frame.
Affectors are passed as a map
{ name: config }
; the key is the unique name
inside the system and is not a part of the config itself. See
ParticleSystemOptions.affectors .
Every field except
type
is optional: omitted values fall back to the
affector's default, documented per field. This makes the config a patch —
{ type: 'drag' }
is a valid affector, and
{ type: 'wind', enabled: false }
only switches an affector off.
Affectors act on the motion (velocity, position). Everything visual — size, rotation, color over the lifetime — lives in
ParticleEmitterOptions.appearance .
All spatial values are in meters, meters per second and meters per second squared, independent of how the system is anchored.
@example [object Object]
ParticleAnchor
Anchor of a particle system — the world point every emitter of the system is bound to:
'camera'
— the system follows the camera (rain, snow);
[lng, lat, altitude?]
— a fixed geographical position (smoke, fountain);
- a map object — particles follow the object ( ParticleAnchorObject ).
The anchor defines only the reference point. An emitter is shifted from it by
its own
offset
, and the shift is baked into particle positions at spawn:
moving the emitter leaves the already born particles behind. The offset works
for every kind of anchor — a
'camera'
system simply lives in metres, so the
shift is measured in camera-local metres.
Always required: the anchor is not a cosmetic default but the coordinate
space of the whole system (a
'camera'
system is drawn in meters with its own
projection, the others in map points). Guessing it wrong turns smoke at a
chimney into snow around the camera.
ParticleAnchorPosition
Fixed geographical position:
[lng, lat]
or
[lng, lat, altitude(m)]
.
ParticleColor
RGBA color, components in the [0, 1] range.
ParticleColorCurve
Color curve over the normalized particle lifetime.
ParticleColorInput
A color in a particle config.
Written in any of the usual ways:
- RGBA components in [0, 1] —
[1, 1, 1, 0.85]; - hex —
'#ffffff','#ffff','#ffffffff'; - CSS function with comma-separated components —
'rgb(255, 255, 255)',
'rgba(255, 255, 255, 0.85)'
,
'hsl(0, 0%, 100%)'
,
'hsla(0, 0%, 100%, 0.85)'
.
Anything else is not supported: color names (
'red'
), the space-separated
CSS syntax (
'rgb(255 255 255 / 0.85)'
) and percentage components in
rgb()
/
rgba()
(
'rgb(100%, 0%, 0%)'
) — the same set as in the map
styles. A string that cannot be parsed is reported in the console and the
particle keeps its default color.
ParticleCurve
Curve of values over the normalized particle lifetime.
Three forms, from the shortest to the full one:
- a constant — one value for the whole lifetime (
scale: 2); - a constant vector, for color curves (
color: [1, 1, 1, 0]); - an array of keys (
[{ t: 0, value: 1 }, { t: 1, value: 0 }]).
The library sorts the keys by
t
on input, so the order in the passed array
does not matter. A curve is treated as immutable once passed into a config: it
is compiled once, and mutating the array afterwards has no effect — use
patchEmitter
/
patchAffector
instead.
T
is the type of a single value:
number
for scalar curves,
ParticleColor for ParticleColorCurve .
@example [object Object]
ParticleCurveEasing
How a curve moves from one key to the next.
Easing belongs to a key, not to the whole curve: it describes how the value leaves that key. Otherwise "hold a plateau, then fade sharply" requires duplicated keys, and "ease in, then fade linearly" is impossible.
'linear'
— even transition, the default;
'step'
— holds the key value until the next one (a staircase);
'smooth'
— smooth start and smooth end (smoothstep);
'ease-in'
— slow start, accelerating towards the end of the segment;
'ease-out'
— fast start, decelerating towards the end of the segment;
'ease-in-out'
— slow start and slow end.
Every variant except
'step'
yields
0
at the segment start and
1
at its
end, so the values at the keys stay exactly as specified.
ParticleRenderMode
Particle rendering mode:
'billboard'
— a flat sprite facing the camera;
'stretch'
— stretched along the velocity direction (rain).
ParticleShapeOptions
Shape of the volume where particles are born.
type
is the discriminant: every shape carries its own size, all in meters.
The sizes are resolved — a config read back from the system always contains a
concrete
radius
/
size
, never
undefined
— so it can be passed back
unchanged.
The shape defines only the birth geometry. Its position is not a part of the
config: it comes from the anchor (
ParticleSystemOptions.anchor
) plus
the emitter's own
offset
.
@example [object Object]
PolylineRenderingMode
Defines the polyline rendering mode. Use:
- '3d' to use the depth buffer.
- '2d' to add a layer with no depth.
Source
StringExpressionName
StyleIconConfig
Config of an original user icon. Only SVG images are supported.
SupportedSimpleOpts
TileCoords
Tile coordinates [x, y, zoom]