GeoLeaf Core API - v3.0.0
    Preparing search index...

    Options for creating a map marker.

    Security note on icon: The icon field must be a static, hardcoded SVG string authored by the module developer. Never assign content that originates from user input, network responses, or profile data — doing so creates an XSS vector via SVG injection.

    interface GeoLeafMarkerOptions {
        title?: string;
        alt?: string;
        opacity?: number;
        draggable?: boolean;
        icon?: string;
        iconSize?: readonly [number, number];
        iconAnchor?: readonly [number, number];
        className?: string;
        [key: string]: unknown;
    }

    Indexable

    • [key: string]: unknown

      Forward-compatibility escape hatch for engine-specific options.

    Index

    Properties

    title?: string

    Accessible title for the marker (tooltip / screen reader).

    alt?: string

    Alt text for the marker icon image.

    opacity?: number

    Marker opacity. Range: 0 … 1.

    1
    
    draggable?: boolean

    Whether the marker can be repositioned by the user.

    false
    
    icon?: string

    SVG icon string.

    Must be a static hardcoded string — never from external or user input.

    iconSize?: readonly [number, number]

    Icon size in pixels as [width, height].

    iconAnchor?: readonly [number, number]

    Pixel offset from the icon top-left corner to the geographic anchor point.

    className?: string

    CSS class(es) applied to the marker element (space-separated). Use this instead of inline styles so the marker can be themed via a stylesheet under a strict CSP (style-src without 'unsafe-inline', roadmap B.5).