| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
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
* [ios, macos] Special-case $id, $type in predicates
Also support $id ≟ nil.
|
| |
|
|\ |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| | |
Convert NSNull into an mbgl null value.
|
|/ |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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, 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
|