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

Add support for GeoJSON foreign members #129

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

tukez
Copy link

@tukez tukez commented Apr 11, 2024

This pull request implements #128

/**
* A GeoJSON object represents a [Geometry], [Feature], or [collection of Features][FeatureCollection].
*
* @property bbox An optional bounding box used to represent the limits of the object's geometry.
*/
interface GeoJson {
val bbox: BoundingBox?
val foreignMembers: MutableMap<String, JsonElement>
Copy link
Contributor

@elcolto elcolto May 7, 2024

Choose a reason for hiding this comment

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

As this is always be defined by a backing field in the implementations, this property should be an immutable Map
Or is it desired to be modified after creation? Seems strange

Copy link
Author

Choose a reason for hiding this comment

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

Yes, it does not make much sense right now. I copied this MutableMap approach from the Feature.properties, but it makes more sense in there since it has mutation methods for it. Should I change foreignMembers to be immutable everywhere?

Copy link
Contributor

Choose a reason for hiding this comment

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

for public APIs I would recommend this 🙂

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

Successfully merging this pull request may close these issues.

2 participants