Interactive layer control for MapLibre GL JS with visibility toggle, opacity slider, and style editor
Simple setup with auto-detected layers from the map style. Great starting point for understanding the basics.
Comprehensive demo showcasing all layer types with custom GeoJSON data and raster overlay.
Control individual background layer visibility with the gear icon. Shows indeterminate checkbox state.
React component integration using LayerControlReact with hooks and proper lifecycle management.
Add layers dynamically at runtime and watch them auto-appear in the Layer Control without custom adapters.
Browser-only example using CDN imports. No build step required - just include scripts and go.