Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

[core] Style Filters expressions should support raw constant arrays matching labels. #11879

Closed
fabian-guerra opened this issue May 10, 2018 · 3 comments
Labels
Core The cross-platform C++ core, aka mbgl

Comments

@fabian-guerra
Copy link
Contributor

Platform: iOS/macOS/Android?
Mapbox SDK version: boba

Creating a filter with an expression that contains an array as an input parameter :
@[@"match", @[@"id"], @[@"literal", @[@6, @5, @4, @3]], @YES, @NO]

Returns the following exception:

"NSInvalidArgumentException", "Invalid filter value: [2]: Branch labels must be numbers or strings."`

/cc @anandthakker @asheemmamoowala @1ec5 @tobrun

@fabian-guerra fabian-guerra added bug Core The cross-platform C++ core, aka mbgl labels May 10, 2018
@anandthakker
Copy link
Contributor

anandthakker commented May 10, 2018 via email

@fabian-guerra fabian-guerra removed the bug label May 14, 2018
@fabian-guerra
Copy link
Contributor Author

From my chat with @anandthakker in the morning. The match expressions that contains an array as values should not contain literal as part of the array value. Then:
@[@"match", @[@"id"], @[@"literal", @[@6, @5, @4, @3]], @YES, @NO] must be changed to
@[@"match", @[@"id"], @[@6, @5, @4, @3], @YES, @NO]

/cc @1ec5

@fabian-guerra fabian-guerra changed the title [core] Style Filters does not support arrays as constant values in expressions. [core] Style Filters expressions should support raw constant arrays matching labels. May 18, 2018
@fabian-guerra
Copy link
Contributor Author

This is fixed in #11866

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Core The cross-platform C++ core, aka mbgl
Projects
None yet
Development

No branches or pull requests

2 participants