MGLStyle

extension MGLStyle
  • Returns the URL to the current version of the Mapbox Navigation Day style.

    Declaration

    Swift

    public class var navigationDayStyleURL: URL { get }
  • Returns the URL to the current version of the Mapbox Navigation Night style.

    Declaration

    Swift

    public class var navigationNightStyleURL: URL { get }
  • Returns the URL to the given version of the Mapbox Navigation Day style. Available versions are: 1.

    To use the Navigation Guidance Day or Navigation Preview Day style, which predates the Navigation Day style, create a mapbox: URL directly. For example:

    • Navigation Guidance Day: mapbox://styles/mapbox/navigation-guidance-day-v1 (available versions are: 1, 2, 3, and 4)
    • Navigation Preview Day: mapbox://styles/mapbox/navigation-preview-day-v1 (available versions are: 1, 2, 3, and 4)

    We only have one version of Mapbox Navigation Day style in China, so if you switch your endpoint to .cn, it will return the default day style.

    Declaration

    Swift

    public class func navigationDayStyleURL(version: Int) -> URL
  • Returns the URL to the given version of the Mapbox Navigation Night style. Available versions are: 1.

    To use the Navigation Guidance Night or Navigation Preview Night style, which predates the Navigation Night style, create a mapbox: URL directly. For example:

    • Navigation Guidance Night: mapbox://styles/mapbox/navigation-guidance-night-v2 (available versions are: 2, 3, and 4)
    • Navigation Preview Night: mapbox://styles/mapbox/navigation-preview-night-v2 (available versions are: 2, 3, and 4)

    We only have one version of Mapbox Navigation Night style in China, so if you switch your endpoint to .cn, it will return the default night style.

    Declaration

    Swift

    public class func navigationNightStyleURL(version: Int) -> URL