Перейти к основному содержимому

typeAlias

ControlPosition​

Possible position of the control.

"topLeft"|"topCenter"|"topRight"|"centerLeft"|"centerRight"|"bottomLeft"|"bottomCenter"|"bottomRight"

DiscardApplyOptions​

"maxBounds"|"styleZoom"|"modelsTilesUrl"|"modelsTileSet"|"defaultSourceModelsRootUrl"|"defaultSourceModelsAppearStrategy"|"sessionId"|"tileSessionId"|"tileServerDefaultLang"|"keepCenterWhileUserZoomRotate"|"preserveDrawingBuffer"|"useRtlTextPlugin"|"rtlPluginUrl"|"rtlPluginHash"|"commercialPoiRandomSeed"|"disableSurvivedPoiPrevalence"|"webglVersion"|"disableBssStatistics"|"disableBssStatisticsForCommPoi"|"bssUrl"|"disableAntiAliasing"|"key"|"zoomControl"|"trafficControl"|"scaleControl"|"floorControl"|"copyright"|"interactiveCopyright"|"autoHideOSMCopyright"|"controlsLayoutPadding"|"styleState"|"styleOptions"|"styleServer"|"tileServer"|"tileProtocol"|"tileSet"|"commercialTileSet"|"trafficServer"|"trafficProtocol"|"floorsEnabled"|"disableAnalytics"|"subdomains"|"cameraConfig"|"trafficMinZoom"|"trafficMaxZoom"|"dracoDecoderUrl"|"trafficMaxDetailLevel"|"bssHostAppParams"|"modelShowHideEventsSublayers"|"graphicsPreset"|"renderer"|"webgpuOptions"

Easing​

A set of easing functions (https://easings.net/en).

"linear"|"easeInQuad"|"easeOutQuad"|"easeInOutQuad"|"easeInCubic"|"easeOutCubic"|"easeInOutCubic"|"easeInQuart"|"easeOutQuart"|"easeInOutQuart"|"easeInQuint"|"easeOutQuint"|"easeInOutQuint"|"easeInSine"|"easeOutSine"|"easeInOutSine"|"easeInExpo"|"easeOutExpo"|"easeInOutExpo"|"easeInCirc"|"easeOutCirc"|"easeInOutCirc"|"easeInElastic"|"easeOutElastic"|"easeInOutElastic"|"easeInBack"|"easeOutBack"|"easeInOutBack"|"easeOutBounce"

EventTargetData​

The target data of a pointer event.

GeoJsonEventTargetData|DefaultEventTargetData

Expression​

[ExpressionName, ...ExpressionArg[]]

ExpressionName​

TypeExpressionName|ExtractorExpressionName|LogicalExpressionName|MathExpressionName|InterpolateExpressionName|StringExpressionName|"pattern"

ExtractorExpressionName​

"get"|"source-attr"|"feature-state"|"global"|"sourceAttr"|"featureState"

GraphicsPresetFeatureFlag​

Graphics preset feature flags.

"skyOff"|"fogOff"|"shadowsOff"|"immersiveRoadsOff"|"reliefOff"|"modelsOff"|"globeOff"

GraphicsPresetName​

"light"|"normal"|"immersive"

InterpolateExpression​

["interpolate", ["linear"]|["exponential", number], ["zoom"], ...T[]]

InterpolateExpressionName​

"interpolate"|"step"

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.

"disabled"|"main"|"dependent"

Layer​

For more information on how to use style layers, refer to the MapGL JS API documentation.

PolygonStyleLayer|LineStyleLayer|DashedLineStyleLayer|PointStyleLayer|RasterStyleLayer|HeatmapStyleLayer|ModelStyleLayer|PolygonExtrusionStyleLayer|LineExtrusionStyleLayer|Polygon3dStyleLayer|MetricPointStyleLayer|LabelLineStyleLayer|GroupStyleLayer

LogicalExpressionName​

"!"|"=="|"!="|">"|">="|"<"|"<="|"match"|"all"|"any"|"in"

MathExpressionName​

"^"|"log10"

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]

& Partial<ParticleGravityAffectorOptions>|& Partial<ParticleBuoyancyAffectorOptions>|& Partial<ParticleWindAffectorOptions>|& Partial<ParticleDragAffectorOptions>|& Partial<ParticleTurbulenceAffectorOptions>|& Partial<ParticleWrapAffectorOptions>

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.

"camera"|ParticleAnchorPosition|ParticleAnchorObject

ParticleAnchorPosition​

Fixed geographical position: [lng, lat] or [lng, lat, altitude(m)] .

readonly [lng: number, lat: number]|readonly [lng: number, lat: number, altitude: number]

ParticleColor​

RGBA color, components in the [0, 1] range.

readonly [r: number, g: number, b: number, a: number]

ParticleColorCurve​

Color curve over the normalized particle lifetime.

ParticleCurve<ParticleColorInput>

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.

ParticleColor|string

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]

T|ReadonlyArray<ParticleCurveKey<T>>

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.

"linear"|"step"|"smooth"|"ease-in"|"ease-out"|"ease-in-out"

ParticleRenderMode​

Particle rendering mode:

'billboard' — a flat sprite facing the camera;

'stretch' — stretched along the velocity direction (rain).

"billboard"|"stretch"

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]

ParticlePointShapeOptions|ParticleSphereShapeOptions|ParticleCircleShapeOptions|ParticleBoxShapeOptions

PolylineRenderingMode​

Defines the polyline rendering mode. Use:

  • '3d' to use the depth buffer.
  • '2d' to add a layer with no depth.
"2d"|"3d"

Source​

GeoJsonSource|RasterTileSource

StringExpressionName​

"concat"|"format"

StyleIconConfig​

Config of an original user icon. Only SVG images are supported.

StyleSimpleIconConfig|StyleStretchableIconConfig

SupportedSimpleOpts​

"disableDragging"|"enableTrackResize"|"loopWorld"|"disableHidingPois"|"enableTwoFingerDragging"

TileCoords​

Tile coordinates [x, y, zoom]

[number, number, number]

TypeExpressionName​

"to-boolean"|"to-color"|"literal"|"toBoolean"|"toColor"

UserData​

any

WebGLContext​

WebGLRenderingContext|WebGL2RenderingContext

WebGLVersion​

1|2