GeoJSONSourceData
public enum GeoJSONSourceData : Codable, Equatable
Captures potential values of the data property of a GeoJSONSource.
-
The
dataproperty can be an URL or inlined GeoJSON string.Declaration
Swift
case string(String) -
The
dataproperty can be a feature.Declaration
Swift
case feature(Feature) -
The
dataproperty can be a feature collection.Declaration
Swift
case featureCollection(FeatureCollection) -
The
dataproperty 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
GeoJSONSourceDatafrom anURL.Effectively the returned data is initialized as
stringwith theURLcontents.Declaration
Swift
public static func url(_ url: URL) -> GeoJSONSourceData
GeoJSONSourceData Enumeration Reference