A customized ArcGIS Experience Builder Map Layers widget for the City of Grand Junction, CO. It extends Esri's stock Map Layers widget with auto-include of new sub-layers, layer focus (isolate), add data, master opacity, a basemap switcher, a legend panel, saved views, and enhanced search and batch tools.
The downloadable widget lives in the map-layers-custom subfolder. Download a release, drop that folder into your Experience Builder install, and run the standard client npm install. See the widget's own README for the feature list and install steps.
map-layers-custom-widget/ <- this repo
├── README.md <- this file (GitHub landing page)
├── LICENSE <- Apache-2.0
├── .gitignore <- ignores node_modules, .vs, dist, OS cruft
├── publish.ps1 <- one-command publish/update automation
└── map-layers-custom/ <- the widget (drops into your-extensions/widgets)
├── package.json
├── package-lock.json <- generated in the EB environment
├── manifest.json
├── README.md <- install steps and feature list
├── LICENSE
└── src/ ...
See map-layers-custom/README.md. In short: download the release zip, place the map-layers-custom folder so its manifest.json sits directly inside client/your-extensions/widgets/map-layers-custom/, then run npm install in the client folder and restart.
The zip is the widget only. The Visual Studio type shims in the repo (map-layers-custom/src/exb-editor-shims.d.ts, map-layers-custom/src/typings.d.ts) are left out on purpose: their ambient declare module blocks are not file-scoped and would rewrite the react, jimu and esri types for every other widget in your your-extensions folder.
If you clone the repository instead of using the zip, delete map-layers-custom/src/exb-editor-shims.d.ts and the other shim files listed above before building; nothing else depends on them.
- ArcGIS Experience Builder Developer Edition 1.19 or 1.20 (React 19). EB 1.18 and earlier are not supported.
The widget is developed in the Experience Builder install, then synced into this repo and pushed with publish.ps1. Edit the three variables at the top of the script the first time on a new machine, then:
# Code update only
powershell -ExecutionPolicy Bypass -File .\publish.ps1
# Code update plus a new downloadable release
powershell -ExecutionPolicy Bypass -File .\publish.ps1 -Release v1.1.0
The script mirrors the widget from the EB folder into the map-layers-custom subfolder (skipping node_modules and .vs), commits, pushes, and optionally cuts a versioned GitHub release with a downloadable zip. Tags must increase and never repeat.
Post: https://community.esri.com/t5/experience-builder-custom-widgets/map-layers-custom/ba-p/1707477
This widget is a derivative work based on Esri's ArcGIS Experience Builder "Map Layers" widget (by Esri R&D Center Beijing), which Esri publishes under the Apache License, Version 2.0. It has been modified and extended by the City of Grand Junction, CO.
Licensed under Apache-2.0. See LICENSE for the full terms and NOTICE for attribution. Original work copyright Esri; modifications copyright City of Grand Junction, CO. This software is free to use, modify, and redistribute under those terms.