-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
array operators don't match spec #632
Comments
native uses the spec operators: https://github.com/mapbox/mapbox-gl-native/blob/master/src/style/style_parser.cpp#L748-L760 |
Yeah, but we need to choose one. I also remember that we settled on |
+1 for |
Should we also keep the aliases ( |
It also looks like there's a difference to how operators apply to object vs array. In native, you can use both with any operator, the only difference being that object is AND by default and array is OR, which gets overriden by parent. In JS, you can only use Seems like the native way is more convenient, so we can adopt it in JS, while renaming operator names (and adding aliases) in the spec. |
On the other hand, there's no easy way to do NOT in native: yo have to use NOR in combination with AND which is pretty bulky. |
Fixed with v6 filters. |
The implementation uses
||
,&&
,!
,$or
,$and
,$nor
while the spec uses|
,&
,^
,!
mapbox-gl-js/js/style/bucketfilter.js
Lines 24 to 28 in 8ff29b8
https://github.com/mapbox/mapbox-gl-style-spec/blob/d1fc14b44e68dc30fc9990bc1329107265cdd8f8/reference/v4.json#L426-L438
Which do we want?
@mourner @nickidlugash @edenh
The text was updated successfully, but these errors were encountered: