2

Can someone help me with this error

I am using filters on a layer like so:

this gets triggered during a mapbox-gl-draw operation

map.setPaintProperty('postcodes', 'fill-color', '#e37d10');     
map.setFilter('postcodes', ['in', ['get', 'name'], ["literal", filtered]]);

this is used by an onClick event on the Marker

map.setFilter('postcodes', ['match', ['get', 'name'], highlighting, true, false]);

Both of these operation are used on the same Layer for filling the background color of the layer with different colors

 map.addLayer({
                'id': 'postcodes',
                'type': 'fill',
                'source': 'postcodes',
                'layout': {},
                'paint': {
                    'fill-color': '#088',
                    'fill-opacity': 0.8
                },
                'filter': ['match', ['get', 'name'], [''], true, false]
            });

I am not sure, the error is a bit confusing hence would appreciate if someone can help me with this.

radhikavm
  • 29
  • 7

0 Answers0