I am trying to do the following with react-native-mapbox-gl
<MapboxGL.SymbolLayer
id="controlPointIcon"
filter={['all', ['in', 'id', this.state.nextPossible], ['==', 'type', 'alt']]}
style={mapStyle.iconControlPoint}
/>
The filter is supposed the match only if the given GeoJSON feature has its property id included in the array this.state.nextPossible and if the property type matches 'alt'.
I am clearly doing something wrong, the error I am getting says:
Invalide predicate: "id" ... NSInvalidArgumentException
reason [__NSCFNumber isEqualTOString:]: unrecognized selector sent to instance ...
Any idea how to solve this with mapbox filter expressions?
See https://github.com/react-native-mapbox-gl/maps/issues/70#issuecomment-499775185
in
is a legacy filter syntax and not supported. Please usematch
instead.