Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Placemark needs a structured initializer #201

Closed
1ec5 opened this issue Dec 18, 2019 · 0 comments · Fixed by #202
Closed

Placemark needs a structured initializer #201

1ec5 opened this issue Dec 18, 2019 · 0 comments · Fixed by #202

Comments

@1ec5
Copy link
Contributor

1ec5 commented Dec 18, 2019

Placemark and its subclasses need initializers besides the init(from:) that takes a Decoder. Any initializer – even one that takes no parameters – would enable client code to create arbitrary placemarks for testing or to create adapters with other search sources.

Currently, the only way to create a Placemark or GeocodedPlacemark is to decode one from Carmen GeoJSON. Swift’s type system makes it awkward to manipulate JSON. Turf’s GeoJSON API doesn’t help a whole lot, because Carmen GeoJSON expects properties strewn about at the top level instead of inside the properties object.

/cc @mapbox/navigation-ios @avi-c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant