Set the filter of a layer

set_filter(map, layer_id, filter)

Arguments

map

A mapboxer object.

layer_id

The ID of the layer whose property should be updated.

filter

A filter expression that is applied to the source.