GeoJSONSourceData

public enum GeoJSONSourceData : Codable, Equatable

Captures potential values of the data property of a GeoJSONSource.

  • The data property can be an URL or inlined GeoJSON string.

    Declaration

    Swift

    case string(String)
  • The data property can be a feature.

    Declaration

    Swift

    case feature(Feature)
  • The data property can be a feature collection.

    Declaration

    Swift

    case featureCollection(FeatureCollection)
  • The data property can be a geometry with no associated properties.

    Declaration

    Swift

    case geometry(Geometry)
  • Declaration

    Swift

    public init(from decoder: Decoder) throws
  • Declaration

    Swift

    public func encode(to encoder: Encoder) throws
  • Initializes GeoJSONSourceData from an URL.

    Effectively the returned data is initialized as string with the URL contents.

    Declaration

    Swift

    public static func url(_ url: URL) -> GeoJSONSourceData