StyleURI

public struct StyleURI : Hashable, RawRepresentable

Enum representing the latest version of the Mapbox styles (as of publication). In addition, you can provide a custom URL or earlier version of a Mapbox style by using the .custom case.

  • Declaration

    Swift

    public typealias RawValue = String
  • Declaration

    Swift

    public let rawValue: String
  • Create a custom StyleURI from a String. The String may be a full HTTP or HTTPS URI, a Mapbox style URI (mapbox://styles/{user}/{style}), or a path to a local file relative to the application’s resource path. Returns nil if the String is invalid.

    Declaration

    Swift

    public init?(rawValue: String)

    Parameters

    rawValue

    String representation of the URI for the style

  • Create a custom StyleURI from a URL. The URL may be a full HTTP or HTTPS URI, a Mapbox style URI (mapbox://styles/{user}/{style}), or a path to a local file relative to the application’s resource path. Returns nil if the URL is invalid.

    Declaration

    Swift

    public init?(url: URL)

    Parameters

    url

    URL for the style

  • Mapbox Streets is a general-purpose style with detailed road and transit networks.

    Declaration

    Swift

    public static let streets: StyleURI
  • Mapbox Outdoors is a general-purpose style tailored to outdoor activities.

    Declaration

    Swift

    public static let outdoors: StyleURI
  • Mapbox Light is a subtle, light-colored backdrop for data visualizations.

    Declaration

    Swift

    public static let light: StyleURI
  • Mapbox Dark is a subtle, dark-colored backdrop for data visualizations.

    Declaration

    Swift

    public static let dark: StyleURI
  • The Mapbox Satellite style is a base-map of high-resolution satellite and aerial imagery.

    Declaration

    Swift

    public static let satellite: StyleURI
  • The Mapbox Satellite Streets style combines the high-resolution satellite and aerial imagery of Mapbox Satellite with unobtrusive labels and translucent roads from Mapbox Streets.

    Declaration

    Swift

    public static let satelliteStreets: StyleURI