Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Make MGLShape.geoJSONDictionary public #283

Closed
1ec5 opened this issue Apr 28, 2020 · 1 comment
Closed

Make MGLShape.geoJSONDictionary public #283

1ec5 opened this issue Apr 28, 2020 · 1 comment

Comments

@1ec5
Copy link
Contributor

1ec5 commented Apr 28, 2020

MGLShape.geoJSONDictionary is a computed property that converts an MGLShape to a GeoJSON-formatted NSDictionary. It’s private, but there’s no technical reason we couldn’t make it public:

/**
Returns a dictionary with the GeoJSON geometry member object.
*/
- (NSDictionary *)geoJSONDictionary;

Originally, we left it private because we expected developers to convert between MGLShape and GeoJSON-formatted strings or data, not dictionaries. But this method would be handy for streamlining the workaround in #275 (comment), specifically for the situation where we haven’t built a custom NSExpression function for a JSON expression operator that takes a GeoJSON object as an argument.

/cc @mapbox/maps-ios

@stale
Copy link

stale bot commented Nov 9, 2020

This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions.

@stale stale bot closed this as completed Nov 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant