@versatiles/style
    Preparing search index...

    Variable protomapsConst

    protomaps: (options?: ProtomapsOptions) => StyleSpecification & {
        colorKeys: readonly (keyof ColorsOptions)[];
        colors: (palette: Palette) => ResolvedColors;
        languages: (tileJSON: TileJSONSpecification) => string[];
        minimizeOptions: (options?: ProtomapsOptions) => ProtomapsOptions;
        palettes: readonly Palette[];
        resolveOptions: (options?: ProtomapsOptions) => ResolvedProtomaps;
        slots: Readonly<
            {
                belowFills: "slot-below-fills";
                belowLabels: "slot-below-labels";
                belowStreets: "slot-below-streets";
                belowSymbols: "slot-below-symbols";
            },
        >;
        tileset: {
            build: (
                source: string | TileJSONSpecification,
                urls: SchemaUrls,
            ) => StyleSpecification;
            id: string;
            sourceLayers: string[];
        };
        validateOptions: (
            options?: ProtomapsOptions,
        ) => ValidationResult<ResolvedProtomaps>;
        get defaults(): ResolvedProtomaps;
        get layerGroups(): LayerGroupMap;
        get textGroups(): LayerGroupMap;
        toCode(options?: ProtomapsOptions, codeOptions?: CodeOptions): string;
    } = ...

    Type Declaration

    • ReadonlycolorKeys: readonly (keyof ColorsOptions)[]

      All color key names accepted by ColorsOptions. Some are inert under this schema.

    • Readonlycolors: (palette: Palette) => ResolvedColors

      Return a palette's resolved colors.

    • Readonlylanguages: (tileJSON: TileJSONSpecification) => string[]

      The language codes available in a given TileJSON — both name_xx and name:xx.

    • ReadonlyminimizeOptions: (options?: ProtomapsOptions) => ProtomapsOptions

      The smallest options object that builds the same style: every value equal to its default is dropped, colours compared against the chosen palette. For storing a style in a URL or config.

    • Readonlypalettes: readonly Palette[]

      All available palette names — the palettes are schema-neutral, so these are osm's.

    • ReadonlyresolveOptions: (options?: ProtomapsOptions) => ResolvedProtomaps

      Resolve raw ProtomapsOptions to a fully validated ResolvedProtomaps.

    • Readonlyslots: Readonly<
          {
              belowFills: "slot-below-fills";
              belowLabels: "slot-below-labels";
              belowStreets: "slot-below-streets";
              belowSymbols: "slot-below-symbols";
          },
      >

      Stable layer IDs for use as MapLibre beforeId.

    • Readonlytileset: {
          build: (
              source: string | TileJSONSpecification,
              urls: SchemaUrls,
          ) => StyleSpecification;
          id: string;
          sourceLayers: string[];
      }

      How guessStyle recognises an Protomaps tileset and builds a style for it — the injection point: guessStyle(tileJSON, { schemas: [protomaps] }).

    • ReadonlyvalidateOptions: (options?: ProtomapsOptions) => ValidationResult<ResolvedProtomaps>

      Check options without throwing, reporting every problem at once as data rather than as a message to parse — for a tool validating options someone else typed. resolveOptions stays the call for a program that cannot proceed: it throws on the first problem.

    • get defaults(): ResolvedProtomaps

      Fully resolved defaults (theme: 'colorful').

    • get layerGroups(): LayerGroupMap

      Maps each LayerGroupOptions key to the layer IDs it controls, for this schema's layers.

    • get textGroups(): LayerGroupMap

      Maps each topic of text (water.rivers, pois.transit, …) to the text layer IDs its label style sets. Built from the same group tags as layerGroups.

    • toCode: function