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 has been archived by the owner on Jun 21, 2023. It is now read-only.
The core sdk implemented a new in expression in mapbox/mapbox-gl-native#16162. This ticket will track the implementation of the corresponding iOS bindings.
I think the most natural NSExpression implementation of this expression operator would be needle IN haystack (alternatively haystack CONTAINS needle), where haystack is an aggregate expression, constant expression of type NSArray or NSSet, or NSString.
NSComparisonPredicate(MGLAdditions) already implements IN and CONTAINS as syntactic sugar for MGL_MATCH, for example translating $geometryType IN {'LineString', 'Polygon'} to ['match', ['geometry-type'], ['LineString', 'Polygon'], true, false]. I think we can now eliminate this syntactic sugar in favor of the more generalized in operator support in mbgl: ['in', ['geometry-type'], ['LineString', 'Polygon']].
As always, if the developer needs something syntactically closer to JSON, they can use MGL_FUNCTION() or +[NSExpression expressionWithJSONObject:].
We currently document supporting NSExpression’s [c] and [d] modifiers “for comparison and aggregate operators”, but in is the one comparison operator for which the style specification doesn’t allow customizing case or diacritic sensitivity: mapbox/mapbox-gl-js#9339. For now, we’ll have to document this exception for the IN and CONTAINS operators.
The core sdk implemented a new
in
expression in mapbox/mapbox-gl-native#16162. This ticket will track the implementation of the corresponding iOS bindings.For reference, this is the Android implementation: mapbox/mapbox-gl-native-android#171
/cc @mapbox/maps-ios
The text was updated successfully, but these errors were encountered: