---
title: "MapTilerMarkerBaseOptions | JavaScript maps SDK"
description: "Documentation for MapTiler SDK"
---

> For AI agents: a documentation index is available at [/llms.txt](https://docs.maptiler.com/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

# Type Alias MapTilerMarkerBaseOptions

MapTilerMarkerBaseOptions: [Omit](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.Omit/)<  
    [MarkerOptions](https://docs.maptiler.com/sdk-js/api-reference/types/MarkerOptions/),  
    "scale"  
    | "opacity"  
    | "opacityWhenCovered"  
    | "color",  
\> & {  
    animations?: [MapTilerMarkerAnimations](https://docs.maptiler.com/sdk-js/api-reference/types/MapTilerMarkerAnimations/);  
    collisionBehaviour?: [CollisionBehaviour](https://docs.maptiler.com/sdk-js/api-reference/types/CollisionBehaviour/);  
    collisionRadius?: number;  
    content?: string;  
    contentColor?: string;  
    debug?: boolean;  
    htmlAttributes?: [Record](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.Record/)<string, number | string\>;  
    innerColor?: string;  
    lngLat?: [LngLatLike](https://docs.maptiler.com/sdk-js/api-reference/types/LngLatLike/);  
    minimizedOptions?: [MarkerMinimizedOptions](https://docs.maptiler.com/sdk-js/api-reference/types/MarkerMinimizedOptions/);  
    name?: string;  
    opacity?: number;  
    opacityWhenCovered?: number;  
    outerColor?: string;  
    outline?: true | number;  
    outlineColor?: string;  
    priority?: number | [MarkerPriorityExpression](https://docs.maptiler.com/sdk-js/api-reference/types/MarkerPriorityExpression/);  
    scale?: [Vector2](https://docs.maptiler.com/sdk-js/api-reference/types/Vector2/);  
    shadow?: [MapTilerMarkerShadow](https://docs.maptiler.com/sdk-js/api-reference/types/MapTilerMarkerShadow/);  
    shape?: [MapTilerMarkerShape](https://docs.maptiler.com/sdk-js/api-reference/types/MapTilerMarkerShape/);  
    size?: [MapTilerMarkerSize](https://docs.maptiler.com/sdk-js/api-reference/types/MapTilerMarkerSize/);  
    states?: [MapTilerMarkerUIStates](https://docs.maptiler.com/sdk-js/api-reference/types/MapTilerMarkerUIStates/);  
    title?: string;  
    transitions?: [MapTilerMarkerTransitions](https://docs.maptiler.com/sdk-js/api-reference/types/MapTilerMarkerTransitions/);  
    userData?: [Record](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.Record/)<string, unknown\>;  
    visible?: boolean;  
}

#### Type Declaration

-   ##### `Optional`animations?: [MapTilerMarkerAnimations](https://docs.maptiler.com/sdk-js/api-reference/types/MapTilerMarkerAnimations/)
    
    Lifecycle animations played as the marker enters, idles on, and exits the map.
    
-   ##### `Optional`collisionBehaviour?: [CollisionBehaviour](https://docs.maptiler.com/sdk-js/api-reference/types/CollisionBehaviour/)
    
    Behaviour when this marker spatially overlaps another. Overrides the map-level default (see `MarkerCollisionOptions`).
    
-   ##### `Optional`collisionRadius?: number
    
    Collision detection radius in pixels. `0` means the marker's bounding box is used.
    
-   ##### `Optional`content?: string
    
    Text content rendered inside the marker body.
    
-   ##### `Optional`contentColor?: string
    
    Colour applied to the marker content (icon, text, etc.). Defaults to the current map style's colour, like `innerColor`.
    
-   ##### `Optional`debug?: boolean
    
    When `true`, renders a debug overlay showing the marker's bounding box and center point.
    
-   ##### `Optional`htmlAttributes?: [Record](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.Record/)<string, number | string\>
    
    HTML attributes applied directly to the marker's root element.
    
-   ##### `Optional`innerColor?: 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.
    
-   ##### `Optional`lngLat?: [LngLatLike](https://docs.maptiler.com/sdk-js/api-reference/types/LngLatLike/)
    
    Position of the marker. Can also be set later with `setLngLat()`.
    
-   ##### `Optional`minimizedOptions?: [MarkerMinimizedOptions](https://docs.maptiler.com/sdk-js/api-reference/types/MarkerMinimizedOptions/)
    
    Visual overrides applied while the marker is minimized by the `minimize-by-priority` collision behaviour. Merged over the default minimized appearance (`{ size: "xs" }`).
    
-   ##### `Optional`name?: string
    
    Optional marker name, added as a CSS class on the marker element. Must be safe for use as a CSS class name.
    
-   ##### `Optional`opacity?: number
    
-   ##### `Optional`opacityWhenCovered?: number
    
-   ##### `Optional`outerColor?: string
    
    Fill colour of the outer area (body/border) of the marker. Defaults to the current map style's colour, like `innerColor`.
    
-   ##### `Optional`outline?: true | number
    
    Outline width in pixels. Pass `true` to use the default width.
    
-   ##### `Optional`outlineColor?: string
    
    Colour of the marker outline. Defaults to the current map style's colour, like `innerColor`.
    
-   ##### `Optional`priority?: number | [MarkerPriorityExpression](https://docs.maptiler.com/sdk-js/api-reference/types/MarkerPriorityExpression/)
    
    Rendering priority used for collision detection. Accepts a numeric value or a MapLibre-style expression.
    
-   ##### `Optional`scale?: [Vector2](https://docs.maptiler.com/sdk-js/api-reference/types/Vector2/)
    
    2-D scale of the marker as `[x, y]`. Defaults to `[1, 1]`.
    
-   ##### `Optional`shadow?: [MapTilerMarkerShadow](https://docs.maptiler.com/sdk-js/api-reference/types/MapTilerMarkerShadow/)
    
    Drop-shadow intensity. Defaults per size: `"strong"` at `l`, `"medium"` at `m`, `"soft"` at `s` and `xs`; use `"none"` to disable.
    
-   ##### `Optional`shape?: [MapTilerMarkerShape](https://docs.maptiler.com/sdk-js/api-reference/types/MapTilerMarkerShape/)
    
    Visual shape of the marker body. Defaults to `"maptiler"`.
    
-   ##### `Optional`size?: [MapTilerMarkerSize](https://docs.maptiler.com/sdk-js/api-reference/types/MapTilerMarkerSize/)
    
    Size of the marker.
    
-   ##### `Optional`states?: [MapTilerMarkerUIStates](https://docs.maptiler.com/sdk-js/api-reference/types/MapTilerMarkerUIStates/)
    
    Per-state property overrides applied while the marker is hovered, focused, active (pointer down), or being dragged.
    
-   ##### `Optional`title?: string
    
    Applied to the `title` attribute of the marker's root element (native tooltip).
    
-   ##### `Optional`transitions?: [MapTilerMarkerTransitions](https://docs.maptiler.com/sdk-js/api-reference/types/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.
    
-   ##### `Optional`userData?: [Record](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.Record/)<string, unknown\>
    
    Arbitrary user-defined data attached to the marker instance.
    
-   ##### `Optional`visible?: boolean
    
    Initial visibility of the marker. Defaults to `true`. TODO: not implemented yet.
