MTStyleParser

public struct MTStyleParser

A parser responsible for extracting offline dependencies (sprites and glyphs) from a style JSON payload.

  • Undocumented

    Declaration

    Swift

    public init()
  • Parses the raw style JSON data to extract non-tile dependencies like sprites and glyphs.

    Throws

    DecodingError if the JSON is malformed or required fields are incorrectly formatted.

    Declaration

    Swift

    public func extractDependencies(from data: Data) throws -> MTStyleDependencies

    Parameters

    data

    The raw JSON data of the style.

    Return Value

    An MTStyleDependencies object containing the extracted references.