You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Translate more NSComparisonPredicate operators to filters #6244
Per #6049 (comment) and #6049 (comment), we should translate a few more NSPredicate operators to mbgl::style::Filters to prevent information loss:
NSComparisonPredicate with an operator type of NSContainsPredicateOperatorType should be represented by an mbgl::style::InFilter with the right expression as the key and the left expression as the values.
NSComparisonPredicate with an operator type of NSBetweenPredicateOperatorType should be represented by an mbgl::style::AllFilter of mbgl::style::GreaterThanEqualsFilter (corresponding to the first element of the right expression) and mbgl::style::LessThanEqualsFilter (the second element of the right expression).
NSComparisonPredicate with an operator type of NSEqualToPredicateOperatorType and a right expression of nil should be represented by an mbgl::style::NotHasFilter.
NSComparisonPredicate with an operator type of NSNotEqualToPredicateOperatorType and a right expression of nil should be represented by an mbgl::style::HasFilter.
NSPredicate with a format of NSTRUEPREDICATE should be represented as an mbgl::style::AllFilter with no subfilters (same as an NSComparisonPredicate with a type of NSAndPredicateType).
NSPredicate with a format of NSFALSEPREDICATE should be represented as an mbgl::style::AnyFilter with no subfilters (same as an NSComparisonPredicate with a type of NSOrPredicateType).
Activity
1ec5 commentedon Sep 7, 2016
Per #6248 (comment), if you try to get the predicate of an existing layer that has one of these operators (quite common in Streets), the SDK crashes.