maps
maps copied to clipboard
[Bug]: layer filter prop not working on iOS
Mapbox Implementation
Mapbox
Mapbox Version
11.1.0
Platform
iOS
@rnmapbox/maps version
10.1.8
Standalone component to reproduce
import React from 'react';
import {
MapView,
ShapeSource,
LineLayer,
Camera,
} from '@rnmapbox/maps';
const aLine = {
type: 'LineString',
coordinates: [
[-74.00597, 40.71427],
[-74.00697, 40.71527],
],
};
class BugReportExample extends React.Component {
render() {
return (
<MapView style={{flex: 1}}>
<Camera centerCoordinate={[-74.00597, 40.71427]} zoomLevel={14} />
<ShapeSource id="idStreetLayer" shape={aLine}>
<LineLayer id="idStreetLayer" filter={['==', true, false]} />
</ShapeSource>
</MapView>
);
}
}
Observed behavior and steps to reproduce
When using filter prop on layer components it does nothing and all features are shown on map.
Expected behavior
Filter prop to be able to be used to filter features from layer.
Notes / preliminary analysis
RNMBXSetCommonLayerProps seems to set filter but this has no effect on the line visibility. The filtering seems to work on Mapbox v10 so this is a problem with v11 implementation.
Additional links and references
No response
Try:
['==', ['literal', true], ['literal', false]]
I have the same problem with the has filter on a basic cluster
Try:
['==', ['literal', true], ['literal', false]]
I have tried this with multiple filters, this was just an example I threw in. Works with v10 but not with v11 so there is definitely a bug somewhere.
Same issue here, Android okay.
it seems that none of the filter expressions work on ios.
Should be fixed by: #3390
Confirmed working. Thanks a lot!
great stuff, thanks a lot!