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

MapTilerMarkerBaseOptions: Omit<
    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?: MapTilerMarkerAnimations

    Lifecycle animations played as the marker enters, idles on, and exits the map.

  • OptionalcollisionBehaviour?: CollisionBehaviour

    Behaviour when this marker spatially overlaps another. Overrides the map-level default (see MarkerCollisionOptions).

  • OptionalcollisionRadius?: number

    Collision detection radius in pixels. 0 means the marker's bounding box is used.

  • Optionalcontent?: string

    Text content rendered inside the marker body.

  • OptionalcontentColor?: string

    Colour applied to the marker content (icon, text, etc.). Defaults to the current map style's colour, like innerColor.

  • Optionaldebug?: boolean

    When 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?: string

    Fill 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?: LngLatLike

    Position of the marker. Can also be set later with setLngLat().

  • OptionalminimizedOptions?: MarkerMinimizedOptions

    Visual overrides applied while the marker is minimized by the minimize-by-priority collision behaviour. Merged over the default minimized appearance ({ size: "xs" }).

  • Optionalname?: string

    Optional marker name, added as a CSS class on the marker element. Must be safe for use as a CSS class name.

  • Optionalopacity?: number
  • OptionalopacityWhenCovered?: number
  • OptionalouterColor?: string

    Fill colour of the outer area (body/border) of the marker. Defaults to the current map style's colour, like innerColor.

  • Optionaloutline?: true | number

    Outline width in pixels. Pass true to use the default width.

  • OptionaloutlineColor?: string

    Colour of the marker outline. Defaults to the current map style's colour, like innerColor.

  • Optionalpriority?: number | MarkerPriorityExpression

    Rendering priority used for collision detection. Accepts a numeric value or a MapLibre-style expression.

  • Optionalscale?: Vector2

    2-D scale of the marker as [x, y]. Defaults to [1, 1].

  • Optionalshadow?: MapTilerMarkerShadow

    Drop-shadow intensity. Defaults per size: "strong" at l, "medium" at m, "soft" at s and xs; use "none" to disable.

  • Optionalshape?: MapTilerMarkerShape

    Visual shape of the marker body. Defaults to "maptiler".

  • Optionalsize?: MapTilerMarkerSize

    Size of the marker.

  • Optionalstates?: MapTilerMarkerUIStates

    Per-state property overrides applied while the marker is hovered, focused, active (pointer down), or being dragged.

  • Optionaltitle?: string

    Applied to the title attribute of the marker's root element (native tooltip).

  • Optionaltransitions?: MapTilerMarkerTransitions

    Per-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?: boolean

    Initial visibility of the marker. Defaults to true. TODO: not implemented yet.

Was this helpful?