Adding Checkbox Filters to Your Map: Nested, Inclusive, and Exclusive Filtering
Creating filters can be trickier than it seems! In this video I go over a variety of ways to add filters and give some code for easily doing it yourself. For code, go here: https://github.com/mapstertech/mapster-teach/tree/main/filter-tutorial Some other resources mentioned: https://maplibre.org/maplibre-gl-js-docs/example/simple-map/ https://geojson.io/ https://maplibre.org/maplibre-gl-js-docs/api/markers #icontrol https://maplibre.org/maplibre-gl-js-docs/style-spec/expressions/ https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/ 00:00 What are checkbox filters? 01:00 Exclusive vs Inclusive Filters 02:05 Creating the page and pseudocode comments 02:55 Structuring our data 05:40 Adding a custom control and checkboxes 08:40 Checkbox relationship interactivity 12:10 Hiding and showing features 15:25 Sources and Layers
Creating filters can be trickier than it seems! In this video I go over a variety of ways to add filters and give some code for easily doing it yourself. For code, go here: https://github.com/mapstertech/mapster-teach/tree/main/filter-tutorial Some other resources mentioned: https://maplibre.org/maplibre-gl-js-docs/example/simple-map/ https://geojson.io/ https://maplibre.org/maplibre-gl-js-docs/api/markers #icontrol https://maplibre.org/maplibre-gl-js-docs/style-spec/expressions/ https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/ 00:00 What are checkbox filters? 01:00 Exclusive vs Inclusive Filters 02:05 Creating the page and pseudocode comments 02:55 Structuring our data 05:40 Adding a custom control and checkboxes 08:40 Checkbox relationship interactivity 12:10 Hiding and showing features 15:25 Sources and Layers