Skip to content

Expose Placemark.properties - #163

Open
frederoni wants to merge 1 commit into
mainfrom
fred/public-properties
Open

frederoni wants to merge 1 commit into
mainfrom
fred/public-properties

Conversation

@frederoni

@frederoni frederoni commented Sep 19, 2018 •

Copy link
Copy Markdown
Contributor

Fixes #159

I've split up Placemark and GeocodedPlacemark into separate files to improve readability.

The actual changes are:

- superiorPlacemarks = try container.decodeIfPresent([GeocodedPlacemark].self, forKey: .superiorPlacemarks)
+ superiorPlacemarks = try container.decodeIfPresent([Placemark].self, forKey: .superiorPlacemarks)

along with exposing Placemark.properties, which I don't think should be exposed after a second thought because we have aliases to most of these properties. 🤔

cc @1ec5 @riastrad

@frederoni
frederoni requested a review from 1ec5 September 19, 2018 13:25
@frederoni
frederoni force-pushed the fred/public-properties branch from 7eaa9d4 to cfc2e3a Compare September 19, 2018 13:51
Also refactored GeocodedPlacemark out of Placemark to improve
readability.
A subset of the `properties` object on a GeoJSON feature suited for Geocoding results.
*/
fileprivate var properties: Properties?
public var properties: Properties?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

along with exposing Placemark.properties, which I don't think should be exposed after a second thought because we have aliases to most of these properties. 🤔

Yeah, that was my original intention with this architecture. The Geocoding API has always been quite strictly oriented around GeoJSON, but I’ve always felt that clients of the library need a stronger, less general-purpose type system. Which properties don’t have dedicated properties?

@1ec5
1ec5 changed the base branch from master to main October 7, 2020 23:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

2 participants