Skip to content

Commit

Permalink
Fix: remove id parameter that should never have been there (always nil)
Browse files Browse the repository at this point in the history
  • Loading branch information
ianthetechie committed May 22, 2024
1 parent 2588198 commit 9a83462
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
6 changes: 1 addition & 5 deletions Sources/StadiaMaps/Models/PeliasGeoJSONFeature.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,19 @@ public struct PeliasGeoJSONFeature: Codable, JSONEncodable, Hashable {
public var properties: PeliasGeoJSONProperties?
/** An array of 4 floating point numbers representing the (W, S, E, N) extremes of the features found. */
public var bbox: [Double]?
public var id: String?

public init(type: ModelType, geometry: GeoJSONPoint, properties: PeliasGeoJSONProperties? = nil, bbox: [Double]? = nil, id: String? = nil) {
public init(type: ModelType, geometry: GeoJSONPoint, properties: PeliasGeoJSONProperties? = nil, bbox: [Double]? = nil) {
self.type = type
self.geometry = geometry
self.properties = properties
self.bbox = bbox
self.id = id
}

public enum CodingKeys: String, CodingKey, CaseIterable {
case type
case geometry
case properties
case bbox
case id
}

// Encodable protocol methods
Expand All @@ -46,6 +43,5 @@ public struct PeliasGeoJSONFeature: Codable, JSONEncodable, Hashable {
try container.encode(geometry, forKey: .geometry)
try container.encodeIfPresent(properties, forKey: .properties)
try container.encodeIfPresent(bbox, forKey: .bbox)
try container.encodeIfPresent(id, forKey: .id)
}
}
2 changes: 1 addition & 1 deletion Sources/StadiaMaps/Models/PeliasGeoJSONProperties.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public struct PeliasGeoJSONProperties: Codable, JSONEncodable, Hashable {
case centroid
}

/** A scoped GID for this result. This can be passed to the place endpoint. Note that these are not always stable. For OSM, Geonames, and Who's on First, these are usually stable, but for other sources like OSM, no stability is guaranteed. */
/** A scoped GID for this result. This can be passed to the place endpoint. Note that these are not always stable. For Geonames and Who's on First, these are usually stable, but for other sources like OSM, no stability is guaranteed. */
public var gid: String?
/** An ID referencing the original data source (specified via source) for the result. These IDs are specific to the source that they originated from. For example, in the case of OSM, these typically look like way/123 or point/123. */
public var sourceId: String?
Expand Down
2 changes: 1 addition & 1 deletion project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ targets:
sources: [Sources]
info:
path: ./Info.plist
version: 6.3.0
version: 6.4.1
settings:
APPLICATION_EXTENSION_API_ONLY: true
scheme: {}
Expand Down

0 comments on commit 9a83462

Please sign in to comment.