MTOfflineTileScheme

public enum MTOfflineTileScheme : String, Equatable

Defines the tile coordinate scheme used by the tile source.

  • xyz

    Slippy Map (standard Web Mercator) scheme, where Y=0 is at the top.

    Declaration

    Swift

    case xyz
  • tms

    OSGeo Tile Map Service scheme, where Y=0 is at the bottom.

    Declaration

    Swift

    case tms
  • Attempts to infer the tile scheme based on common patterns in a tile URL template.

    Many tile providers and MapLibre standard styles use {-y} to indicate an inverted Y-axis (TMS), whereas {y} usually implies the standard XYZ scheme.

    Declaration

    Swift

    public static func inferred(from urlTemplate: String) -> MTOfflineTileScheme

    Parameters

    urlTemplate

    A URL template containing coordinate variables.

    Return Value

    .tms if the template implies an inverted Y coordinate, otherwise .xyz.