如何过滤 deck.gl TripsLayer 上的数据
How to filter data on deck.gl TripsLayer
这是我的 TripsLayer,我想过滤一些数据。我想我可以用 trips.setProps({ data: newData})
来做到这一点,但是有没有其他方法可以做到这一点?喜欢将不透明度设置为 0?谢谢
trips = new MapboxLayer({
id: 'trips',
type: TripsLayer,
data: ro,
getPath: d => {
return d.path
},
getTimestamps: d => {
return d.timestamps
},
getColor: d => d.color,
widthMinPixels: 3,
rounded: true,
trailLength: 10000,
currentTime: globalTime,
shadowEnabled: false
})
之前可以对数据进行过滤,将过滤后的数据传给图层。
new MapboxLayer({
data: filterData,
...
})
这是我的 TripsLayer,我想过滤一些数据。我想我可以用 trips.setProps({ data: newData})
来做到这一点,但是有没有其他方法可以做到这一点?喜欢将不透明度设置为 0?谢谢
trips = new MapboxLayer({
id: 'trips',
type: TripsLayer,
data: ro,
getPath: d => {
return d.path
},
getTimestamps: d => {
return d.timestamps
},
getColor: d => d.color,
widthMinPixels: 3,
rounded: true,
trailLength: 10000,
currentTime: globalTime,
shadowEnabled: false
})
之前可以对数据进行过滤,将过滤后的数据传给图层。
new MapboxLayer({
data: filterData,
...
})