GeoLeaf Core API - v3.0.0
    Preparing search index...
    • Resolves the colours of one category / sub-category pill badge.

      The badge reuses the marker disc's own colours — the pill and the map symbol should read as the same object. A sub-category badge inherits its category's colours when it declares none of its own.

      Parameters

      • config: TaxonomyConfig

        The modules.taxonomy config.

      • layerId: string

        GeoLeaf layer id.

      • feature: TaxonomyFeatureLike

        Raw feature bag (read for category / sub-category values).

      • surface: TaxonomySurface

        The feature-info surface being rendered.

      • field: string

        The badge field's configured name (e.g. properties.categoryId).

      Returns ResolvedBadgeStyle | null

      Validated colours, or null when the surface has not opted in, the field is not a taxonomy column, or no colour resolves.