summaryrefslogtreecommitdiff
path: root/platform/darwin/src/NSDictionary+MGLAdditions.mm
Commit message (Collapse)AuthorAgeFilesLines
* [ios, macos] Cleaned up expression conversionMinh Nguyễn2017-01-041-1/+1
|
* [ios, macos] Teach features and shapes about GeoJSON and mbgl typesJesse Bounds2016-10-141-0/+24
MGLShape subclasses can now return NSDictionaries that represent the shapes' GeoJSON geometries. MGLFeature classes can now return NSDictionaries that represent the features as GeoJSON features. This makes it trivial to serialize iOS and macOS shapes and features into GeoJSON. MGLFeature instances can also return a representation of themselves as an mbgl::Feature. This capability is used in a refactoring of the implementations of MGLGeoJSONSource to more efficiently transform MGLFeatures into mbgl::Features so they can be fed directly into mbgl::GeoJSONSource without having to round trip through NSJSONSerialization. The MGLFeature identifier is converted into the mbgl::identifier type based on the type of the identifier. The MGLFeature attributes are recursively converted into an mbgl::PropertyMap and each value is converted into one of the types that the PropertyMap's Value variant supports.