GeoLeaf Core API - v3.0.0
    Preparing search index...
    • Loads and validates a style file.

      This is the single style-fetching entry point since S5.2: LayerConfigManager .loadDefaultStyle delegates here rather than issuing its own bare fetch(), so the boot path fetches each style once instead of twice and every style now goes through _applyStyleValidation. See that function's own note for the arbitration.

      ⚠️ The cache key deliberately omits styleDirectory: for a given profileId:layerId:styleId the directory comes from that layer's own config, so it cannot differ between callers. Keying on it would split the cache and silently restore the double fetch this function exists to prevent.

      Parameters

      • profileId: string

        Profile ID.

      • layerId: string

        Layer ID.

      • styleId: string

        Style ID.

      • styleFileName: string | undefined

        Style file name (e.g. "default.json").

      • layerDirectory: string

        Layer directory (e.g. "layers/tourism_poi_all").

      • OptionalstyleDirectory: string = "styles"

        Sub-directory holding the style files, i.e. the layer's documented styles.directory. It was hard-coded to "styles" until S5.2, which made this the only fetch site and so had to honour the parameter both callers can set.

      Returns Promise<unknown>

      Loaded and validated style with extracted label config.

      If the file is invalid or not found.