Map Layers Custom widget
A modified version of the Experience Builder Map Layers widget. It does everything the standard widget does and adds the features below. This was migrated from a Custom Widgets Question where I had the original version.
GitHub: https://github.com/brianmcleer/map-layers-custom-widget
Features added over the standard Map Layers widget
- Auto-include new sub-layers: a designated group's newly added sub-layers appear in deployed apps without editing settings or redeploying.
- Layer focus: isolate a single layer or map-service sub-layer and hide the rest, with an explicit exit.
- Visible-layer count badge.
- Collapsible layer list, with an optional start-collapsed state.
- Add data: add a layer by URL (ArcGIS service, vector tile, WMS, WMTS, GeoJSON, CSV, KML) or local file (GeoJSON, CSV, KML, zipped shapefile).
- Master opacity: one slider sets opacity for all layers.
- Basemap switcher using the organization's basemaps.
- Legend panel.
- Saved views: save layer-visibility sets and export or import them as JSON.
- Search match count that includes map-service sub-layers, plus a visible-only filter.
- Batch tools: turn all on or off, reset visibility, zoom to visible, export map image, expand or collapse all.
- Per-layer tools: flash, copy URL, refresh, layer details, move to top or bottom, move out of group.
Each feature can be turned on or off in the widget settings.
Requirements
Experience Builder Developer Edition 1.19 or 1.20 (React 19). EB 1.18 and earlier are not supported.
Install
- Download the release zip and extract it.
- Place the map-layers-custom folder so its manifest.json is directly inside client/your-extensions/widgets/map-layers-custom/.
- Run npm install in the client folder.
- Restart the client and hard-refresh the builder.
Full install steps and troubleshooting are in the README on GitHub.