For AI agents: a documentation index is available at /llms.txt. Markdown versions of all pages are available by appending .md to any URL.
Type Alias MapTilerMarkerBaseOptions
MarkerOptions,
"scale"
| "opacity"
| "opacityWhenCovered"
| "color",
> & {
animations?: MapTilerMarkerAnimations;
collisionBehaviour?: CollisionBehaviour;
collisionRadius?: number;
content?: string;
contentColor?: string;
debug?: boolean;
htmlAttributes?: Record<string, number | string>;
innerColor?: string;
lngLat?: LngLatLike;
minimizedOptions?: MarkerMinimizedOptions;
name?: string;
opacity?: number;
opacityWhenCovered?: number;
outerColor?: string;
outline?: true | number;
outlineColor?: string;
priority?: number | MarkerPriorityExpression;
scale?: Vector2;
shadow?: MapTilerMarkerShadow;
shape?: MapTilerMarkerShape;
size?: MapTilerMarkerSize;
states?: MapTilerMarkerUIStates;
title?: string;
transitions?: MapTilerMarkerTransitions;
userData?: Record<string, unknown>;
visible?: boolean;
}
Type Declaration
Optionalanimations?: MapTilerMarkerAnimationsOptionalcollisionBehaviour?: CollisionBehaviourBehaviour when this marker spatially overlaps another. Overrides the map-level default (see
MarkerCollisionOptions).OptionalcollisionRadius?: numberCollision detection radius in pixels.
0means the marker's bounding box is used.Optionalcontent?: stringText content rendered inside the marker body.
OptionalcontentColor?: stringColour applied to the marker content (icon, text, etc.). Defaults to the current map style's colour, like
innerColor.Optionaldebug?: booleanWhen
true, renders a debug overlay showing the marker's bounding box and center point.OptionalhtmlAttributes?: Record<string, number | string>HTML attributes applied directly to the marker's root element.
OptionalinnerColor?: stringFill colour of the inner area of the marker. Defaults to a colour chosen for the current map style, re-resolved whenever the style changes. Setting it explicitly makes the colour static.
OptionallngLat?: LngLatLikePosition of the marker. Can also be set later with
setLngLat().OptionalminimizedOptions?: MarkerMinimizedOptionsVisual overrides applied while the marker is minimized by the
minimize-by-prioritycollision behaviour. Merged over the default minimized appearance ({ size: "xs" }).Optionalname?: stringOptional marker name, added as a CSS class on the marker element. Must be safe for use as a CSS class name.
Optionalopacity?: numberOptionalopacityWhenCovered?: numberOptionalouterColor?: stringFill colour of the outer area (body/border) of the marker. Defaults to the current map style's colour, like
innerColor.Optionaloutline?: true | numberOutline width in pixels. Pass
trueto use the default width.OptionaloutlineColor?: stringColour of the marker outline. Defaults to the current map style's colour, like
innerColor.Optionalpriority?: number | MarkerPriorityExpressionRendering priority used for collision detection. Accepts a numeric value or a MapLibre-style expression.
Optionalscale?: Vector22-D scale of the marker as
[x, y]. Defaults to[1, 1].Optionalshadow?: MapTilerMarkerShadowDrop-shadow intensity. Defaults per size:
"strong"atl,"medium"atm,"soft"atsandxs; use"none"to disable.Optionalshape?: MapTilerMarkerShapeVisual shape of the marker body. Defaults to
"maptiler".Optionalsize?: MapTilerMarkerSizeSize of the marker.
Optionalstates?: MapTilerMarkerUIStatesPer-state property overrides applied while the marker is hovered, focused, active (pointer down), or being dragged.
Optionaltitle?: stringApplied to the
titleattribute of the marker's root element (native tooltip).Optionaltransitions?: MapTilerMarkerTransitionsPer-property easing applied when a transitionable property (
position,scale,rotation, or a colour) is next set, instead of the change snapping immediately. See setTransitionForProperty.OptionaluserData?: Record<string, unknown>Arbitrary user-defined data attached to the marker instance.
Optionalvisible?: booleanInitial visibility of the marker. Defaults to
true. TODO: not implemented yet.
Lifecycle animations played as the marker enters, idles on, and exits the map.