summaryrefslogtreecommitdiff
path: root/platform/darwin/src/NSExpression+MGLAdditions.mm
Commit message (Collapse)AuthorAgeFilesLines
* [ios, macos] Convert NSColor/UIColor expressions to CSS color string valuesMinh Nguyễn2017-02-181-0/+10
| | | | When converting a constant NSExpression to an mbgl::Value, turn an NSColor or UIColor into an std::string containing a CSS color string. This allows developers to set an attribute of an MGLFeature to an NSColor or UIColor (rather than a CSS color string, which would be foreign), then use it in an MGLStyleFunction with identity interpolation.
* [core] Introduce dedicated filter types for $type and $id special cases (#7971)John Firebaugh2017-02-091-0/+61
| | | | | | | | * [core] Introduce dedicated filter types for $type and $id special cases * [ios, macos] Special-case $id, $type in predicates Also support $id ≟ nil.
* [core] remove trailing whitespace, add trailing newlines, add space after //Konstantin Käfer2017-01-271-2/+2
|
* Merge branch 'release-ios-v3.4.0' into 1ec5-release-ios-v3.4.0-beta.7Minh Nguyễn2017-01-161-39/+34
|\
| * [ios, macos] Cleaned up expression conversionMinh Nguyễn2017-01-041-35/+25
| |
| * [ios, macos] Rewrote predicate/filter conversionMinh Nguyễn2017-01-041-9/+16
| | | | | | | | | | | | | | | | | | | | When converting predicates to filters, symmetric comparison predicates can now compare a value to a key in addition to the usual key-to-value order. Added error checking for unhandled combinations like key-to-key. Fixed a crash converting a CONTAINS predicate into a filter. Added support for constant value expressions inside aggregate expressions. Allow sets as aggregate expressions just like arrays, except in BETWEEN predicates where order matters. Flatten NOT predicates into more specialized filters. When converting filters to predicates, use constant value expressions inside aggregate expressions. Convert to a BETWEEN predicate when possible. Replaced predicate round-tripping integration tests with systematic unit tests for converting in either direction, plus unit tests for round-tripping and symmetry. Refined exception names and messages. Realphabetized files in groups.
| * [ios, macos] Fixed null expression crashMinh Nguyễn2016-12-231-2/+3
| | | | | | | | Convert NSNull into an mbgl null value.
* | [build] upgrade to variant 1.1.4 and dependenciesKonstantin Käfer2016-11-281-1/+1
|/
* [ios, macos] Teach features and shapes about GeoJSON and mbgl typesJesse Bounds2016-10-141-0/+26
| | | | | | 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.
* [ios] fixes #6248: properly handle all NSNumber types in filters (#6290)Justin R. Miller2016-09-161-6/+27
|
* [ios] Check for bool value with charJesse Bounds2016-09-021-1/+1
| | | | | | | | | | | | | | We convert NSNumbers (and NSStrings) to the appropriate mbgl value so that we can use NSPredicates to describe mbgl filters we want to apply to style layers at runtime. This change fixes an issue where the conversion from an NSNumber that represented a bool was not recognized as such. encode(bool) returns a 'c' or 'b' on 32 bit and 64 bit systems respectively and objCType of an NSNumber representing a bool always returns 'c'. Now the implementation checks for 'c' always and NSNumbers representing bool don't fall through and trigger the exception.
* [ios] Added support for filters (NSPredicate)Fredrik Karlsson2016-09-021-0/+43
[ios, macos] cleaned up filters [ios] added a filter example [ios] utest filters [ios, macos] nested predicates [ios] refactored [ios] filter -> NSPredicate [ios] fixed mbgl::Any/AllFilter -> NSPredicate [ios] translate nested mbgl::NotIn filters [ios] cleanup and added more utests [ios] fixed a bug in the None filter conversion and improved utests [ios, macos] doc [macos] added missing category [ios, macos] additional utests [ios, macos] updated documentation