Skip to content
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

Invalid filter value: filter property must be a string #379

Open
bohdancorpsoft opened this issue Feb 8, 2024 · 1 comment
Open

Invalid filter value: filter property must be a string #379

bohdancorpsoft opened this issue Feb 8, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@bohdancorpsoft
Copy link

App crashes when I try to create a style layer with following filter:
[ "all", [ "!=", "cluster", true ], [ "has", "displayType" ], [ "==", "displayType", "map-marker" ] ]

Output from XCode:

<MGLShapeSource: 0x282cc5540; identifier = KRCYUYFpXH_0; URL = (null); shape = <MGLShapeCollectionFeature: 0x2800280f0>> <MGLShapeSource: 0x282ccfa20; identifier = KRCYUYFpXH_1; URL = (null); shape = <MGLShapeCollectionFeature: 0x2803da9a0>> <MGLShapeSource: 0x282cc21c0; identifier = tRWo2NuN1x_0; URL = (null); shape = <MGLShapeCollectionFeature: 0x2803db6c0>> <MGLShapeSource: 0x282ce46e0; identifier = ItS6YWw4Pz_0; URL = (null); shape = <MGLShapeCollectionFeature: 0x2803ddb60>> <MGLShapeSource: 0x282ce4690; identifier = 8E2KQOgI6O_0; URL = (null); shape = <MGLShapeCollectionFeature: 0x2803dea00>> <MGLShapeSource: 0x282ce4af0; identifier = 8E2KQOgI6O_1; URL = (null); shape = <MGLShapeCollectionFeature: 0x2803df540>> NSPredicate: Use of 'mgl_does:have:' as an NSExpression function is forbidden. *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Invalid filter value: filter property must be a string' *** First throw call stack: (0x18cb9a678 0x184e4bc80 0x18cc1f494 0x106fb3b30 0x106f33b6c 0x108783e48 0x10878345c 0x10876f938 0x108762b2c 0x108762bd8 0x10d8e5564 0x10d341644 0x108970f50 0x108972b34 0x108982fec 0x108982ba0 0x18cae4f9c 0x18cae1ca8 0x18cae13f8 0x1d00674f8 0x18ef078a0 0x18ef06edc 0x1041f0e34 0x1af82edcc) NSPredicate: Use of 'MGL_FUNCTION' as an NSExpression function is forbidden. NSPredicate: Use of 'MGL_FUNCTION' as an NSExpression function is forbidden. NSPredicate: Use of 'MGL_FUNCTION' as an NSExpression function is forbidden. NSPredicate: Use of 'MGL_FUNCTION' as an NSExpression function is forbidden. NSPredicate: Use of 'MGL_FUNCTION' as an NSExpression function is forbidden. NSPredicate: Use of 'MGL_FUNCTION' as an NSExpression function is forbidden. NSPredicate: Use of 'MGL_FUNCTION' as an NSExpression function is forbidden. NSPredicate: Use of 'MGL_FUNCTION' as an NSExpression function is forbidden. NSPredicate: Use of 'mgl_does:have:' as an NSExpression function is forbidden. libc++abi: terminating due to uncaught exception of type NSException

@m0nac0
Copy link
Collaborator

m0nac0 commented Mar 3, 2024

Could you please try [ "all", [ "!=", "cluster", true ], [ "has", "displayType" ], [ "==", ["get", "displayType"], "map-marker" ] ] ?
Or if that does not work try to hunt down which sub-expression causes the issue by removing them one-by-one (e.g. test only [ "all", [ "!=", "cluster", true ], [ "has", "displayType" ] or [ "all", [ "has", "displayType" ], [ "==", "displayType", "map-marker" ] ] etc.)?

@josxha josxha added the bug Something isn't working label May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants